No automations set up yet, literally just putting the front_motion binary sensor on the front end for testing purposes. If I manually toggle the input_boolean the template sensor works correctly.
After āauthorization:ā I have a space. Try it:
āAuthorization: Bearer CODEā
If you have any problems, you can open a terminal using ssh and test the command from the machine that hosts motioneye and there you will see any errors that come up.
I honestly have no idea what this isā¦ Did you google it? Could it be a compatibility or a communication problem due to docker? I am not a docker expert, but I think that every container acts as a different machine in docker. That means that Motioneye and HASS should have different ip. That means you should ssh into the machine that has motioneye. Not HASS. And obviously not the main host that has Docker installed.
Hi
I am trying to add the motion switch in my config.
i have live feed from my camera (ffmpeg) and through motioneye addon
I have place the following in my config but the it is always off
- platform: command_line
switches:
camera_1:
command_on: 'curl -k "http://192.168.1.xxx:7999/1/detection/start"'
command_off: 'curl -k "http://192.168.1.xxx:7999/1/detection/pause"'
command_state: 'curl -s "http://192.168.1.xxx:7999/1/detection/status"'
value_template: '{{ "ACTIVE" in value }}'
friendly_name: Motion Sensor Camera LivingRoom
Should I add something in motioneye - motion notifications?
the 7999 is it a port? my camera in motioneye is at 8081 should I change it?
/1/ is my camera id
I am so extremely unsatisfied with the performance of motioneyeos (in regards to possible framerates) that I canāt imagine running it on the same device as my Hassio. At least not if it is a Raspberry.
My HA is installed in a NUC with ubuntu 18.04 desktop (supervised) so somewhere there I will find the motion.conf file, and I will run it (the curl -s ā¦) as a linux command?
Do you mind updating your original post here to NOT say it was solved using the now outdated ?api_password= ? I wasted a good bit of time trying to figure out why this wasnāt working.
This is from this post which is newer than mine and I posted my procedure to get it working. So I am pasting this here too:
I am pasting my code below and all the procedures. I hope I wont miss anything. If I do, just tell me what it is, so I will edit my post to keep this clean.
Some notes:
Names and aliases and entities and paths etc, have to be changed to match yours. I am just pasting mineā¦
My automations are split in different files, so the indentation is according to that. Dont be confused. All you have to do is to indent accordingly if you dont have your automations split as I do.
Deleted usernames or passwords or IPs will be like this: [password]
You will have to replace the brackets too
Here we go:
First of all, you have to create and whitelist the folder where the snapshots will be created.
Go to HA and open the side menu. Click on your profile picture and then go to Long-Lived
Access Tokens and create one. Copy the token and paste it in the step below.
Open motioneye and select your camera. Go to Motion Notifications and choose Run A Command .
paste this:
Now every time MotionEye will detect motion, it will trigger the script you are about to create:
Script
stairsmotion:
alias: Stairs Camera Motion Detection ON
sequence:
- service: automation.trigger
entity_id: automation.stairs_camera_snapshot
The above script, triggers an automation. The reason I am triggering the script and not the automation, is because I have more actions in my sequence, but I am only pasting the automation here.
So, the purpose here is to create a script that will do a series of actions and one of them is take a snapshot and also notify you. And now lets create the automation to get the snapshot and the notification:
Motion sensor works, but for some reason I constantly get Login attempt or request with invalid authentication from ā¦ in notifications.
I think this describes my problem.
I had the problem Login attempt or request with invalid authentication
But the reason of this was that camera had no authentication.
And the camera.yaml config had authentication: basic
Now both (camera and config) have basic authentication and the error is gone.
I canāt get passed the Login attempt or request with invalid authentication problem. I have basic authentication turned on for the Motioneye OS camera and it is set like that in config, which I think is default anyway but I added to be sure (after trying without). I have the Long-Lived Access Token and Iām using the Run Command like argykaraz detailed above. Iām guessing everything is almost correct otherwise HA OS wouldnāt be warning me of the failed login attempt.
Has anyone else had this problem and worked out what is causing it please?
The authentication settings in motioneye are just for viewing the camera from any device. It has nothing to do with this setup. So dont mind thisā¦
Next, try to open a command line from the machine that has Motioneye installed and paste the command ON or OFF in the terminal and see what the error is. This would help a lot.
I thought the authentication was a strange problem, since there access token should permit access regardless, thanks for clearing that up. Iām away from home for a while but Iāll do that when I get back. Thank you for your response.