Remotec Z-Thermostat (configuration with Z-Wave Commands)

Hi Dennis

I got it working in Degrees C thank you :slight_smile:
I changed all the “F” to “C” in the code, and changed all the scale 1 (F) to scale 0 ( C) or could use Scale 2 to use the setting from the device (which i had to degrees C)
Also instead of using either of the above, i also tried unit: getTemperatureScale() which also works.

Then the device started to respond with 2 temperatures, e.g. 20C and 41C which had me confused for a while, as 41F is 5C so I thought it was also returning the min temp setting. But then i realised it was reporting Humidity in C as the code didn’t have the capability to deal with humidity so reported it as C instead. So added capability “Relative Humidity Measurement” and sure enough the device reported 41 with a unit of “%” .

I extracted some code from here thanks to Minollo :slight_smile: and used the code from there to add a tile for humidity :

  •    valueTile("humidity", "device.humidity", width: 2, height: 2) {
     	state("humidity", label:'${currentValue}°', unit:"%"
    

and

    def zwaveEvent(physicalgraph.zwave.commands.sensormultilevelv3.SensorMultilevelReport cmd)
   {
     log.debug "SensorMultilevelReport ${cmd}"
   	def map = [:]
   	switch (cmd.sensorType) {
   		case 1:
   			// temperature
   			map.value = cmd.scaledSensorValue.toString()
   			map.unit = cmd.scale == 1 ? "F" : "C"
   			map.name = "temperature"
   			break;
   		case 5:
   			// humidity
   			map.value = cmd.scaledSensorValue.toInteger().toString()
   			map.unit = "%"
   			map.name = "humidity"
   			break;
   	}
       map
   }

Thanks a lot for the pointer to get me started , finally got it all working in C also with humidity :slight_smile:
Nige.

1 Like