Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

js-controller 4.0 adadapter compatibility #1749

Closed
Apollon77 opened this issue Feb 5, 2022 · 6 comments
Closed

js-controller 4.0 adadapter compatibility #1749

Apollon77 opened this issue Feb 5, 2022 · 6 comments

Comments

@Apollon77
Copy link
Collaborator

Apollon77 commented Feb 5, 2022

with js-controller 4.0 object definitions are now also checked that min/max in only provided for number/mixed objects and that the type of the default value matches to the object type.

If something is not correct this is logged as 'warning' or 'info' log.

Please spent some time to verify your adapter by ideally starting with a fresh instance and do some actions and verify the log. If you see a warn or info log there from these checks please adjust the adapter and fix the relevant cases.

This thread is for tracking purposes and allows questions and discussions

@Apollon77 Apollon77 changed the title js-controller 4.0 aadapter compatibility js-controller 4.0 adadapter compatibility Feb 5, 2022
@AlCalzone
Copy link
Collaborator

Wasn't there a mention of allowing min/max for mixed states?

@Apollon77
Copy link
Collaborator Author

right, I correct thext

This was referenced Feb 7, 2022
This was referenced Feb 8, 2022
@kcy84
Copy link

kcy84 commented May 2, 2022

I´m using Synology DS220+ and dockers for iobroker Image. I got following problem with Controme adapter after updating js-controller 4.0.23:

host.MyIOBrokerV5 2022-05-02 23:55:41.288 info Restart adapter system.adapter.controme.0 because enabled
host.MyIOBrokerV5 2022-05-02 23:55:41.288 error instance system.adapter.controme.0 terminated with code 1 (JS_CONTROLLER_STOPPED)
host.MyIOBrokerV5 2022-05-02 23:55:41.288 error Caught by controller[0]: at Object. (/opt/iobroker/node_modules/iobroker.controme/main.js:12:13)
host.MyIOBrokerV5 2022-05-02 23:55:41.287 error Caught by controller[0]: require() of /opt/iobroker/node_modules/got/dist/source/index.js from /opt/iobroker/node_modules/iobroker.controme/main.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
host.MyIOBrokerV5 2022-05-02 23:55:40.928 info instance system.adapter.controme.0 started with pid 3482

Can you give a hint, what the problem can be that the JS_CONTROLLER_STOPPED?

Thanks...

@AlCalzone
Copy link
Collaborator

This isn't a JS-Controller issue, but the solution is simple:
You're using a version of got which is ESM-only. This isn't supported in the ioBroker context yet, and likely won't be for quite some time.

For reference: https://github.com/sindresorhus/got/releases/tag/v12.0.0
Downgrade got to https://github.com/sindresorhus/got/releases/tag/v11.8.3, or use a different http library like axios that doesn't do this nonsense of ESM-only modules.

@Apollon77
Copy link
Collaborator Author

I created MadErstam/ioBroker.controme#27

@Apollon77 Apollon77 reopened this May 3, 2022
@mcm1957
Copy link
Contributor

mcm1957 commented Feb 20, 2024

@Apollon77
@foxriver76

Is this issue really useful anymore ?
Looks a little bit outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants