-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[touchwand] Remove Thing state update on unit discovery causing expire to fail #12736
Conversation
Signed-off-by: Roie Geron <roie.geron@gmail.com>
Signed-off-by: Roie Geron <roie.geron@gmail.com>
Changing a binding behaviour before another feature in openHAB is not working as you expect looks a little strange. |
The code that sets the thing to ONLINE and is called based on data retrieved by the discovery code:
If you suppress that, are you sure that a thing will come ONLINE after it was OFFLINE ? Needs to be studied more in details. |
Ok, I see now you are the author or maintainer of this binding, so you certainly have the answers to my questions. |
After a closer look, I see no code except that method that can update the thing status. So setting the status to ONLINE in onItemStatusUpdate is maybe useless. |
Thank you for your feedback , I will try to answer one by one Touchwand binding invoke 'updateTouchWandUnitState' , the low level state update , on 3 different scenarios
When I implemented the binding , I thought that although scenario 3 is not mandatory , it will help , if from some reason , there is inconsistency between Touchwandhub hub units states and openhab Things states , it will be "fixed" in UnitDiscovery interval (1 minute). As I using the binding in home system, I observed that that this is not really needed since this inconsistency rarely happens (if at all). The quick fix (without rocking the boat too much ) is remove the support third scenario as it is not really needed. Regarding the OFFLINE status |
I just found this thread Another solution that I can think of is keep updates in the unit discovery and invoke updateStatus only when status change . |
Ok, let's go with uour change. |
…pire to fail (openhab#12736) * remove listeners from unit discovery Signed-off-by: Roie Geron <roie.geron@gmail.com>
…pire to fail (openhab#12736) * remove listeners from unit discovery Signed-off-by: Roie Geron <roie.geron@gmail.com> Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
…pire to fail (openhab#12736) * remove listeners from unit discovery Signed-off-by: Roie Geron <roie.geron@gmail.com>
in the current implementation the periodically task of units discovery also updated the units state invoking "updateState".
This occurs every 1 minute and update the unit state regardless if the state has changed or not (for example a switch from ON to OFF)
I assumed openhab framework will drop same state update and will not consider it as a "real" update.
This is actually the case except when using 'expire'
if the same state update occurs when 'expire' timer is on , it will never expire
Not sure if this is a bug or feature in the expire implementation , but it was an easy fix for me in the bundle .
I