ESP8266 label change

Hmm, thanks for that. I implemented it and it works.

I used the Ikea rollerblinds that are springloaded. I removed the spring, so you cannot open it by hand (well, technically you can but it is really hard).

I’m planning to work on a different design that use a rails to open the curtains (the ‘normal’ curtains). That will use an endstop or something like that, but those you can open manually. Might have to think a bit harder about that.

Okeydoke, I just assumed there might be pushbuttons for local control or something.

That’s actually a very good idea to implement. I can create a function on the ESP that sends a mqtt signal to openhab, but how can I implement it? Is there a rule trigger for incoming mqtt messages? If yes, i think the best solution is to change the state when a certain message comes in.

No but the mqtt binding can listen to incoming messages:

itemType itemName "ItemLabel" <icon> (Group) { mqtt="<[broker:topic:state:default]" }

See:
https://www.openhab.org/addons/bindings/mqtt1/#item-configuration-for-inbound-messages

You can then trigger a rule on the item change

This what bindings do for a purpose.

You’d probably still want persistence/restore to cover the case of an OH outage/reboot, if your actor only reports changes.