I am very happy with the Xiaomi PIR as well. Good sensor with fast response time. And the battery seems to last very long.
I created a timer on HA so every time my Xiaomi is detecting movement it is turning on the lights and starts a countdown timer. The timer can be set to any interval so you can save on the light )
My problem still to solve is when i return on the stairs area just before the timer goes to 0. The HA is not setting the timer to my standard 60 seconds so I will be in the dark if I am passing the sensor just before the light turning off.
The WirelessTag PIR worked very reliably for me. Unfortunately, the Tag Manager didn’t last long - poor build quality it seems. So this is a not-recommendation from me.
That is why I just trigger on on/off signal (movement detected, no movement). It takes cca 1 minute for Xiaomi to go from detected to no movement, but that way I avoid the problem you have. And it’s easier to handle power bill for a few minutes of low power LED lamps that wife walking down the stairways in the dark:)
Well if that’s the case, then go for it and report back:) Shelly sense would be quite expensive for me, since I need 10-15 motion sensors and only motion sensors, so Xiaomi is the way for me.
Just to follow up on then. When movement is detected, a MQTT message is sent telling HA that he detected movement and that the current illumination is so and so. So when the automation runs, it already has all the latest data, so everything works. This is fine by me. But if you want to have constant illumination report, then Xiaomi sensor is not a good choice.
Thank you. However, you have the same problem if you pass by the PIR in the first minute … since it is not going to see you once triggered … Or I did not understand well?
The motion sensor will still see you during that minute, it simply resets the 1 minute timer so it will still be telling HA that it has detected motion, then 1 minute after the motion stops it sends a ‘no-motion’ status to HA
2019-01-05 14:53:10 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/homeassistant/setup.py", line 56, in async_setup_component
return await task # type: ignore
File "/usr/local/lib/python3.6/site-packages/homeassistant/setup.py", line 103, in _async_setup_component
component = loader.get_component(hass, domain)
File "/usr/local/lib/python3.6/site-packages/homeassistant/loader.py", line 92, in get_component
module = importlib.import_module(path)
File "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 674, in exec_module
File "<frozen importlib._bootstrap_external>", line 781, in get_code
File "<frozen importlib._bootstrap_external>", line 741, in source_to_code
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/config/custom_components/lightingsm.py", line 7
<!DOCTYPE html>
^
SyntaxError: invalid syntax
Ahhh ops, I was downloading the file from my smartphone, still do not know how to correctly downloa/copy file from github and uploading to /config using my smartphone
Just tested with a 433 motion sensor. Works fine, but after a second trigger the expires_at and reset_at are correctly updated, but the last_triggered_at stays the same, is it intended?
Very cool app, I think with the right settings no more lights off when people are in a room!
Thanks again for the component, I am playing with it right now.
Is it possible to use also the lux sensor as trigger? I mean motion AND lux level (below a threshhold for those grey/dark days, during the day) to trigger a light