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.

Moderator: leecollings

User avatar
Antori91
Posts: 136
Joined: Sunday 12 February 2017 17:12
Target OS: NAS (Synology & others)
Domoticz version: 4.10717
Location: France
Contact:

Domoticz able to activate motionEye motion detection

Post by Antori91 »

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 12953 times
Web_MotionEye - Copie.JPG
Web_MotionEye - Copie.JPG (367.81 KiB) Viewed 12953 times
Mobile_Screenshot_motionEye - Copie.JPG
Mobile_Screenshot_motionEye - Copie.JPG (134.57 KiB) Viewed 12953 times
Last edited by Antori91 on Saturday 03 March 2018 15:31, edited 3 times in total.
Domoticz High Availability Cluster: Synology Dz V4.10693 (Main) - Raspberry Dz V4.10717 (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: 136
Joined: Sunday 12 February 2017 17:12
Target OS: NAS (Synology & others)
Domoticz version: 4.10717
Location: France
Contact:

Re: Domoticz able to activate motionEye motion detection

Post by Antori91 »

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 12943 times
Domoticz High Availability Cluster: Synology Dz V4.10693 (Main) - Raspberry Dz V4.10717 (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: 510
Joined: Wednesday 16 November 2016 11:31
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.9700
Location: Scotland
Contact:

Re: Domoticz able to activate motionEye motion detection

Post by EdddieN »

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: 136
Joined: Sunday 12 February 2017 17:12
Target OS: NAS (Synology & others)
Domoticz version: 4.10717
Location: France
Contact:

Re: Domoticz able to activate motionEye motion detection

Post by Antori91 »

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 V4.10693 (Main) - Raspberry Dz V4.10717 (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: 972
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: Domoticz able to activate motionEye motion detection

Post by heggink »

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.
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
User avatar
Antori91
Posts: 136
Joined: Sunday 12 February 2017 17:12
Target OS: NAS (Synology & others)
Domoticz version: 4.10717
Location: France
Contact:

Re: Domoticz able to activate motionEye motion detection

Post by Antori91 »

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 V4.10693 (Main) - Raspberry Dz V4.10717 (Backup) - Scripts Node.js
Alarm server: Raspberry - motionEye - iot_ALARM-SVR Node.js
Sensors/Actuators: ESP8266-Arduino
https://github.com/Antori91/Home_Automation
EDsteve
Posts: 26
Joined: Thursday 13 October 2016 11:43
Target OS: Linux
Domoticz version:
Contact:

Re: Domoticz able to activate motionEye motion detection

Post by EDsteve »

I also discovered motionEye and love it.
But i can't really get the HTTP web control working like you did.

My motion.conf is configured as shown:

Code: Select all

############################################################
# HTTP Based Control
############################################################

# TCP/IP port for the http server to listen on (default: 0 = disabled)
webcontrol_port 8080

# Restrict control connections to localhost only (default: on)
webcontrol_localhost off

# Output for http server, select off to choose raw text plain (default: on)
webcontrol_html_output on

# Authentication for the http based control. Syntax username:password
# Default: not defined (Disabled)
; webcontrol_authentication username:password
So i should be able to control it on port 8080 right?
But when i type into the browser: http://192.168.8.130:8080/ or http://192.168.8.130:8080/1/config/set?threshold=100000
It just comes: This site can't be reached.

I also tried the standard port 8765 where i can reach the motioneye web-panel.
But this just gives me: {"error": "not found"}

What do i not see?
User avatar
Antori91
Posts: 136
Joined: Sunday 12 February 2017 17:12
Target OS: NAS (Synology & others)
Domoticz version: 4.10717
Location: France
Contact:

Re: Domoticz able to activate motionEye motion detection

Post by Antori91 »

Hello
The motion.conf file to modify is located in /etc/motioneye and not the one in /etc/motion. Here is my motion.conf.
Also you've to restart motion/motionEye ("sudo systemctl restart motioneye") after you modify motion.conf.

Code: Select all

/etc/motioneye $ cat motion.conf
# @enabled on
# @show_advanced on
# @normal_password xxxxxxxxxxxxxxxxxxxxx
# @admin_username xxxxxxxxxxxxxxxxxxxxx
# @admin_password xxxxxxxxxxxxxxxxxxxxx
# @normal_username xxxxxxxxxxxxxxxxxxxxx
thread thread-1.conf
thread thread-2.conf
thread thread-3.conf
thread thread-4.conf
thread thread-5.conf
webcontrol_html_output on
webcontrol_port 7999
setup_mode off
webcontrol_parms 2
webcontrol_localhost off
Domoticz High Availability Cluster: Synology Dz V4.10693 (Main) - Raspberry Dz V4.10717 (Backup) - Scripts Node.js
Alarm server: Raspberry - motionEye - iot_ALARM-SVR Node.js
Sensors/Actuators: ESP8266-Arduino
https://github.com/Antori91/Home_Automation
EDsteve
Posts: 26
Joined: Thursday 13 October 2016 11:43
Target OS: Linux
Domoticz version:
Contact:

Re: Domoticz able to activate motionEye motion detection

Post by EDsteve »

Cooool. Works nice. Love it. Thanks for Info.
I indeed edit the wrong config.
fma388
Posts: 3
Joined: Wednesday 22 May 2019 14:24
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Location: France
Contact:

Re: Domoticz able to activate motionEye motion detection

Post by fma388 »

Thanks for info, works perfectly !

Just a question. Is there possible to use webcontrol_authentication with your HTTP API ? (username:password)
My camera is on other raspi than Domoticz.

Thanks
User avatar
Antori91
Posts: 136
Joined: Sunday 12 February 2017 17:12
Target OS: NAS (Synology & others)
Domoticz version: 4.10717
Location: France
Contact:

Re: Domoticz able to activate motionEye motion detection

Post by Antori91 »

fma388 wrote: Wednesday 22 May 2019 14:31 Just a question. Is there possible to use webcontrol_authentication with your HTTP API ? (username:password)
My camera is on other raspi than Domoticz.
Thanks
Hello,
I assume yes (you have to add "webcontrol_authentication username:password" to /etc/motioneye/motion.conf), but...I've never tried...

https://www.lavrsen.dk/foswiki/bin/view ... entication
Domoticz High Availability Cluster: Synology Dz V4.10693 (Main) - Raspberry Dz V4.10717 (Backup) - Scripts Node.js
Alarm server: Raspberry - motionEye - iot_ALARM-SVR Node.js
Sensors/Actuators: ESP8266-Arduino
https://github.com/Antori91/Home_Automation
fma388
Posts: 3
Joined: Wednesday 22 May 2019 14:24
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Location: France
Contact:

Re: Domoticz able to activate motionEye motion detection

Post by fma388 »

Antori91 wrote: Wednesday 22 May 2019 15:38 Hello,
I assume yes (you have to add "webcontrol_authentication username:password" to /etc/motioneye/motion.conf), but...I've never tried...
I've configure webcontrol_authentication in motion.conf but doesn't work. I think we have to add the identifiers in the API but I don't know how..
User avatar
Antori91
Posts: 136
Joined: Sunday 12 February 2017 17:12
Target OS: NAS (Synology & others)
Domoticz version: 4.10717
Location: France
Contact:

Re: Domoticz able to activate motionEye motion detection

Post by Antori91 »

Domoticz High Availability Cluster: Synology Dz V4.10693 (Main) - Raspberry Dz V4.10717 (Backup) - Scripts Node.js
Alarm server: Raspberry - motionEye - iot_ALARM-SVR Node.js
Sensors/Actuators: ESP8266-Arduino
https://github.com/Antori91/Home_Automation
fma388
Posts: 3
Joined: Wednesday 22 May 2019 14:24
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Location: France
Contact:

Re: Domoticz able to activate motionEye motion detection

Post by fma388 »

Thank you very much ! It works !
QSKONE
Posts: 38
Joined: Monday 12 February 2018 12:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Domoticz able to activate motionEye motion detection

Post by QSKONE »

This is not working for me

motionEye Version 0.41
Motion Version 4.2.2
OS Version motionEyeOS 20190911

Works well commands from lavrsens wiki

Code: Select all

http://IP:7999/1/detection/start
http://IP:7999/1/detection/pause
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Domoticz able to activate motionEye motion detection

Post by EdwinK »

No matter what I try, I can't get MotionEye to show a camera feed in Domoticz :(
Screen Shot 2019-12-14 at 20.25.40.png
Screen Shot 2019-12-14 at 20.25.40.png (60.1 KiB) Viewed 6488 times
When I go directly to http://192.168.0.5/picture/1/current/?_ ... <signature deleted> I can see the feed.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
User avatar
felix63
Posts: 244
Joined: Monday 07 December 2015 9:30
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.1
Location: Gouda
Contact:

Re: Domoticz able to activate motionEye motion detection

Post by felix63 »

In the direct link you don't give a port number. But in domoticz you seem to refer to port 8081. If you change that port number 8081 to 80 what happens?
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Domoticz able to activate motionEye motion detection

Post by EdwinK »

Same. Nothing changes :(

Now I think about it, it's indeed strange that Motioneye gives a streaming port at 8081, but it doesn't use it in the links to provide.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
User avatar
Antori91
Posts: 136
Joined: Sunday 12 February 2017 17:12
Target OS: NAS (Synology & others)
Domoticz version: 4.10717
Location: France
Contact:

Re: Domoticz able to activate motionEye motion detection

Post by Antori91 »

Hello EdwinK,
The parameters you entered in Domoticz are clearly false. For this Snapshot URL given by motionEye: http://192.168.0.5/picture/1/current/?_ ... ydede71809
I will try:
protocol: http
ip address: 192.168.0.5
port: 80
username: admin
password:
imageURL: /picture/1/current/?_username=#USERNAME&_signature=yyyyyyyyyyyyyyyyyydede71809

PS: about your last post, the streaming port is for streaming, not for snapshot. motionEye gives two different URLs for snapshot and streaming. Domoticz supports only snapshot mode.
Domoticz High Availability Cluster: Synology Dz V4.10693 (Main) - Raspberry Dz V4.10717 (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
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Domoticz able to activate motionEye motion detection

Post by EdwinK »

Thanks. Going to try this later.

Mm.. still not working :(

And fixed now. :)
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest