Set ThingStatusInfo from Rule?


is there a way to change the ONLINE/OFFLINE state of a thing using a rule?

The background for the question is, I have zigbee2mqtt running and I get MQTT topic like zigbeebridge/thing/availability with value online/offline. If I get the topic offline I want to mark a thing as offline as some code inside oh does… is this possible?

I tried to play around with a rule that reacts on an contact item an tries do use Thing.setStatusInfo but I cannot get it to work. I always get complains about missing Enums and so on.

Thanks, Bye!

Thanks. This changes the thing state to unitialized. Is it possible to switch to OFFLINE using the rest api?

Good point.

I don’t think so; but disabled is disabled. It’s kind of the opposite to enabling - you don’t really want the Thing to go ONLINE, but instead to go through it’s initializing process first. This is under control of other software - I suppose the binding.

What problems does it bring you?