Skip to content

Motion sensor

Johann Richard edited this page Nov 29, 2020 · 5 revisions

Push vs. Poll

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 a motion is detected during this period, this time is extended by the defined value without another motion event notification.

The plugin can also poll your dingz and WiFi motion sensor (there's as setting for that) every 2 seconds for its motion state. This is a quite robust way to know what happens 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 sensors.

Because of these differences, the plugin allows the user to change this behaviour to either way of operation.

dingz

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.

myStrom WiFi motion sensor

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

Clone this wiki locally