Page 1 of 1

LevelControl - reverse logic/regime

Posted: 06 May 2017, 11:10
by pmitev
https://www.letscontrolit.com/wiki/inde ... velControl

The documentation about the plugin assumes that the gpio/relay will be ON below the target temperature +0.5 hysteresis etc. - (heating regime)
Is it possible to reverse the logic i.e. gpio/relay OFF when below and ON when above? - (that will correspond to cooling regime)

An earlier version of the plugin had different interface, with temperature ON and temperature OFF which is enough to define target temperature, hysteresis and regime
https://www.letscontrolit.com/forum/vie ... ?f=6&t=220

Re: LevelControl - reverse logic/regime

Posted: 06 May 2017, 12:54
by toffel969
pmitev wrote: 06 May 2017, 11:10 https://www.letscontrolit.com/wiki/inde ... velControl

The documentation about the plugin assumes that the gpio/relay will be ON below the target temperature +0.5 hysteresis etc. - (heating regime)
Is it possible to reverse the logic i.e. gpio/relay OFF when below and ON when above? - (that will correspond to cooling regime)

An earlier version of the plugin had different interface, with temperature ON and temperature OFF which is enough to define target temperature, hysteresis and regime
https://www.letscontrolit.com/forum/vie ... ?f=6&t=220
I was looking for the same.

You have two options :

1. modify source code of plugin and compile espeasy yourself

In the source code, look where the GPIO is being written (some DigitalWrite...) and there swap HIGH and LOW --> Compile your own version of ESP Easy
Keep in mind, that from that day (until someone enables the reverse tick box again...) you will have to do that on every firmware update.

2. Don't use the level control
It is fairly easy to give the same functionality via the rules engine. I prefer that way, more flexible.

3. Use formula option in the temp device and use "*-1" to make the values negative. should also work

I use option two. By far the easiest.

Re: LevelControl - reverse logic/regime

Posted: 06 May 2017, 13:08
by pmitev
2. Don't use the level control
It is fairly easy to give the same functionality via the rules engine. I prefer that way, more flexible.
Indeed, this what I amusing.
3. Use formula option in the temp device and use "*-1" to make the values negative. should also work
This is really smart workaround! Thanks.