fan on/off problem.

Moderator: leecollings

Post Reply
TSkar
Posts: 29
Joined: Wednesday 20 June 2018 16:47
Target OS: Linux
Domoticz version: 2.13055
Location: Stavanger, Norway
Contact:

fan on/off problem.

Post 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.
User avatar
HansieNL
Posts: 964
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: fan on/off problem.

Post by HansieNL »

Have you tried to add another IF which contains an equal and has no further action?
Blah blah blah
TSkar
Posts: 29
Joined: Wednesday 20 June 2018 16:47
Target OS: Linux
Domoticz version: 2.13055
Location: Stavanger, Norway
Contact:

Re: fan on/off problem.

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest