Skip to main content



      Home
Home » Archived » 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 08:16 Go to next message
Eclipse UserFriend
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 06:49 Go to previous message
Eclipse UserFriend
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: Fri May 16 14:29:21 EDT 2025

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

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

Back to the top