[RELEASE] Philio PAT02-B Temperature / Humidity driver

If anyone is interested, I have a driver for the Philio PAT02-B Temperature / Humidity sensor that I've done. It works with both the secure and non-secure versions of the device. Comments / code review welcome.

Code can be found here: https://github.com/dennypage/hubitat

Thanks,
Denny

The driver has been updated to version 1.1.0, which adds reporting of hardware, firmware and protocol versions for the PAT02-B.

The driver has been updated to version 1.2.0, which adds support for setting the wakeup interval.

1 Like

I try to move 2 PAT02-A Devices (incl. water sensor) from Vera. For me, this driver works well for humidity and temperature.
But unfortunately, the Battery status in the device shows 255%.

Many thanks.

I tried to add the water sensor and built the following additions into the driver:

capability "Water Sensor"

in def configure()
def request = []
request << zwave.sensorBinaryV2.sensorBinaryGet(sensorType: 8) //waterSensor

def zwaveEvent(hubitat.zwave.commands.sensorbinaryv2.SensorBinaryReport cmd) {
if (logEnable) log.debug "PST02: SensorBinaryReport ${cmd.toString()}"
def map = [:]

map.name = "waterSensor"
if (logEnable) log.debug "PST02 cmd.sensorValue: ${cmd.sensorValue}"
if (cmd.sensorValue.toInteger() > 0 ) {
	if (logEnable) log.info "PST02 wet"
	map.value = "wet"
	map.descriptionText = "$device.displayName is wet"
} else {
	if (logEnable) log.info "PST02 dry"
	map.value = "dry"
	map.descriptionText = "$device.displayName is dry"
}
sendEvent(map)
if (txtEnable) log.info "${map.descriptionText}"

}

  1. with BasicZwaveTool: Set Parameter 7 to 18.

I'm very new to Hubtitat, so I don't really understand what I've done. But the water sensor seems now to work for me. Of course, it would be much better, if you could professionally include the functionality in your driver.

Yes, unfortunately the driver doesn't deal with 255 properly. I'll look to fix that.

Btw, 255 means that the battery level is critically low and should be replaced.

1 Like

Thank you. I replaced the battery and now I see 100%.

I don't have a PAT02-A. Would you mind sending me the contents of the Data section in Device Details for one of your PAT02-A devices please? Thanks.

I pushed an update that fixes the low battery indication. Version 1.5.1.

Here is a copy of the Data section:

  • deviceType: 2
  • deviceId: 31
  • manufacturer: 316
  • zwaveSecurePairingComplete: true
  • inClusters: 0x5E,0x72,0x86,0x59,0x73,0x5A,0x8F,0x98,0x7A
  • zwNodeInfo: 53 9C 80 04 07 01 5E 72 86 59 73 5A 8F 98 7A EF 20 68 23 F1 00 80 71 85 5C 70 30 31 84
  • outClusters: 0x20
  • secureInClusters: 0x80,0x71,0x85,0x70,0x30,0x31,0x84
  • zwNNUR: 7
  • protocolVersion: 4.5
  • hardwareVersion: 1
  • firmwareVersion: 1.8
  • zwWakeupInterval: 36000
  • S2: 128
1 Like

I've imported the update and replaced the new battery with the old.
In the Log I now see "low battery". But in the device "current states" there still is battery:255. In the RM conditions I see the value 255.

I pushed a fix to use 1 as the value for low battery alert rather than 0. Thanks.

Thank you, but the issue seems unchanged.
Here is the log:
dev:4182022-05-26 10:31:41.538 am info_znNassFeuchtTemp_Waschr: humidity is 46.35%
dev:4182022-05-26 10:31:41.536 am debug_znNassFeuchtTemp_Waschr humidity sensor value is 46.35%
dev:4182022-05-26 10:31:41.280 am info_znNassFeuchtTemp_Waschr: temperature is 24.86°C
dev:4182022-05-26 10:31:41.278 am debug_znNassFeuchtTemp_Waschr temperature sensor value is 24.86°C (24.86°C)
dev:4182022-05-26 10:31:41.046 am info_znNassFeuchtTemp_Waschr: battery is 255%
dev:4182022-05-26 10:31:41.044 am warn_znNassFeuchtTemp_Waschr low battery
dev:4182022-05-26 10:31:40.802 am debug_znNassFeuchtTemp_Waschr wakup interval 600 minutes
dev:4182022-05-26 10:31:40.271 am debugConfigurationReport: ConfigurationReport(parameterNumber: 14, size: 1, configurationValue: [12], scaledConfigurationValue: 12)
dev:4182022-05-26 10:31:39.770 am debugConfigurationReport: ConfigurationReport(parameterNumber: 13, size: 1, configurationValue: [12], scaledConfigurationValue: 12)
dev:4182022-05-26 10:31:39.268 am debugConfigurationReport: ConfigurationReport(parameterNumber: 10, size: 1, configurationValue: [12], scaledConfigurationValue: 12)
dev:4182022-05-26 10:31:38.784 am debugConfigurationReport: ConfigurationReport(parameterNumber: 20, size: 1, configurationValue: [30], scaledConfigurationValue: 30)
dev:4182022-05-26 10:31:38.264 am debugConfigurationReport: ConfigurationReport(parameterNumber: 23, size: 1, configurationValue: [5], scaledConfigurationValue: 5)
dev:4182022-05-26 10:31:37.768 am debugConfigurationReport: ConfigurationReport(parameterNumber: 21, size: 1, configurationValue: [1], scaledConfigurationValue: 1)
dev:4182022-05-26 10:31:37.258 am debugVersionReport: VersionReport(zWaveLibraryType:3, zWaveProtocolVersion:4, zWaveProtocolSubVersion:5, firmware0Version:1, firmware0SubVersion:8, hardwareVersion:1, firmwareTargets:1, targetVersions:[[target:1, version:1, subVersion:6]])
dev:4182022-05-26 10:31:37.133 am warnUpdating device wakeUpInterval: 600
dev:4182022-05-26 10:31:37.129 am warnUpdating device humidityInterval: 12
dev:4182022-05-26 10:31:37.126 am warnUpdating device temperatureInterval: 12
dev:4182022-05-26 10:31:37.122 am warnUpdating device batteryInterval: 12
dev:4182022-05-26 10:31:37.119 am warnUpdating device tickInterval: 30
dev:4182022-05-26 10:31:37.114 am warnUpdating device humidityDifferential: 5
dev:4182022-05-26 10:31:37.110 am warnUpdating device temperatureDifferential: 1
dev:4182022-05-26 10:31:37.108 am debugdeviceSync: pendingResync true, pendingRefresh true
dev:4182022-05-26 10:31:36.885 am debugReceived WakeUpNotification
dev:4182022-05-26 10:31:34.729 am warnUnhandled cmd: SensorBinaryReport(sensorValue:255, sensorType:8)
dev:4182022-05-26 10:31:12.440 am warnConfiguration will resync when device wakes up

I rushed and made a rather stupid mistake. Sorry about that. 1.5.3 is available.

1 Like

I have enhanced the driver for generic PAT02 support, which should work with all the A/B/C versions. You can find an initial version of the generic driver here. I would appreciate it if you could test it on your PAT02-A for me. Thanks!

Now it works. The low battery is now reported with 1.
Thank you!

unfortunately the flood sensor doesn't work (and isn't shown in the device edit page). Here is the log:
dev:4182022-05-26 08:58:21.592 pm info_znNassFeuchtTemp_Waschr: humidity is 48.06%

dev:4182022-05-26 08:58:21.590 pm debug_znNassFeuchtTemp_Waschr humidity sensor value is 48.06%

dev:4182022-05-26 08:58:21.578 pm info_znNassFeuchtTemp_Waschr: temperature is 25.31°C

dev:4182022-05-26 08:58:21.576 pm debug_znNassFeuchtTemp_Waschr temperature sensor value is 77.55°F (25.31°C)

dev:4182022-05-26 08:58:21.516 pm warnUnhandled cmd: SensorBinaryReport(sensorValue:0, sensorType:6)

dev:4182022-05-26 08:58:21.453 pm info_znNassFeuchtTemp_Waschr: battery is 31%

dev:4182022-05-26 08:58:21.196 pm info_znNassFeuchtTemp_Waschr: humidity is 48.06%

dev:4182022-05-26 08:58:21.194 pm debug_znNassFeuchtTemp_Waschr humidity sensor value is 48.06%

dev:4182022-05-26 08:58:21.178 pm info_znNassFeuchtTemp_Waschr: temperature is 25.31°C

dev:4182022-05-26 08:58:21.176 pm debug_znNassFeuchtTemp_Waschr temperature sensor value is 77.55°F (25.31°C)

dev:4182022-05-26 08:58:21.116 pm warnUnhandled cmd: SensorBinaryReport(sensorValue:255, sensorType:6)

dev:4182022-05-26 08:58:21.057 pm info_znNassFeuchtTemp_Waschr: battery is 33%

dev:4182022-05-26 08:58:16.472 pm info_znNassFeuchtTemp_Waschr: humidity is 47.09%

dev:4182022-05-26 08:58:16.469 pm debug_znNassFeuchtTemp_Waschr humidity sensor value is 47.09%

dev:4182022-05-26 08:58:16.220 pm info_znNassFeuchtTemp_Waschr: temperature is 25.30°C

dev:4182022-05-26 08:58:16.218 pm debug_znNassFeuchtTemp_Waschr temperature sensor value is 25.30°C (25.30°C)

dev:4182022-05-26 08:58:15.975 pm info_znNassFeuchtTemp_Waschr: battery is 33%

dev:4182022-05-26 08:58:15.721 pm debug_znNassFeuchtTemp_Waschr wakup interval 600 minutes

dev:4182022-05-26 08:58:15.199 pm debugConfigurationReport: ConfigurationReport(parameterNumber: 15, size: 1, configurationValue: [12], scaledConfigurationValue: 12)

dev:4182022-05-26 08:58:14.710 pm debugConfigurationReport: ConfigurationReport(parameterNumber: 14, size: 1, configurationValue: [12], scaledConfigurationValue: 12)

dev:4182022-05-26 08:58:14.195 pm debugConfigurationReport: ConfigurationReport(parameterNumber: 13, size: 1, configurationValue: [12], scaledConfigurationValue: 12)

dev:4182022-05-26 08:58:13.689 pm debugConfigurationReport: ConfigurationReport(parameterNumber: 10, size: 1, configurationValue: [12], scaledConfigurationValue: 12)

dev:4182022-05-26 08:58:13.186 pm debugConfigurationReport: ConfigurationReport(parameterNumber: 20, size: 1, configurationValue: [30], scaledConfigurationValue: 30)

dev:4182022-05-26 08:58:12.682 pm debugConfigurationReport: ConfigurationReport(parameterNumber: 23, size: 1, configurationValue: [5], scaledConfigurationValue: 5)

dev:4182022-05-26 08:58:12.193 pm debugConfigurationReport: ConfigurationReport(parameterNumber: 21, size: 1, configurationValue: [1], scaledConfigurationValue: 1)

dev:4182022-05-26 08:58:11.731 pm debugVersionReport: VersionReport(zWaveLibraryType:3, zWaveProtocolVersion:4, zWaveProtocolSubVersion:5, firmware0Version:1, firmware0SubVersion:8, hardwareVersion:1, firmwareTargets:1, targetVersions:[[target:1, version:1, subVersion:6]])

dev:4182022-05-26 08:58:11.538 pm warnUpdating device wakeUpInterval: 600

dev:4182022-05-26 08:58:11.534 pm warnUpdating device waterInterval: 12

dev:4182022-05-26 08:58:11.531 pm warnUpdating device humidityInterval: 12

dev:4182022-05-26 08:58:11.527 pm warnUpdating device temperatureInterval: 12

dev:4182022-05-26 08:58:11.523 pm warnUpdating device batteryInterval: 12

dev:4182022-05-26 08:58:11.520 pm warnUpdating device tickInterval: 30

dev:4182022-05-26 08:58:11.516 pm warnUpdating device humidityDifferential: 5

dev:4182022-05-26 08:58:11.513 pm warnUpdating device temperatureDifferential: 1

dev:4182022-05-26 08:58:11.511 pm debugdeviceSync: pendingResync true, pendingRefresh true

I expect it would show up with the next water report interval. I added a poll for the water sensor to the refresh command which hopefully will cause it to show up as soon as the device wakes up.

It's hard to do this without a device in hand to test--I really appreciate your testing. Thanks.

I'm glad to support you.

No change till now. The new driver version also doesn't change the behavior.

After closing the flood sensor the log still shows:
[warn] unhandled cmd: SensorBinaryReport(sensorValue:0, sensorType:6)

Is it possible, the WaterSensor sends a SensorBinaryReport (according to the default setting of Parameter 7) and you expect a NotificationReport?

1 Like

The documentation for the older firmware says that it sends Sensor Binary Report and Notification Report, however the documentation for the new firmware says it only sends Notification Report only (bit 4 in parameter is now "reserved"). The older documentation says that bit 4 defaults to 0 (use Notification Report). Did you set parameter 7 explicitly? Or perhaps the driver on the Vera did?

I don't want to arbitrarily set bits in parameter 7, so I've added added handling of Sensor Binary Report and some additional debug output. Please enable debug logging on the device page before testing. Thanks.

1 Like

Maybe Vera had changed parameter 7. As far as I remember, Vera used the Sensor Binary Report. I've tried to make a factory reset before including the device in Hubitat. But not sure, if this really worked and if this really has reset parameter 7.

Now the driver works well!
After the first closing of the flood contact, under "current states", "water:dry" appeared. The events are created and trigger RM.
Thank you for your patience and your help!
Here is the log.
info_znNassFeuchtTemp_Waschr: humidity is 41.46%
debug_znNassFeuchtTemp_Waschr humidity sensor value is 41.46%
debugSensorMultilevelReport: SensorMultilevelReport(precision:2, scale:0, sensorType:5, sensorValue:[16, 50], size:2, scaledSensorValue:41.46)
info_znNassFeuchtTemp_Waschr: temperature is 27.07°C
debug_znNassFeuchtTemp_Waschr temperature sensor value is 80.72°F (27.07°C)
info_znNassFeuchtTemp_Waschr: sensor is dry
debugSensorMultilevelReport: SensorMultilevelReport(precision:2, scale:1, sensorType:1, sensorValue:[31, 136], size:2, scaledSensorValue:80.72)
info_znNassFeuchtTemp_Waschr: battery is 33%
debugSensorBinaryReport: SensorBinaryReport(sensorValue:0, sensorType:6)
debugBatteryReport: BatteryReport(batteryLevel:33)
info_znNassFeuchtTemp_Waschr: temperature is 27.07°C
info_znNassFeuchtTemp_Waschr: battery is 35%
info_znNassFeuchtTemp_Waschr: humidity is 41.46%
debug_znNassFeuchtTemp_Waschr humidity sensor value is 41.46%
debugBatteryReport: BatteryReport(batteryLevel:35)
debugSensorMultilevelReport: SensorMultilevelReport(precision:2, scale:0, sensorType:5, sensorValue:[16, 50], size:2, scaledSensorValue:41.46)
debug_znNassFeuchtTemp_Waschr temperature sensor value is 80.72°F (27.07°C)
info_znNassFeuchtTemp_Waschr: sensor is wet
debugSensorMultilevelReport: SensorMultilevelReport(precision:2, scale:1, sensorType:1, sensorValue:[31, 136], size:2, scaledSensorValue:80.72)
debugSensorBinaryReport: SensorBinaryReport(sensorValue:255, sensorType:6)
info_znNassFeuchtTemp_Waschr: humidity is 41.46%
debug_znNassFeuchtTemp_Waschr humidity sensor value is 41.46%
debugSensorMultilevelReport: SensorMultilevelReport(precision:2, scale:0, sensorType:5, sensorValue:[16, 50], size:2, scaledSensorValue:41.46)
-- close flood contact
debug_znNassFeuchtTemp_Waschr wakup interval 600 minutes
debugConfigurationReport: ConfigurationReport(parameterNumber: 15, size: 1, configurationValue: [12], scaledConfigurationValue: 12)
debugConfigurationReport: ConfigurationReport(parameterNumber: 14, size: 1, configurationValue: [12], scaledConfigurationValue: 12)
debugConfigurationReport: ConfigurationReport(parameterNumber: 13, size: 1, configurationValue: [12], scaledConfigurationValue: 12)
debugConfigurationReport: ConfigurationReport(parameterNumber: 10, size: 1, configurationValue: [12], scaledConfigurationValue: 12)
debugConfigurationReport: ConfigurationReport(parameterNumber: 20, size: 1, configurationValue: [30], scaledConfigurationValue: 30)
debugConfigurationReport: ConfigurationReport(parameterNumber: 23, size: 1, configurationValue: [5], scaledConfigurationValue: 5)
debugConfigurationReport: ConfigurationReport(parameterNumber: 21, size: 1, configurationValue: [1], scaledConfigurationValue: 1)
debugVersionReport: VersionReport(zWaveLibraryType:3, zWaveProtocolVersion:4, zWaveProtocolSubVersion:5, firmware0Version:1, firmware0SubVersion:8, hardwareVersion:1, firmwareTargets:1, targetVersions:[[target:1, version:1, subVersion:6]])
warnUpdating device wakeUpInterval: 600
warnUpdating device waterInterval: 12
warnUpdating device humidityInterval: 12
warnUpdating device temperatureInterval: 12
warnUpdating device batteryInterval: 12
warnUpdating device tickInterval: 30
warnUpdating device humidityDifferential: 5
warnUpdating device temperatureDifferential: 1
debugdeviceSync: pendingResync true, pendingRefresh false
debugReceived WakeUpNotification
debugUnknown SensorBinaryReport: SensorBinaryReport(sensorValue:255, sensorType:8)
debugSensorBinaryReport: SensorBinaryReport(sensorValue:255, sensorType:8)
warnConfiguration will resync when device wakes up

1 Like