eclipse-archived / smarthome

Eclipse SmartHome™ project
https://www.eclipse.org/smarthome/
Eclipse Public License 2.0
862 stars 787 forks source link

Persisting disabled status not working #6840

Closed tolotos-rgu closed 5 years ago

tolotos-rgu commented 5 years ago

Disabled z-wave things are enabled again after a reboot of openhab2 (v2.4.0). I think the disabled state should be stored and handled at starttime.

https://community.openhab.org/t/disable-z-wave-things/63466

kaikreuzer commented 5 years ago

Afaik, the disabled state is already persisted by the framework. Can you come up with a simple reproducible example that this is NOT the case? Something that does not require Z-Wave or other hardware for testing...

tolotos-rgu commented 5 years ago

I used disabling only for my christmas outdoor switch. I switch it to disabled and remove the switch from the power outlet and store it together with the lights. After a reboot of openhabianpi the switch is enabled.

I disabled a astro binding thing (astro moon local) and reboot my pi. The moon thing is enabled after the reboot.

5iver commented 5 years ago

In case it's in some way related, I see the same behavior with rules marked as disabled being reenabled after an OH restart. S1493 and previous.

kaikreuzer commented 5 years ago

Ok, unfortunately I can confirm the issue (seeing it with Things defined in files and with Things added through Paper UI likewise). @YordanDZhelev Are you aware of any issue with this? Is the feature working for you as expected?

YordanDZhelev commented 5 years ago

@kaikreuzer I will retest asap.

kaikreuzer commented 5 years ago

Thanks!

FStolte commented 5 years ago

Looks like we simply forgot to remove the call that deletes the disabled entry from the database on thing removal. It was originally added there to avoid orphan entries of permanently deleted disabled things, but prevents the disabled status to be persisted after a reboot.