i am asking for support for generating a logic for a rule. I have 7 blinds that run with Homematic. So far so good. I am having an old central Gira Blinds Timer-Switch that is triggering all blinds and manually only used as switch to eventually open all blinds in the morning and close them at night, the timer functionallity is not used anymore, i have openHab rules for this. Also i am the one here in my household that uses Siri to open/close the blinds as i know that then the status in OH and homekit is correct, but i have to consider that the old switch needs to stay to please others.
What happens if the Gira switch is used, regardless if UP or DOWN:
- all Homematic blinds change the status to 50% immediately
- all Homematic blinds change the Direction channel state to UNDEFINED ( usually UP, DOWN, NONE )
Obviously the state of the blinds in openHab are messed up then and i need a rule to correct this in the UI. It would be easy if i know the previous state of the blind for sure, but that is not a matter of course. I cannot use the actual state as the level goes to 50% right away to detect the direction and stays there.
Example from the logfile:
Item 'RolladenDoppelfensterEsszimmer_1_Level' changed from 0 to 50 Item 'RolladenDoppelfensterEsszimmer_Direction' changed from NONE to UNDEFINED
Some of my thoughts to work out a rule:
- use the change to UNDEFINED of the direction channel from homematic as a trigger that the central switch was used, maybe combined with the fact that ALL 7 blinds at the same time are going to UNDEFINED ( direction channels ) and 50% LEVEL channels.
- how to define if the aim was to go UP or DOWN? It is not fixed that this is UP in the morning and DOWN at night
- compare this to a previous state of a blind? ( ideally use a couple of blinds as a reference just to increase the likeliness to figure out the aim )
- level states of my 7 blinds can be different from various reasons, e.g. from shading over day and a click on UP on the Gira switch in the late afternoon…
I am a bit stuck in my logic here and would appreciate if the community has some ideas.
I hope i have given all information needed.