Page 1 of 1

fan on/off problem.

Posted: Thursday 08 April 2021 16:08
by TSkar
I got a set of scripts that is causing me grief, anyone got a idea what's wrong, or a better way to do this?

IF [ TemperatureSensor1 < TemperatureSensor2 ] AND [[ Switch = On ] AND [VirtualSwitch = On ]]
Set [ Switch = Off ]
Write to log: "Fan off"

IF [ TemperatureSensor1 > TemperatureSensor2 ] AND [[ Switch = Off ] AND [VirtualSwitch = On]]
Set [Switch = On ]
Write to log: "Fan on"

The "<" and ">" are just that, not equal-or-greater/smaller. Yet when temperature of Sensor1 and Sensor2 are exactly equal, the switch gets a insane amount of commands to turn off, wich seems to lead to network flooding and node crashing. It does not write "Fan off" in logs, it just spams Switch Off commands until node crashes.
The reason I added the VirtualSwitch check is to have a way to stop these scripts.

The temperature sensor are two Aeotek Multisensor 6's, the switch is a fibaro wall plug. It's all z-wave.
I have tried replacing the switch a few times; they tend to break after a few weeks of the treatment they get now.

Re: fan on/off problem.

Posted: Thursday 08 April 2021 19:04
by HansieNL
Have you tried to add another IF which contains an equal and has no further action?

Re: fan on/off problem.

Posted: Friday 09 April 2021 2:25
by TSkar
No.
But I will, if its still not working tomorrow!
I tried changing it to just one script, with Else If to see if that helps, and also added variables for upper and lower limit, to further avoid the problem.