ZUNO_THERMOSTAT - Returning temperature

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
Post Reply
DaveDotNet
Posts: 7
Joined: 05 Sep 2017 23:15

ZUNO_THERMOSTAT - Returning temperature

Post by DaveDotNet »

I've got the latest 1.4 beta and set up my ZUNO as follows:

Code: Select all

 ZUNO_THERMOSTAT(THERMOSTAT_FLAGS_OFF|THERMOSTAT_FLAGS_HEAT, THERMOSTAT_UNITS_CELSIUS, THERMOSTAT_RANGE_POS, 40, getterMode, setterMode, getterTemp, setterTemp)
My Z-UNO is talking (SoftwareSerial at 4800baud) to a PRT-N Heatmiser RS485 Thermostat, reporting/setting values. I've paired it with SmartThings and now watching messages between the two. I think I'm happy with my understanding for getterMode and setterMode in that I return THERMOSTAT_MODE_HEAT when it's in non-frost mode (on) and THERMOSTAT_MODE_OFF when it's in frost mode (off).

However, I'm not clear how the SetPoint Temperature or probe/thermostat temperature get returned. It seems that the temperature processed by getterTemp () is being set as the SetPoint temperature in SmartThings. Does the Mode that is passed to getterTemp () determine which temperature to return? Does the Mode in getterTemp () have some other function ?

Thx
p0lyg0n1
Posts: 242
Joined: 04 Aug 2016 07:14

Re: ZUNO_THERMOSTAT - Returning temperature

Post by p0lyg0n1 »

Yes, they have a mode parameter. Returns/set ups always 2bytes and one decimal precision. The prototypes for temperature destination point are:

Code: Select all

WORD thermPointGetter(BYTE mode){
  return ...;
}
void thermPointSetter(BYTE mode,WORD point){
}
You have to use zunoSendReport(channel_number), to update point on controller.
To return probe temperature add the second channel SensorMultilevel and define its getter.
DaveDotNet
Posts: 7
Joined: 05 Sep 2017 23:15

Re: ZUNO_THERMOSTAT - Returning temperature

Post by DaveDotNet »

Not sure what you mean by "point", is that the SetPoint temperature? You say use;

Code: Select all

zunoSendReport(channel_number)
to return the update point, but is that just an unsolicited SetPoint temperature again ? I want to be able to to communicate the room temperature to the controller when requested. Does ZUNO _THERMOSTAT not support returning the room temperature ? I think you're saying I have to add a SensorMultilevel to the ZUNO_THERMOSTAT ?

I have 16 thermostats, so do I also need 16 SensorMultilevel's as well?

Are there any example sketches for ZUNO_THERMOSTAT?
User avatar
PoltoS
Posts: 7624
Joined: 26 Jan 2011 19:36

Re: ZUNO_THERMOSTAT - Returning temperature

Post by PoltoS »

To report current room temperature add a Sensor Multilevel channel. Yes, you need 16 tharmostats + 16 tempetature sensors.

We will publish an example soon.
DaveDotNet
Posts: 7
Joined: 05 Sep 2017 23:15

Re: ZUNO_THERMOSTAT - Returning temperature

Post by DaveDotNet »

i Just wanted to say, that after some research and coding I now understand the concept of a ZWAVE thermostat and what you were trying to explain. I didn't realise that a ZWAVE thermostat definition is all about the SetPoint and Mode. It makes sense as the other sensors could include temperature, humidity etc, hence the reason to include a MultiSensor. Given that I'm interfacing to SmartThings, I had hoped there would be some intrinsic support, but alas it looks as though I'll have to create a (Groovy) device handler. In terms of the ZUNO defintions, is there best practice around which of the following would be preferable ?

Code: Select all

ZUNO_SETUP_CHANNELS(
  ZUNO_THERMOSTAT(THERMOSTAT_FLAGS_OFF|THERMOSTAT_FLAGS_HEAT, THERMOSTAT_UNITS_CELSIUS, THERMOSTAT_RANGE_POS, 40, getterMode1, setterMode1, getterSetPoint1, setterSetPoint1),
  ZUNO_SENSOR_MULTILEVEL_TEMPERATURE(getterTemperature1),
  ZUNO_THERMOSTAT(THERMOSTAT_FLAGS_OFF|THERMOSTAT_FLAGS_HEAT, THERMOSTAT_UNITS_CELSIUS, THERMOSTAT_RANGE_POS, 40, getterMode2, setterMode2, getterSetPoint2, setterSetPoint2),
  ZUNO_SENSOR_MULTILEVEL_TEMPERATURE(getterTemperature2)
);
or

Code: Select all

ZUNO_SETUP_CHANNELS(
  ZUNO_THERMOSTAT(THERMOSTAT_FLAGS_OFF|THERMOSTAT_FLAGS_HEAT, THERMOSTAT_UNITS_CELSIUS, THERMOSTAT_RANGE_POS, 40, getterMode1, setterMode1, getterSetPoint1, setterSetPoint1),
  ZUNO_THERMOSTAT(THERMOSTAT_FLAGS_OFF|THERMOSTAT_FLAGS_HEAT, THERMOSTAT_UNITS_CELSIUS, THERMOSTAT_RANGE_POS, 40, getterMode2, setterMode2, getterSetPoint2, setterSetPoint2),
  ZUNO_SENSOR_MULTILEVEL_TEMPERATURE(getterTemperature1),
  ZUNO_SENSOR_MULTILEVEL_TEMPERATURE(getterTemperature2)
);
I've had great success with the 4800 baud SoftwareSerial. No problems at all.
User avatar
PoltoS
Posts: 7624
Joined: 26 Jan 2011 19:36

Re: ZUNO_THERMOSTAT - Returning temperature

Post by PoltoS »

There are no preferable order of channels.
Post Reply