Describe the bug
If a device (e.g. a ceiling lamp) is offline, the adapter crashes on startup and is restarted again an again.
To Reproduce
I have set up 2 Yeelight lamps in the adapter. If one of the two lamps is offline and the adapter is restartet an error is reported and the adapter crashes.
Expected behavior
I would expect the adapter to start anyway and the remaining lamp can be controlled.
Screenshots & Logfiles
2024-01-23 09:16:57.526 - debug: yeelight-2.0 (15146) ERROR YEELIGHT CONNECTION: 0x000000000000000: Connection 192.168.178.13:55443: Error: connect EHOSTUNREACH 192.168.178.13:55443
2024-01-23 09:16:57.541 - error: yeelight-2.0 (15146) Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().
2024-01-23 09:16:57.542 - error: yeelight-2.0 (15146) unhandled promise rejection: Socket closed before the connection was established
2024-01-23 09:16:57.543 - error: yeelight-2.0 (15146) Error: Socket closed before the connection was established
at new NodeError (node:internal/errors:405:5)
at Socket.onClose (node:net:943:10)
at Object.onceWrapper (node:events:632:26)
at Socket.emit (node:events:529:35)
at Socket.emit (node:domain:489:12)
at TCP. (node:net:350:12)
2024-01-23 09:16:57.544 - error: yeelight-2.0 (15146) Exception-Code: ERR_SOCKET_CLOSED_BEFORE_CONNECTION: Socket closed before the connection was established
2024-01-23 09:16:57.593 - info: yeelight-2.0 (15146) cleaned everything up...
2024-01-23 09:16:57.595 - info: yeelight-2.0 (15146) terminating
2024-01-23 09:16:57.596 - debug: yeelight-2.0 (15146) Plugin sentry destroyed
2024-01-23 09:16:57.597 - warn: yeelight-2.0 (15146) Terminated (UNCAUGHT_EXCEPTION): Without reason
2024-01-23 09:16:58.099 - info: yeelight-2.0 (15146) terminating
2024-01-23 09:16:58.159 - error: host.iobroker Caught by controller[0]: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
2024-01-23 09:16:58.159 - error: host.iobroker Caught by controller[1]: Error: Socket closed before the connection was established
2024-01-23 09:16:58.160 - error: host.iobroker Caught by controller[1]: at new NodeError (node:internal/errors:405:5)
2024-01-23 09:16:58.160 - error: host.iobroker Caught by controller[1]: at Socket.onClose (node:net:943:10)
2024-01-23 09:16:58.160 - error: host.iobroker Caught by controller[1]: at Object.onceWrapper (node:events:632:26)
2024-01-23 09:16:58.160 - error: host.iobroker Caught by controller[1]: at Socket.emit (node:events:529:35)
2024-01-23 09:16:58.160 - error: host.iobroker Caught by controller[1]: at Socket.emit (node:domain:489:12)
2024-01-23 09:16:58.160 - error: host.iobroker Caught by controller[1]: at TCP. (node:net:350:12)
2024-01-23 09:16:58.161 - error: host.iobroker instance system.adapter.yeelight-2.0 terminated with code 6 (UNCAUGHT_EXCEPTION)
2024-01-23 09:16:58.161 - info: host.iobroker Restart adapter system.adapter.yeelight-2.0 because enabled
2024-01-23 09:16:58.161 - warn: host.iobroker Do not restart adapter system.adapter.yeelight-2.0 because restart loop detected
Versions:
1.2.1
Additional context
It is important for troubleshooting that this only happens if
the adapter is restarted
AND
one of the devices is offline.
If the adapter is started and all devices are accessible via the network, the adapter will start without any problems.
If the adapter has already started successfully and then a device goes offline, the adapter just keeps running.
Describe the bug
If a device (e.g. a ceiling lamp) is offline, the adapter crashes on startup and is restarted again an again.
To Reproduce
I have set up 2 Yeelight lamps in the adapter. If one of the two lamps is offline and the adapter is restartet an error is reported and the adapter crashes.
Expected behavior
I would expect the adapter to start anyway and the remaining lamp can be controlled.
Screenshots & Logfiles
Versions:
1.2.1
Additional context
It is important for troubleshooting that this only happens if
If the adapter is started and all devices are accessible via the network, the adapter will start without any problems. If the adapter has already started successfully and then a device goes offline, the adapter just keeps running.
Attachment The attached file is a HTML file, but I had to rename it for the upload. iobroker.2024-01-23.log.html.txt