Sonoff motion sensor automation problem

As the title states, I purchased 2x Sonoff SNZB-03 motion sensors (I’ve only opened one at this time). I couldn’t get it to pair with my phone nor my tablet, so just moved straight to my Home Assistant (running as a VM on a Synology 920+ with DSM 7x) via the Sonoff USB Dongle+ which picked it up instantly and plopped it straight in to the Z2M add-on.

Yay!

So far…

I wrote a small automation (OK, well, I used the GUI to make it but you get my point)…

Everything seems to work fine - and running the “Run Actions” button the Automations screen for it seems to make everything run fine…

But it seems, no matter how much I throw it around, how much I wave & flap my arms around it, near or far, I’ve tried telekinesis just in case - but nothing - absolutely nothing gets it to perform the automation, with the single exception to manually clicking “Run Actions”… which, definitely defeats the purpose of home automation.

So… Any ideas?

> alias: sonoff-ms-test
> description: ''
> trigger:
>   - type: motion
>     platform: device
>     device_id: 7b3ab609f9e869d1070d0fb20c66c35f
>     entity_id: binary_sensor.0x00124b0022d0dc5d_occupancy
>     domain: binary_sensor
> condition: []
> action:
>   - service: light.turn_on
>     data:
>       color_name: blue
>     target:
>       entity_id: light.kitchen_light_3
>   - delay:
>       hours: 0
>       minutes: 0
>       seconds: 5
>       milliseconds: 0
>   - service: light.turn_off
>     data:
>       transition: 6
>     target:
>       entity_id: light.kitchen_light_3
> mode: single

The device is definitely recognised by HA within the automations page, at least…

… as well as being recognised within Z2M.

I’ve noticed within the automation it seems to identify two separate device_ids… One ending c35f and the other ending dc5d. According to the Z2M screencap, shouldn’t they both end in dc5d?

If the pir is not flashing red when it senses movement.
Try taking the battery out for 5 minutes then refit.
I had to do this with 2 i set up this weekend.

In Z2M, on the dashboard page. Does it show the correct status there? If YES, then it is something between Z2M and HA.

Thanks for both suggestions. Bizarrely, it began working after several minutes (15+) and seems to work intermittently…

pfffffft - weird.

I think I’ll probably try the refreshing the battery option…

It seems the problem wasn’t the sensor, nor HA. Instead, it was the kitchen light - it works lovely with other devices but the light & sensor just don’t seem to gel together at all.

So I moved it in to my bedroom and used it to change the bedroom lights upon detection of motion and it works flawlessly.

:slight_smile:

I have a very similar problem with a Sonoff SNZB-03 motion sensor so decided not to start a new thread

It’s connected via a Tuya hub which consistently detects and notifies of movement (even if HA doesnt) so I know the sensor is working fine

In HA Automation, movement appears to trigger but none of the Actions start. Looking in Logbook there are two entries:

Motion-activated Light in Toilet 2 turned on
12:18:12 - 13 minutes ago
Motion-activated Light in Toilet 2 became unavailable
12:18:12 - 13 minutes ago

However none of the actions were activated and since then it no longer detects movement - presumably because it’s unavailable?

Manually running the Automation all the Actions happen

Any help would be most appreciated.