I wanted to use the Event Watcher to listen for a setpoint event from wall thermostat to set the valve thermostats, but I have no idea what the exact event is that Event Watcher should listen to. Actually, I don't even know if I can use the Event Watcher for this, but I've tried several events:
0x1
ThermostatSetPoint
THERMOSTAT_SETPOINT
THERMOSTAT_SETPOINT_REPORT
Custom code:
(wall therm ID : 7; valve IDs : 3,4,5)zway.devices[3].ThermostatSetPoint.Set(1,zway.devices[7].ThermostatSetPoint.data[1].val);
zway.devices[4].ThermostatSetPoint.Set(1,zway.devices[7].ThermostatSetPoint.data[1].val);
zway.devices[5].ThermostatSetPoint.Set(1,zway.devices[7].ThermostatSetPoint.data[1].val);
I expected this to set the valves thermostats, but apparently it doesn't. There is no Event Watcher triggered when the Hub receives a new setpoint from the wall thermostat.
In the meantime I have used a Code Device to check the value of the wall thermostat setpoint every 10 seconds and set that value as setpoint for the valve thermostats.
Code Device Code:
The code will take the setpoint value from the Wall Thermostat and use it to set the temperature of the valve thermostats. The command at the end will make the code return the wall thermostat setpoint value, because that’s what the Code Device expects and uses to display in the Events/Dashboard.zway.devices[3].ThermostatSetPoint.Set(1,zway.devices[7].ThermostatSetPoint.data[1].val);
zway.devices[4].ThermostatSetPoint.Set(1,zway.devices[7].ThermostatSetPoint.data[1].val);
zway.devices[5].ThermostatSetPoint.Set(1,zway.devices[7].ThermostatSetPoint.data[1].val);
zway.devices[7].ThermostatSetPoint.data[1].val.value
I don' t know if this is how a Code Device is supposed to be used, but it works However, I would still like to know/understand how to use the Event Watcher.