Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse SmartHome » Update thing status when bridge becomes online / offline
Update thing status when bridge becomes online / offline [message #1720137] Thu, 14 January 2016 16:50 Go to next message
Jan Bender is currently offline Jan BenderFriend
Messages: 3
Registered: January 2016
Junior Member
When the user is interacting with his smarthome devices, the thing status should always resemble the actual status of the devices. If a device is online, the thing status should be "online" and "offline" if the device is not connected to the network.

Implementing this behaviour might be simple if there is just one thing, but it becomes more difficult if you have multiple, hierarchically structured things. To name a few cases:

1. The bridge goes offline. In this case, all children have to be set to "offline" as well.
2. The bridge goes offline again. In this case, all children that are connected to the network must be set to "online" again.
3. A thing goes offline and must be set to offline (and vice versa).

The first and the third case are the most simple. For the first case you just check for the bridge status and all things are set to offline is the bridge is offline. For the third case you could check the thing's status every x seconds / minutes and set it status accordingly. But for the second case, you need to check if the things are connected as well and you cannot set them all to "online" automatically.

As developers, we do have to implement methods manually so that the thing status gets updated. As this is a task that have to be performed for every binding, what to you thing of adding this functionality ESH? The BaseThingHandler could hold functionality for automatically checking the status of the thing. The BaseBridgeHandler could hold similar functionality and if the bridge becomes offline again, it could call a method on the children to update their status as well.

From our point of view, such implementation would benefit all binding developers. What is your stance on this?

Best regards

Jan
Re: Update thing status when bridge becomes online / offline [message #1720146 is a reply to message #1720137] Thu, 14 January 2016 18:09 Go to previous message
Marcel Verpaalen is currently offline Marcel VerpaalenFriend
Messages: 59
Registered: September 2014
Member
Hi Jan,

This is referring to the same discussion as in topic https://www.eclipse.org/forums/index.php/t/1073429/
Unfortunately indeed we can not automatically put the bridge childs simply online again once the bridge becomes online as we don't know the actual status. Hence we change in that case the status detail from bridgeoffline to no status detail.

Indeed ideally we have a call to the thing handler so the status can easily be put online by the thinghandler, I think the main concern is that it would break the existing bindings
Previous Topic:How to filter items
Next Topic:Thing Status Listeners
Goto Forum:
  


Current Time: Thu Apr 18 03:40:55 GMT 2024

Powered by FUDForum. Page generated in 0.01533 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top