Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Motioneye with Digoo M1X camera

Digoo BB-M1X IP camera integration to Motioneye

Thank you to @felixsteghofer for the basic informations and the detailed informations.


I have a PC based and cheap home server. This servers runs Motioneye too in a docker container.

My docker-compose.yml file for motioneye:

version: '3'

    image: ccrisan/motioneye:master-amd64
      - '/etc/localtime:/etc/localtime:ro'
      - './lib:/var/lib/motioneye'
      - './etc:/etc/motioneye'
    restart: always
    network_mode: host

I've started the motioneye container with docker-compose up -d command.

The motioneye's web UI available on the 8765 port. Example:

But the question is: How can I integrate the new and cheap Digoo M1X IP camera?


Connnect the camera to the network

I can't setup the camera with the Digoo Cloud App (, so I've configured fully manually.

  1. step: Connect the Digoo Camera to the network with a LAN cable. Wait 1-3 minutes to the first boot. I've found Digoo's IP address with Fing APP on my phone ( and/or checked my router DHCP leases table.

  2. step: I have to connect Digoo cam to the network with wireless. Connected to the camera with telnet console. (example: telnet The user is root and without password. (little bit unsecure by default :( )

  3. step: I've changed the /rom/wpa_supplicant0.conf file with vi editor like this:


(change the MyWifiNetworkName and MyWifiPassword with your valid wifi name and password)

  1. step: I've rebooted the camera with reboot command and waited 1-2 minutes to start.

  2. step: I've found the camera's new IP address like this:

  • checked my router DHCP leases list, little bit faster than a network scan again
  • but I can connect to the camera with telnet again and check the ip addr command output. The IP address on wlan0 interface is the new, wireless address

Integrate the camera to Motioneye


  • rtsp://admin:20160404@ - 1280x960
  • rtsp://admin:20160404@ - 320x240

The admin is the default user and the 20160404 is the default access password to RTSP stream.

How can I added the camera to the Motioneye? I've opened the Motioneye Web UI and logged in with admin user (without password by default). I've added the camera with these parametes:

  • Camera type: "network camera"
  • URL: "rtsp://"
  • username: "admin"
  • password: "20160404"
  • camera: "rtsp/udp camera"

That's all, almost. I see the camera's video stream with Motioneye.

Pan Tilt - rotating the camera

Pan/Tilt is little bit tricky, because I have to post a short XML to the camera service URL. The usual method is "call an URL". So, I've made some script for this.

I've connected to your Motioneye server with SSH. I've stepped into motioneye's directory (example: /srv/motioneye). To the directory that contains motioneye's docker-compose.yml file. Created the digoo-rotate-template.xml file under the etc folder (etc/digoo-rotate-template.xml) and inserted these lines:

                    xmlns="" x="--X--" y="--Y--"/>

Created the file under the etc folder (etc/ and inserted these lines:



XML_TEMPLATE="$( dirname $0 )/digoo-rotate-template.xml"


#               x       y       Action
#               0.0     -1.0    move down
#               0.0     1.0     move up
#               1.0     0.0     move to the right
#               -1.0    0.0     move to the left

# ----------------

[ -e $XML_TEMPLATE ] || { echo "Template xml not found"; exit 1; }

case $DIRECTION in
  right|RIGHT )
#    echo "moving right..."
    DATA="$( cat $XML_TEMPLATE | sed s@--X--@1.0@g | sed s@--Y--@0.0@g )"
  left|LEFT )
#    echo "moving left..."
    DATA="$( cat $XML_TEMPLATE | sed s@--X--@-1.0@g | sed s@--Y--@0.0@g )"
  up|UP )
#    echo "moving up..."
    DATA="$( cat $XML_TEMPLATE | sed s@--X--@0.0@g | sed s@--Y--@1.0@g )"
  down|DOWN )
#    echo "moving down..."
    DATA="$( cat $XML_TEMPLATE | sed s@--X--@0.0@g | sed s@--Y--@-1.0@g )"

curl -s -o $TEMP_OUT -H "Content-Type: application/soap+xml" -X POST -d "$DATA" http://$IP:$ONVIF_PORT/onvif/device_service || { cat $TEMP_OUT; exit 1; }

I've checked the "Camera ID" on the motioneye UI. Clicked on the Wrench icon and found the number in the "Camera ID" line. Example: 2 I've created some small scripts for directions under the etc folder. up_2 script (etc/up_2):


$( dirname $0 )/ "" "up"

down_2 script (etc/down_2):


$( dirname $0 )/ "" "down"

right_2 script (etc/right_2):


$( dirname $0 )/ "" "right"

left_2 script (etc/left_2):


$( dirname $0 )/ "" "left"

Modified the script permissions (executable permission):

chmod 755 etc/digoo*
chmod 755 etc/*_2

Restarted the motioneye with docker-compose restart command.

I was lucky, because works :) I hope you can use this little howto if You have a same camera and situation. Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment