Out of the box this device registers as a “Smartsense Moisture” type device but it does not get you the temperature reports. From looking at the device documentation it’s clear that the device needs to be programmed before it will send out the temperature reports. Starting with the Smartsense Moisture type I made a couple to changes to get this to work.
- I needed to add a tile to send a command to set the wakeup interval to 4 hours, this is the default value but when you program this entry the device starts to send temperature reports to the controller that programmed it. Adding a new tile:
standardTile("refresh", "device.switch", inactiveLabel: false, decoration: "flat") {
state "default", label:'', action:"refresh.refresh", icon:"st.secondary.refresh"
}
def refresh() {
zwave.wakeUpV2.wakeUpIntervalSet(seconds:4 * 3600,
nodeid:zwaveHubNodeId).format()
}
when the device is awake (I think). I just pressed the one button on the device that wakes it up and then hit my new “refresh” button from the App.
- While parsing you will have to look for V2 version of the multi-level report. So, edited a line in the “parse” function
def parsedZwEvent = zwave.parse(description, [0x30: 1, 0x71: 2, 0x84: 1, 0x31: 2])
Added the last “0x31: 2” part of it.
- Added a zwave event function for the temperature report
def zwaveEvent(physicalgraph.zwave.commands.sensormultilevelv2.SensorMultilevelReport cmd)
{
def map = [:]
switch (cmd.sensorType) {
case 1:
// temperature
def cmdScale = cmd.scale == 1 ? "F" : "C"
map.value = convertTemperatureIfNeeded(cmd.scaledSensorValue, cmdScale, cmd.precision)
map.unit = getTemperatureScale()
map.name = "temp"
break;
}
map
}
- Finally, added a tile for this new value and added it to the Details page
valueTile("temp", "device.temp", inactiveLabel: false) {
state "temp", label:'${currentValue}°'
}
details(["water", "temperature", "battery", "refresh", "temp"])
Pardon the formatting, this form seems to have a mind of its own and I don’t have the time to clean this up now.