Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse SmartHome » HOW TO GET BACK THE STATE OF AN ITEM
HOW TO GET BACK THE STATE OF AN ITEM [message #1781282] Mon, 05 February 2018 13:16 Go to next message
Bhavana  S is currently offline Bhavana SFriend
Messages: 4
Registered: January 2018
Junior Member
I have connected the device through xbee(cooridinator), started the server and sent the command to the device state as "ON".Now the light(item) which is connected to that device is turned "ON". When I disconnect the device and shutdown the server and then again restart it and connect the device back, the state of the light(item) is not resumed back to the previous state, as well as when I am trying to get the state of an item I am getting value "NULL".

What should I do if I have to get back the previous state of an item when I restart the server?

Whether the state of the item is persisted somewhere?
If so where is it persisted?


Re: HOW TO GET BACK THE STATE OF AN ITEM [message #1781549 is a reply to message #1781282] Thu, 08 February 2018 11:49 Go to previous message
Kai Kreuzer is currently offline Kai KreuzerFriend
Messages: 657
Registered: December 2011
Senior Member
States can be persisted by adding a PersistenceService implementation and by feeding a PersistenceServiceConfiguration into the PersistenceManager.https://github.com/eclipse/smarthome/blob/master/bundles/core/org.eclipse.smarthome.core.persistence/src/main/java/org/eclipse/smarthome/core/persistence/PersistenceManager.java#L28.

ESH currently does not come with any persistence implementation - https://github.com/eclipse/smarthome/pull/2081 is as close as we got so far.
Previous Topic:label taken from channel-type and not from overwritten channel definition
Next Topic:IDE startup and HTTP 404 http://localhost:8080/
Goto Forum:
  


Current Time: Wed Sep 19 15:35:17 GMT 2018

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

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

Back to the top