Page 1 of 1

ZUNO_THERMOSTAT - Returning temperature

Posted: 24 Jun 2018 22:53
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

Re: ZUNO_THERMOSTAT - Returning temperature

Posted: 25 Jun 2018 06:07
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.

Re: ZUNO_THERMOSTAT - Returning temperature

Posted: 25 Jun 2018 23:38
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?

Re: ZUNO_THERMOSTAT - Returning temperature

Posted: 25 Jun 2018 23:47
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.

Re: ZUNO_THERMOSTAT - Returning temperature

Posted: 28 Jun 2018 22:43
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.

Re: ZUNO_THERMOSTAT - Returning temperature

Posted: 29 Jun 2018 01:21
by PoltoS
There are no preferable order of channels.