Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse SmartHome » Get State of channel in ThingHandler
Get State of channel in ThingHandler [message #1697472] Thu, 04 June 2015 08:56 Go to next message
Dirk Stueben is currently offline Dirk StuebenFriend
Messages: 7
Registered: May 2015
Location: Ostfriesland, Germany
Junior Member
Hello,

is there a simple way to get the state of a specific channel inside the ThingHandler for the thing, that the channel belongs to?

My situation is the folowing: we have two channels, that belongs together one with the start time and one with the end time of a period, that must be transmitted together to the service that communicates with the devices.

In handle command we get only one at a time, we could deal with that by setting default start or end time if no previous value is defined and currently I store the start and the end time in the Thing Handler, so that they could be used for the command with the second time value. But I would prefer if we could use the already stored value instead of storing it in our class.

Best regards,

Dirk
Re: Get State of channel in ThingHandler [message #1697754 is a reply to message #1697472] Mon, 08 June 2015 08:00 Go to previous message
Dennis Nobel is currently offline Dennis NobelFriend
Messages: 166
Registered: September 2014
Senior Member
Hello Dirk,

is there a simple way to get the state of a specific channel inside the ThingHandler for the thing, that the channel belongs to?


No there is not. Channels do not even have a state. Only the item holds the state, but usually the item should not be accessed in the Binding.

But I would prefer if we could use the already stored value instead of storing it in our class.


So unfortunately (without reading the item state), there is no other way rather than store it internally in the ThingHandler instance.

Regards

Dennis
Previous Topic:Confusion about ThingHandlerFactory
Next Topic:Provide a distribution of Eclipse SmartHome based on Concierge
Goto Forum:
  


Current Time: Fri Apr 19 12:39:10 GMT 2024

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

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

Back to the top