-
Notifications
You must be signed in to change notification settings - Fork 6
Motion sensor
By default, the plugin polls your dingz and WiFi motion sensor every 2 seconds for its motion state. This is a quite robust way to know what happenes, but is also quite demanding because it hammers the devices with regular poll requests which might interfere with polling the overall status of the outputs, temperature and all other other sensors.
Both dingz and myStrom WiFi motion sensors allow you to set a "push" hook which will trigger on start / stop of motion, governed by the so-called "backoff time" which defines the minimum frequency between successive motion detections. If motion is detected during this period, this time is extended by the defined value without another motion event notification.
Because of these differences, the plugin allows the user to change this behavior to either way of operation.
If you disable the "poll" mode, the dingz will send a trigger event (HTTP POST callback) when motion begins and reset the motion event when the motion timer of the dingz fires. This happens at the end of the period defined in the dingz Web UI (default: 180s), which is different from the motion state when polling the dingz. You can configure this timer via the Web UI of the dingz.
According to the API, the backoff_time
setting which governs the time until no motion is reported anymore is defined at the http://{{pir_ip}}/api/v1/settings/pir
endpoint. The default "back off" time is 180 seconds.
To change the back off time of a myStrom WiFi motion sensor you can use the following command:
curl -i -X POST -H 'Content-Type: application/json' -d '{"backoff_time":10}' http://{{pir_ip}}/api/v1/settings/pir