rossko57
(Rossko57)
March 20, 2017, 10:53pm
15
I don’t know what SP is (set point?), I don’t know what blocks are, I don’t know what you are trying to achieve.
I’m guessing you want to write a rule that acts as a thermostat? You have some temperature measurement as a Number item, and you have a Switch item that simply turns a heater on or off?
Ok I solved the problem, but I still do not understand why the following code work while the previous one does not
rule "heating water thermostat"
when
Item B_Temperature_Water_Setpoint changed or
Item B_Temperature_tgS_heating_water changed
then
var Number cur_temp = B_Temperature_tgS_heating_water.state
var Number setpoint = B_Temperature_Water_Setpoint.state
val hysteresis = 0.5
if ((cur_temp).floatValue < ((setpoint).floatValue - hysteresis)) {
if (boiler_outb…
OK so I’ve identified one issue and now the rule executes the problem now, is when it executes, from the OH terminal I get:
2016-12-14 18:09:33.762 [ERROR] [o.o.c.s.ScriptExecutionThread ] - Error during the execution of rule ‘Maintain Heat’: The name ’ <= ’ cannot be resolved to an item or type.
I’ve changed the rule, it’s now written like this:
rule "Maintain Heat"
when
Item temperature1 received update
then
//if (TstatEnable.state == ON){
if (temperature1 <= TSsetpoint){
se…
I had a need to control electric heaters via thermostat. I built a virtual thermostat consisting of a temp sensor (Fibaro Universal Binary Sensor FGBS0001 + DS18B20), z-wave switch/socket and some OH rules. DS18B20 temp sensor is either attached to the heater (if I want to control the heater temp, like the for towel hanger in the bathroom), embedded in floor (for floor heating) or is measuring ambient temperature.
There are four items per each virtual thermostat:
Sensor:
Number Sensor_Temp_To…