Nice one mate. New to MQTT and it was simple to add the topic to the HA. Need to test the notifications from the camera command.I suppose that should be triggered by motion eye with a real detection and I cannot test by changing the state of the motion sensor via MQTT?
It works mate. But the motion detection is slow to trigger. Like a minute after the actual motion occurred. Is it any motion eye settings?? Would be great if you could help
Thanks for very neat and useful steps. I’ve tried the script method. I’m using IFTTT notification method till now and along side using above command. When the camera detect any motion, I get notification from IFTTT, but not from HA, instead I get a notification in notifications section that an invalid login detected from my camera IP.
-Initially used the command as is with only TOKEN replaced by token - nothing happened.
-Later removed Authorization: Bearer TOKEN and replaced with token (just like screenshot), getting login error in HA notifications section.
Good morning ,
I come back to the topic , i am still a bit confused about the final configruation.
I red many solution but i would like to understand if someone can just post the passages to perform the following actions :
motioney - when a movement is detected recall hassio which has to send a push notification on the phone.
Thanks
When you are done, open motioneye and go to your camera settings>Motion notifications and turn on both “run a command” and “run an end command”. Keep this window open and open another window with home assistant. Go to your profile (bottom left) and go to long-lived tokens at the bottom of the page. Click “Create Token”. Name it as you like, it doesnt matter and click OK. Copy the Token and dont lose it until you finish setting up Motioneye.
Now, return to Motioneye and paste this at “Run a Command”:
Thats it. Now, as long as there is motion, you will have a “binary_sensor.stairsmotionsensor” showing the motion in your interface. You can use this sensor as a trigger for your automations too.
Interesting topic, but is there any way to send back a command to MotionEye to turn off motion sensing at the source for those who are using Hassio + rpi and are slowly killing the sdcard. I mean does the motioneye container has some API for input commands? Because silencing the already triggering Motioneye in Node red or in HA automatisation is not an elegant solution .
Hi John, stumbled upon your answer while searching for an easy way to use my Unifi G3 within HA. Sadly MotionEye “forgets” my cam sometimes, showing me an empty/blank image. But when it works, your way is my new solution for now, so thanks a lot!
The token is literally just pasted in there yeah? no quotes, just as is? And keeping the leading [space]?
The HASSIOIP if I’m using HA Cloud, should I put the cloud address? I imagine not as all this should be happening within my network so IP should suffice?
I created the input_boolean via the automations>helper feature called: input_boolean.front_motion
And my template looks as below:
But it’s never changed from clear since I created it. (I know motion events are triggering as my google drive is filling up )
Think I’ll try a new long-lived access token as I keep getting notifications of failed connection attempts since I created all of this, so am wondering if I mis-copied the key.