Device status persistence in OH (KNX)

Hi there,

I’am somehow lost. If you’re willing to help and this questions has come up a million times already, it would be sufficient to point me to a thread.

OH is running with KNX binding and I need to send a command (a KNX telegram) from OH to a KNX device, which in turn will change it’s status accordingly. Done that already a lot of times. But now there is no readable status which I can query from the device.

So, if OH reboots, how will OH get the actual status of the KNX device after the reboot? Up to now I read all status for OH from the KNX bus at startup, to correctly visualize the status of devices. Do I have to build a “virtual KNX device” in OH and make it somehow (how?) to persist it’s current status?

Kind regards!
Carsten

So you can never be sure, anything you do at openHAB is guesswork.

It cannot, according to what you said above.

OH can “remember” a guessed state across reboots though - you should look into use of OH persistence services with restore on startup feature.
Mapdb is made for this purpose.

The said state of the KNX device will only be changed through OH’s UI. So OH will always “know” the correct state, the knowledge has only to be persisted.

After reading (which helps ;-)) again, it seems what I want to achieve can be easily done:

  1. the state can be set through a KNX telegram via OH UI
  2. the state can’t be queried from the KNX bus, so the item’s state is persisted through OH persistence
  3. the item’s state is queried on startup