Motioneye integration

Where do you exactly are you writing this? is this into the motion configuration section of motioneye?

Thank you so much for sharing this!!!

this custom component gives us the binary sensor for using it in automation.

raspi4 with Motioneye server – add-on in home assistant – connected the integration to localhost – all entities are working fine

thank you

btw: I love this community here, always helpful and friendly.

Is there any easy way to get motion detection from particular camera into automation?

Define easy….

I use a webhook from motioneye notification section, which triggers an automation in HA

yes, I have noticed it, but what to put in there webhook url?

so you enter something like:
http://your-home-assistant:8123/api/webhook/some_hook_id
type will be ‘post(query)’

and then create a trigger for it:

automation:
  trigger:
    - platform: webhook
      webhook_id: "some_hook_id"

I’m trying to use webhook to trigger event from my camera (motioeye) but can’t get it working:

alias: 'Auto Terace Lights '
description: Automaticaly switch light on terace from terace ptz camera motion notification
trigger:
  - platform: webhook
    webhook_id: terace
condition:
  - condition: time
    after: '18:00'
    before: '09:00'
action:
  - service: switch.turn_on
    target:
      entity_id: switch.terrace_lights
  - delay:
      hours: 0
      minutes: 5
      seconds: 0
      milliseconds: 0
  - service: switch.turn_off
    target:
      entity_id: switch.terrace_lights
mode: restart

and in motioneye I have done:
image
where address is: https://myhomeassistant:8123/api/webhook/terace

Time is 05:00 AM
Why is it not working?

two // just before api?

does not work even with one, that is typo

Do you have ssl set up? If not it is plain http://

ssl set up and works both from local address and from remote through duckdns HTTPS://

OK what happens when you run the webhook from curl?

No idea how to use curl, I run on HASSIO

I assume you mean HASSOS. Hassio no longer exists.

Presumably uoi have a computer other than your home assistant? curl is cross platform. Otherwise ssh into your hassos.

yes, that is right, what to do next?

I’m using the Core MotionEye integration. Occasionally when switches for Motion Detection or movies are toggled they switch back to the previous state in 30-60s. A few others have noticed the same thing in this thread but no solution is noted.

Has anyone fixed this issue?
Is this issue present in the more featured rich HACS custom integration?

I have the same problems sometimes the detection goes “ACTIVE” and motioneye starts the recording…

Is possible solve it?

I recently started using motionEye and I just wanted to understand if there was a reason everyone seems to still be opting to use input booleans and automations when there is now a method to have template binary sensors turn on via an event? I’ve set up the below via the motionEye integration and it is working perfectly for me - No need for any automations, just a template binary sensor…

template:
  - binary_sensor:
      name: HiLook Driveway Motion (motionEye)
      state: "true"
      device_class: motion
      auto_off: 10
    
    trigger:
      platform: event
      event_type: motioneye.motion_detected
      event_data:
        device_id: abcdefghijklmnop1234567

Hopefully this helps someone in the future or someone will come along and tell me why people haven’t opted for this method :wink:

EDIT: I’m aware that this functionality was only introduced in 2021.5 so the original guide was valid at the time of writing, just curious why people have not moved over to this method since then.

6 Likes

That’s a brilliant solution! I spent last three night to understand why motioneye doesn’t send mqtt commands. Now I changed to this approach and everything works flawlessy.

1 Like