Ole8700 / openhab

Automatically exported from code.google.com/p/openhab
GNU General Public License v3.0
1 stars 0 forks source link

Homematic Binding: HM-Sec-RHS state lost #252

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

I have a HM-Sec-RHS (Rotary handle sensor) which as far a I know only sends an 
update when a change happens. When for example openHAB is restartet the state 
is lost and undefined (-) until the next change happens.

What is the expected output? What do you see instead?
Maybe openHAB should restore the last known state? But that maybe wrong too :-(

What version of the product are you using? On what operating system?

openHAB 1.2
HomeMatic LAN Adapter

Please provide any additional information below.

Let me know if you need more information.

Original issue reported on code.google.com by ingo.the...@googlemail.com on 24 Apr 2013 at 6:22

GoogleCodeExporter commented 9 years ago
As you notice yourself, it is absolutely normal that the state is unknown after 
a restart of openHAB. And using the last known state can be completely wrong, 
so this is not done as a default behavior.

Nonetheless, openHAB supports this use case through its persistence services.
Please have a look at https://code.google.com/p/openhab/wiki/Persistence
openHAB 1.2 uses rrd4j as its default persistence service, which supports the 
"restoreOnStartup" strategy. So in your rrd4j.persist file, you can decide for 
which items you want their last known state to be restored at startup (don't 
miss to add the rrd4j addon to your runtime).

Original comment by kai.openhab on 24 Apr 2013 at 2:21

GoogleCodeExporter commented 9 years ago
Actually the Binding tries to read all actual values from all configured 
devices on every config change. That should include startup as well, but 
apparently doesn't. This is a timing problem, because the CCU registering must 
have happened before and all items must be known. The latter seems to be the 
missing point.

@Kai: Could you perhaps provide me a hint from where where to call the 
queryAndSendAllActualStates method?

Original comment by thomas.letsch.de on 24 Apr 2013 at 6:35

GoogleCodeExporter commented 9 years ago
@Thomas: Is it only possible to "query and send all actual states" for ALL 
connected devices at once? Or could you also query a subset, i.e. as soon as 
the item file is read you send a query for the contained items to the CCU?

Original comment by kai.openhab on 24 Apr 2013 at 7:05

GoogleCodeExporter commented 9 years ago
@Thomas: Btw, does openHAB recognize if the CCU or the LAN Adapter were 
restarted and re-register?

Original comment by ingo.the...@googlemail.com on 24 Apr 2013 at 7:12

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
@Kai:
Thats possible with queryAndSendActualState(..). Do you already have an idea 
where to plug the querying of the devices?

@Ingo:
No, currently not. Lets open an issue for that.

Original comment by thomas.letsch.de on 19 May 2013 at 1:45

GoogleCodeExporter commented 9 years ago
As this issue is closed as rejected, let's continue discussion on state 
initialization in issue 263.

Original comment by kai.openhab on 19 May 2013 at 7:16