Page 1 of 1

Event Watcher and Danfoss wall thermostat

Posted: 25 Dec 2016 10:32
by Apie!
I am using a Popp Hub 2 with several Popp Wireless Thermostatic Valves and a Danfoss wall thermostat.

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:
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);
(wall therm ID : 7; valve IDs : 3,4,5)
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:
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
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.
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.

Re: Event Watcher and Danfoss wall thermostat

Posted: 25 Dec 2016 16:20
by kWave
Hi,

I got the same problem with the event watcher
There are Examples for things like presence.home, but nothing about catching a devices event.
I already wrote a PM to the Developer (marcos) but didnt get a response yet.

Re: Event Watcher and Danfoss wall thermostat

Posted: 29 Dec 2016 11:51
by Apie!
Did you get it working with my Code Device solution?

I don't know if there are any differences between a regular Z-way installations and a Popp hub 2 (z-way based), but this is how I can control my valve thermostats with a Danfoss wall thermostat on my Popp Hub 2:

Code: Select all

1. Apps > Local Apps > Create Schedules to set the desired temperature of the thermostat valves. 
2. Devices > Manage
    1. Get the Device IDs of the wall thermostat and valve thermostats 
    2. You need the actual numbers without the #
        Example :
		wall therm ID : 7
		valve IDs : 3,4,5
3. My Settings > Enable Show System Apps
    1. You have to enable System Apps to show the Code Device app
4. Apps > Local Apps > Add Code Device 
    1. Type: sensorMultiLevel
    2. Code to get value:
        1. replace “valve ID” and “wall therm ID”  by their actual values in the next two steps
        2. For every valve thermostat put at the beginning of the input box : zway.devices[valveID].ThermostatSetPoint.Set(1,zway.devices[wall therm ID].ThermostatSetPoint.data[1].val);
        3. Add at the end : zway.devices[wall therm ID].ThermostatSetPoint.data[1].val.value
        4. Example :
		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
    3. Interval in seconds between polling requests : 10
    4. Don't send update event if value has not changed : checked
The creation of the Schedules is not necessary to control the valve thermostats. It will just set the temperature based on our presence during the week. I have four Schedules:

MorningOnSchedule : Every day at 06:00 21C
MorningOffSchedule : Every day at 08:00 15C
EveningOnSchedule : Every day at 16:00 21C
EveningOffSchedule : Every day at 21:00 15C

Whenever we want to deviate from the Schedules, we can use the wall thermostat. 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 your code return the wall thermostat setpoint value, because that’s what the Code Device expects and uses to display in the Events/Dashboard.
I set the Interval to 10 seconds, because I don’t see the need to do poll every second. The valve thermostats will need time to get to the desired temperature anyway, so a few more seconds won't hurt.
If you want to check if the Code Device is picking up the new setpoint from the wall thermostat, you can check the Events in the Web UI.

I would have to take a look at the source of Event Watcher figure out how it actually works, but as I already have a working solution, I'm too lazy to do that.

Re: Event Watcher and Danfoss wall thermostat

Posted: 06 Jan 2017 20:32
by PoltoS
I think you are missing .value here:
zway.devices[5].ThermostatSetPoint.Set(1,zway.devices[7].ThermostatSetPoint.data[1].val);
Should be
zway.devices[5].ThermostatSetPoint.Set(1,zway.devices[7].ThermostatSetPoint.data[1].val.value);