-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
Deconz switches reporting "click" twice #316
Comments
A long time ago there was a bug where the websocket connection was opened more than once. It would be nice if you can provide a log with the instance running in log level debug, while this is happen. |
@Jey-Cee deconz.0 deconz.0 deconz.0 deconz.0 deconz.0 deconz.0 deconz.0 deconz.0 deconz.0 deconz.0 deconz.0 deconz.0 |
But it looks like 2 open connections, as it gets every event twice. |
Can't we just check on the ws object between 576 and 577 if it's null and, if not, terminate the prior socket before creating a new one? I mean, as far as I can see, this is the only place where a new socket is created. Which means, for whatever reason, either user, host or port is null. Lines 576 to 577 in 7d3c67c
|
The root cause here is that the adapter renews the websocket connection every 60 seconds, while there is no possibility to check if the connection is still working. Your idea could be a soulution if the connection wasn't terminated before for any reason. |
Got it. Lines 67 to 73 in 7d3c67c
I think they could be changed to below, getting the 2nd if out of the 1st if: I am not pretty sure. But can't it be that, right at the start of the instance, "reconnect" is not yet initiated but an onStateChange is fired. Leading to a new call to getAutoUpdates(), without terminating the previous connection? Line 577 in 7d3c67c
|
Does your change work as solution? |
@Jey-Cee: Yes, looks like. I have no issues since I use my fork. |
I'm seeing huge delays when using my FoH (Senic) switches. It takes up to 5sec for ioBroker to fire an event. DeConz' API viewer also immediately shows the press event ... but then it gets delayed. Could it be related? |
@kopierschnitte i don't think this issue is related to your subject. If you think this is an issue with the adapter open a new issue. Add relevant information like debug log, screenshot of the switch object tree, ... |
Hey. From time to time, the adapter starts to reports clicks on switches twice.
![image](https://user-images.githubusercontent.com/2249766/196258635-c5ab6403-78aa-443c-9033-2a294ec6354c.png)
I have Friends of Hue Switches, connected to deconz. When I click a Button, it reports the button click within ioBroker. Restarting the adapter in ioBroker fixes the issue. That's the reason I don't think it's a problem of the switches or deconz.
See screenshot of history adapter below, the line from left to right marks the time when I did a reboot of the adapter instance in ioBroker.
The text was updated successfully, but these errors were encountered: