Docker container for https://github.com/dgiese/dustcloud
Creates three docker containers for Raspberry Pi and Linux x64
- DB Server
- phpMyAdmin
- Dustcloud
The phpmyadmin and the DB server are optionale, you can use your existings instances. You can use the dustcloud from Docker Hub or build your own from the Repro.
Run DB container (optional)
docker run --name dustcloud_mariadb -d -e MYSQL_ROOT_PASSWORD=rootdustcloudpw \
-e TZ=$(cat /etc/timezone) jackgruber/mariadb
Run phpMyAdmin container (optional)
docker run --name dustcloud_pma -d --link dustcloud_mariadb:db -p 8080:80 jackgruber/phpmyadmin
Run dustcloud container
docker run --name dustcloud -d --link dustcloud_mariadb:db \
-p 80-81:80-81/tcp -p 8053:8053/udp \
-e TZ=$(cat /etc/timezone) \
-v /tmp/data:/opt/dustcloud/data \
jackgruber/dustcloud
Instead of creating each container one by one you can youse docker-compose.
Change/Add the environment variables in the docker-compose.yml according to your needs.
Login to phpMyAdmin ( http://YOURIP:8080 ) an execute
CREATE USER 'dustcloud'@'%' IDENTIFIED by 'dustcloudpw';
GRANT USAGE ON *.* TO 'dustcloud'@'%';
CREATE DATABASE IF NOT EXISTS `dustcloud`;
GRANT ALL PRIVILEGES ON `dustcloud`.* TO 'dustcloud'@'%';
Copy the content from the dustcloud.sql ans execute the SQL Querys in phpMyAdmin
https://github.com/dgiese/dustcloud/blob/master/dustcloud/dustcloud.sql
These options can be set via the environment variable -e flag:
- CLOUDSERVERIP: Your Dustcloud IP address (Default: 130.83.47.181, Values: <IP addr>)
- MYSQLSERVER: MySQL Server address (Default: db, Values: <IP addr> or <DNS name>)
- MYSQLDB: MySQL database for dustcloud (Default: dustcloud, Values: <string>)
- MYSQLUSER: User for MySQL database (Default: dustcloud, Values: <string>)
- MYSQLPW: Password for MySQL database (Default: dustcloudpw, Values: <string>)
- CMDSERVER: Command Server IP or DNS Name (Default: 192.168.1.7, Values: <IP addr> or <DNS name>)
- CMDSERVER_PORT: Port number for command server (Default: 1121, Values: <1-65535>)
- TZ: Set Timezone (Default: Europe/Berlin, Values: <TZ>)
- COUNTRYSERVER: Set cloud_server_address in server.py (Default: ott.io.mi.com, Values: <DNS name>)
- DEBUG: (Default: false, Values: <true|false>)
docker build -t dustcloud .
Go to http://DUSTCLOUDIP:81 and add your Vacuum. DID and enckey can be found both in /mnt/default/device.conf on your robot
docker logs -f dustcloud
docker exec dustcloud mirobo discover --handshake true
docker exec dustcloud mirobo --ip=192.168.X.X --token=XXX
...
- Download upload_maps.sh
- Edit upload_map.sh and change DUSTCLOUD_SERVER=
192.168.xx.yyto your dustcloud Server IP - Upload upload_map.sh to your Xiaomi
- Make file executable
chmod +x upload_map.sh - Start the upload with
watch -n5 ./upload_map.sh
- Copy the robot.db from you Xiaomi
/mnt/data/rockrobo/robot.dbto/tmp/data - Run
docker exec dustcloud python3 /opt/dustcloud/map_extractor.py -f /opt/dustcloud/data/robot.db -o /opt/dustcloud/data -c - The extracted maps are now in
/tmp/dataand can now be opened with FasteStone Image Viewer or IrfanView
phpMyAdmin https://github.com/JackGruber/docker_phpmyadmin
MariaDB https://github.com/bianjp/docker-mariadb-alpine
python-miio Commands https://python-miio.readthedocs.io/en/latest/vacuum.html
dustcloud https://github.com/dgiese/dustcloud
- File docker-compose.yml updated, now the dock-hub image is used and the path for the data directory has been corrected
- Update for giese/dustcloud new frontend UI #136
- Update pip
- Add docker-compose
- Change examples to multiarch images
- Add composer support
- Add COUNTRYSERVER (Cloud country server) option to change
cloud_server_addressin server.py
- Change to ENV var configuration settings
- Add timezone to php.ini
- Changed to alpine as base image, so there is only one docker file for Raspberry Pi and x64.
- Also the size has been reduced from 592MB to 180MB for the docker image