Domoticz able to activate motionEye motion detection

In this subforum you can show projects you have made, or you are busy with. Please create your own topic.
Post Reply
User avatar
Antori91
Posts: 108
Joined: Sunday 12 February 2017 18:12
Target OS: NAS (Synology & others)
Domoticz version: 4.97&3.5
Location: France
Contact:

Domoticz able to activate motionEye motion detection

Post by Antori91 » Saturday 03 March 2018 15:31

Hello,

I've just finished setting up motionEye for camera management in addition to Domoticz. It's great...
- 100% web mode (without install of plugin / applet / dll) with traditional browser or smartphone, all cameras are displayed whatever the brand of the camera,
- motion detection feature integrated into the software (more configurable than the native functions embedded in the cameras) with alert emails sending or others stuff,
- and...activation / unactivation of this motionEye detection feature from Domoticz. When I activate my alarm appliance using the Domoticz SecurityPanel for example, my wired alarm is armed but ... also all the cameras, i.e. the Motion/MotionEye motion detection, which was before in pause mode, is activated. ** The trick (I use) is to use the motion HTTP API and to modify the threshold parameters of all my motion camera threads **.

In terms of resources required for motionEye, after many tests, I am about 3% CPU per camera and 200 Kbs for LAN/WAN bandwidth per camera. I use VGA resolution within motion/motionEye.
motionHTTP_API_Threshold.JPG
motionHTTP_API_Threshold.JPG (80.66 KiB) Viewed 2539 times
Web_MotionEye - Copie.JPG
Web_MotionEye - Copie.JPG (367.81 KiB) Viewed 2539 times
Mobile_Screenshot_motionEye - Copie.JPG
Mobile_Screenshot_motionEye - Copie.JPG (134.57 KiB) Viewed 2539 times
Last edited by Antori91 on Saturday 03 March 2018 16:31, edited 3 times in total.
Domoticz High Availability Cluster: Synology Dz V3.5877 (Main) - Raspberry Dz V4.97 (Backup) - Scripts Node.js
Alarm server: Raspberry - motionEye - iot_ALARM-SVR Node.js
Sensors/Actuators: ESP8266-Arduino
https://github.com/Antori91/Home_Automation

User avatar
Antori91
Posts: 108
Joined: Sunday 12 February 2017 18:12
Target OS: NAS (Synology & others)
Domoticz version: 4.97&3.5
Location: France
Contact:

Re: Domoticz able to activate motionEye motion detection

Post by Antori91 » Saturday 03 March 2018 15:47

Using a script, all my motionEye cameras threads are also automatically activated or unactivated when I switch On/Off my alarm appliance using the security panel.
Detection Activated.JPG
Detection Activated.JPG (255.49 KiB) Viewed 2529 times
Domoticz High Availability Cluster: Synology Dz V3.5877 (Main) - Raspberry Dz V4.97 (Backup) - Scripts Node.js
Alarm server: Raspberry - motionEye - iot_ALARM-SVR Node.js
Sensors/Actuators: ESP8266-Arduino
https://github.com/Antori91/Home_Automation

User avatar
EdddieN
Posts: 543
Joined: Wednesday 16 November 2016 12:31
Target OS: Raspberry Pi
Domoticz version: 4.9700
Location: Scotland
Contact:

Re: Domoticz able to activate motionEye motion detection

Post by EdddieN » Saturday 03 March 2018 17:05

Is this working in a RPI? How did you do it?


Sent from my iPhone using Tapatalk
11101101 - www.machinon.com

User avatar
Antori91
Posts: 108
Joined: Sunday 12 February 2017 18:12
Target OS: NAS (Synology & others)
Domoticz version: 4.97&3.5
Location: France
Contact:

Re: Domoticz able to activate motionEye motion detection

Post by Antori91 » Saturday 03 March 2018 18:33

Yes, sure it works in a RPI...I did it in a RPY. My Domoticz server is a Synology but the server I use to manage the cameras (where I've installed motion/motionEye) is a Raspberry.

About how I did it, you have information about motion HTTP API here http://www.lavrsen.dk/foswiki/bin/view/ ... ionHttpAPI
To explain a little bit further, motionEye sits on motion. Motion is the core system and is able to receive requests using HTTP API. I assume that motionEye itself uses that HTTP API to manage motion. So I use this motion HTTP API to change on the fly some parameters which results in enabling or not the motion detection. To come back to my architecture, because I use two servers and so motion receives requests from a remote server, I have to change motion.conf. The parameter webcontrol_localhost must be changed from on (default) to off. But if you have only one server, I assume you don't have to take care about this. Last, notice that motion port (7999 in my installation - defined in motion.conf) is not motionEye port (usually 8765).
Domoticz High Availability Cluster: Synology Dz V3.5877 (Main) - Raspberry Dz V4.97 (Backup) - Scripts Node.js
Alarm server: Raspberry - motionEye - iot_ALARM-SVR Node.js
Sensors/Actuators: ESP8266-Arduino
https://github.com/Antori91/Home_Automation

User avatar
heggink
Posts: 598
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi
Domoticz version: V4.9999
Location: NL
Contact:

Re: Domoticz able to activate motionEye motion detection

Post by heggink » Saturday 03 March 2018 20:23

Brilliant idea! Did you manage to get the camera itself working with domoticz? I never managed to get it to work.
Oh wait, you probably only use the server side of motioneye, not the client/camera itself? I also run a couple of motioneye cameras. These I have not managed to get to work with domoticz.
Pi3, latest beta
RFXCOM, z-wave (AEOTEC, switches, temhum, pir, contacts),
Plugwise2py, P1 'smart'meter & solar panel
Alexa, Wifi Cams motion detection
ESP: relays, PIR & Temp/TempHum
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest

User avatar
Antori91
Posts: 108
Joined: Sunday 12 February 2017 18:12
Target OS: NAS (Synology & others)
Domoticz version: 4.97&3.5
Location: France
Contact:

Re: Domoticz able to activate motionEye motion detection

Post by Antori91 » Sunday 04 March 2018 9:10

I use my cameras both from Domoticz and MotionEye. This is possible because my cameras support both snapshot url (used from Domoticz) and video streaming url (used from MotionEye).

In fact, two of my cameras don't support snapshot. For these two cameras, I didn't try to use the motionEye client url but I use the tool avconv to generate snapshots from the cameras video streaming url. Then Domoticz see these two cameras as *supported* snapshot cameras. Last, notice because I use two servers, in the Raspberry where avconv is installed, I also installed Apache. Apache is used as a proxy which answers to Domoticz camera snapshot requests (Within Apache configuration, I defined a symbolic link to get the generated avconv snapshots).
Domoticz High Availability Cluster: Synology Dz V3.5877 (Main) - Raspberry Dz V4.97 (Backup) - Scripts Node.js
Alarm server: Raspberry - motionEye - iot_ALARM-SVR Node.js
Sensors/Actuators: ESP8266-Arduino
https://github.com/Antori91/Home_Automation

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests