-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
Compact-Mode: Adaptercheck Tracking #512
Comments
nuki-extended adapter fails with error
I have version |
solalog-Adapter: Wie kann das korrigiert werden? |
@Zefau Can it be multihost and on the host hwhere you want to install hue-extended no web instance is localed? This has nothing to do with Compact mode. |
@forelleblau In "unload" it needs to be checked that adapter and also adapter.log still exists ... becaus eit could be already gone when called. I think it runs into the catch because of something no longer existing.moste likely it is the "adapter.log". so maybe write
|
@Apollon77 thanks, unfortunately this helps only in some (reason unknown) cases. Her two other log-versions beside the one above: OK-looking[edit: now the right picture]: also not-ok: |
This only about "logging" and sometimes the logs do not come through that close to the end of the process. |
PS: Der nächste .35 vom Controller lässt den prozess etwas mehr zeit ... dann sollte mehr Logging durhckommen |
@Zefau Kannst DU bitte mal web auch im compact mode laufen lassen ... in der gleichen gruppe wie hue-extended. geht es dann? |
Jo, das funktioniert. |
kk, fixe ich im controller. Bug gefunden :-) |
@Zefau Please install js.controller version from GitHub and try again with the "original setting" regarding web. Should now work as long as on same host |
Confirmed working
|
Thank you! |
@Apollon77 : .35 installiert, Log nun ok. Funktioniert alles. Danke |
I have tested that compact works on Linux but I think something is wrong on Windows. I thought it was my adapter (Chromecast) so I tested with sonoff which was updated by @GermanBluefox a couple of days ago: Versions (taken yesterday from Gihub master):
Node JS version (installled by iobroker universal Windows installer): v10.16.3 |
WTF all slashes are missing? aaaahhhh ... interesting ... Please install js-controller from GitHub, I changed one place .. working now? |
Compact wotks now in Windows @Apollon77 :) |
@angelnu Hm. multiple listeners that all call the callback is kind of very unexpected behaviour and currently (also also in the past) not really handled. The expectation is that there is one callback (as usually with callbacks!). We could use "once" there, but then you would get exceptions. I have adjusted now that all callbacks after the first one are ignored (it's on GitHub), but please know that this means that the first callback triggers the real process "stopping" and latest 500ms after this irst callback everything is gone, especially the DB connections and such. So in fact : better handle that in your code that you call the unload callback after ALL your internal stuff has executed and make sure to have high enought stopTimeout set in iopackage |
Ok, I can implement that a central adapter destroyer calls the mutiple destroyers before calling the callback. I will do that. Update: Done, now all chromecast instances are destroyed before the adapter terminates. :-) |
@Apollon77 |
In order to prepare the stable release of js-controller 2.0 and to prevent users having problems with compact mode usage of adapters we want to make sure adapters are really working in compact mode when it is available.
Details about compact mode and how to use it can be taken from https://github.com/ioBroker/ioBroker.js-controller/blob/master/README.md#start-adapter-instances-in-compact-mode
All developers should please use the latest js-controller 2.0 version and check their adapters in compact mode.
Beside the normal functionality please especially test stopping the adapter and starting it again.
After stopping make sure that no state updates happen anymore. Please check your code and make sure that in "on unload" really ALL Timeouts and Intervals are stopped correctly and all used Connections (Network, Serial, Sockets ...) are also closed. Ideally make sure to call the callback when this has finished or check how long all this closing needs (e.g. socket.io closing sometimes needs 1s). By default the adapter is stopped 500ms after calling onUnload independent if callback was already called or not. You can increase that time if needed by setting common.stopTimeout in io-package with an higher value (in ms).
Please also check that multiple instances of your adapter in the same compact group works and that the instances are not mising up somehow.
Please support us to create the best experience for all our users when they want to use the compact mode.
Thank you!
The text was updated successfully, but these errors were encountered: