Philips Hue Motion Sensor - Adjusting frequency / interval of checks

I have a Philips Hue Motion Sensor (Outdoor) and use this DTH - hueMotionSensor/hue-motion-sensor.groovy at master · bogdanalexe90/hueMotionSensor · GitHub

Thanks to the person who created this DTH. It had been very useful.

I notice from events that the default DTH configuration is set to poll for temperature, illuminance data frequently (every 5 minutes or so). I have pasted below a snapshot of the events as seen in the IDE.

I have 2 questions.

  1. Am I right to understand that by keeping the polling interval higher when there is no motion (i.e. more spaced apart), it could potentially extend battery life on the Hue Sensor ?
  2. Assuming the answer to above question is yes, can anyone help me with what configuration changes need to be done in the groovy file to make the temperature/illuminance polling (when there is no motion) to say 1 hour intervals instead of every 5 minutes or so. I tried changing the configuration parameters in the file to “3600” seconds, but that doesn’t seem to have taken effect. Made me wonder if I updated the wrong parameters. Have pasted below the CONFIGURATION as it is currently (my edited version with 3600 seconds)

EVENTS

2022-10-15 9:20:19.000 AM illuminance 205
2022-10-15 9:15:22.000 AM illuminance 204
2022-10-15 9:10:25.000 AM illuminance 202
2022-10-15 9:05:55.000 AM temperature 13.0
2022-10-15 9:05:29.000 AM illuminance 199
2022-10-15 9:00:58.000 AM temperature 12.7
2022-10-15 9:00:32.000 AM illuminance 196
2022-10-15 8:55:35.000 AM illuminance 192
2022-10-15 8:51:05.000 AM temperature 12.5
2022-10-15 8:50:39.000 AM illuminance 189
2022-10-15 8:46:08.000 AM temperature 12.7
2022-10-15 8:45:42.000 AM illuminance 180
2022-10-15 8:40:45.000 AM illuminance 181
2022-10-15 8:35:49.000 AM illuminance 173
2022-10-15 8:30:52.000 AM illuminance 166
2022-10-15 8:26:22.000 AM temperature 12.2
2022-10-15 8:25:55.000 AM illuminance 161

CONFIGURATION (as edited by me to change default max time to 3600 seconds)

CONFIGURATION within groovy file

def configure() {
log.info “### Configure”

// Device-Watch allows 2 check-in misses from device + ping (plus 1 min lag time)
// enrolls with default periodic reporting until newer 5 min interval is confirmed
sendCheckIntervalEvent(2 * 60 * 60 + 1 * 60)

// Configure reporting interval if no activity
//    - motion - minReportTime 1 seconds, maxReportTime 5 min
//    - illuminance - minReportTime 5 seconds, maxReportTime 5 min 
//    - temperature - minReportTime 10 seconds, maxReportTime 5 min
//    - battery - minReport 120 min, maxReportTime 120 min 
def configCmds = [
    zigbee.configureReporting(MOTION_ALERT_CLUSTER, MOTION_ALERT_VALUE, DataType.BITMAP8, 1, 3600, null),
    zigbee.configureReporting(ILLUMINANCE_MEASUREMENT_CLUSTER, ILLUMINANCE_MEASURE_VALUE, DataType.UINT16, 5, 3600, 1000),
    zigbee.temperatureConfig(10, 3600, 5),
    zigbee.batteryConfig(7200, 7200, 0)
]

Thanks i n advance.

Unfortunately, Groovy and IDE are in the process of being phased out by December 31, 2022.

You should look at one of the Edge Driver alternatives at this point.

Also check out CLI.

1 Like