Dear Nezky
With the help of the sensor factory, a sensor status can be reversed. To do so, create a factor sensor. Set the factory error handling to "Use custom formula".
This is an example in which we mirror the state of the sensor with the sensor ID 2123. There are different ways to write the inversion formula for the status, one is
10000-status(2123)
The strange number "10000" is a result of the internally used fixpoint format. A sensor status can only be 0 (up) or 10000 (down.)
In addition to the status formula, the sensor also needs a channel formula. You could just mirror any source channel, for example
#1:Source
channel(2123,0)
The data channel is just for having a channel, the important thing is the inverted status. If you put a state trigger on this sensor, it alerts when the factory sensor turns red. It will do so when the source sensor is up. The source sensor could be ping sensor.
For optimal performance, please set the factory sensor to the same scanning interval as the source sensor.
Add comment