Motioneye: Turn detection on / off from Home Assistant

Hi all,

can anybody tell me if it is possible to turn on / off the motion detection in motioneye from outside (i.e. Home Assistant)?

I intend to call a webhook and then create actions in HA / Node-RED when a motion is detected. But recording will of course still hapen in motioneye and I only want to record when the HA alarm is active. So I would need a way to enable / disable the motion detection or recording in motioneye from HA.

Thanks for any ideas!

After a more intensive Google search, I found somebody doing exactly this in domotics using motioneyes HTTP REST API.

I think this will do the job. Just wanted to let everybody know who might want to achieve the same.

You could use a switch in HASS to toggle the motion sensor in motion (and not in motioneye):

  - platform: command_line
        command_on: 'curl -k ""'
        command_off: 'curl -k ""'
        command_state: 'curl -s ""'
        value_template: '{{ "ACTIVE" in value }}'
        friendly_name: Motion Sensor Camera 44

Explained here!


Cool, thank you. Will definitely try that.