Hello together
I'm pretty new with node red and all this stuff, so please have this in mind..
I want to set up a smart home solution with an rpi4 and a zigbee controller.
What I am looking for at the moment is a master/slave solution which accounts for
another condition but only the master.
I want to have a wifi socket that switches on if another socket is powered but (i.e. AND) only at nighttime.
The sockets are TPLink HS110, which can measure as well. So I get the power value from the master socket and switch the slave socket accordingly. So this is working.
For the nighttime-condition there is a flow which works in a simple test setup to create nodes
in relation to the time. So this works (in principle) as well.
Now I have to combine these two and this is where I am stuck.
I downloaded some other flows with an AND logic.
I tried with an inject node that checks every three seconds if a) the socket is powered and b) it is at nighttime. Afterwards both conditions should be comparted in the AND logic to switch the slave socket. But so far I could not get it running, and I've noticed that it tries to alter the status of the socket in the 3 second frequency even though there is no change.
So I figured the most logical way was that the nighttime query determines a variable and that this is taken into account for the power status of the slave socket.
Does this make any sense?
Anyway I am grateful for any working hint.
Ragards
Enrico