I have a small outbuilding in which I’ve installed an AC unit. I’ve connected that through an appliance module, and I have powered up and paired a thermostat in that building. I’d like to use Reactor to control the temperature of that building by comparing the current temperature in read by the thermostat to its cooling setpoint.
Currently, I’m just keeping the temperature of the building between two fixed setpoints: when CurrentTemperature goes above 82, I turn on the appliance module; when it falls below 75, I turn off the appliance module. I would like instead to have Reactor read TemperatureSetpoint1_Cool (whatever that is) and turn on the appliance module if CurrentTemperature is >1.5 degrees above… and off if Current temperature is >1.5 degrees below.
Any ideas? I haven’t used Expressions yet, but this may require I dive into that… thanks!
EDIT: I’ve been playing with Expressions, and my “Low” condition works to turn ON the AC unit… but the EXACT SAME expression on the high side is evaluated as a string, so instead of setting the variable with the value “78”, it sets the variable to “76.501.5”… that is, 76.5+1.5. This is infuriating. I’ve deleted the Expression and started over a few times. It makes no sense to me:
ShedLowTemp = getstate( "Thermostat, Shed", "urn:upnp-org:serviceId:TemperatureSetpoint1_Cool", "CurrentSetpoint" ) - 1.5
is a number, current value of 76.00.
ShedHighTemp = getstate( "Thermostat, Shed", "urn:upnp-org:serviceId:TemperatureSetpoint1_Cool", "CurrentSetpoint" ) + 1.5
is a string, current value of 75.001.5. WTF.
This works fine:
This will clearly never evaluate true:
If I type 75 into the ShedTempHigh field… it’s evaluated as a number. If I use the finder and get the device variable shown above (with or without adding 1.5), it’s a string. If I copy/paste, it’s a string. I haven’t the slightest idea why one of them is a number, and the other is a string.