Skip to content

numminorih-git/docker-majordomo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-majordomo

***tested on Raspbian buster (Release date: 2020-05-27) https://www.raspberrypi.org/downloads/

Make ssh login to your Raspberry PI, and go to steps:

Step0:

Install Docker

sudo apt install -y libffi-dev libssl-dev python python-pip mc build-essential git mplayer
curl -sSL https://get.docker.com | sh
sudo usermod -aG docker pi
sudo reboot
sudo pip3 install docker-compose
sudo reboot

Step1:

sudo mkdir /mnt/data
sudo chown pi:pi /mnt/data/
cd /mnt/data
git clone https://github.com/numminorih-git/docker-majordomo.git
cd docker-majordomo

copy deffault config and make changes

cp .env.example .env && nano .env
sudo make clean
make init-all

All modules will be configured automatically

Also you can use make init-app and make init-db to init modules separately

Step 2: (or -d to start as daemon)

At first time you should use use --build parameter

docker-compose up --build -d

Rest of the time

docker-compose up -d

wait 20+ minutes

Step 3:

a) For initial setup "majordomo" follow http://your-ip-address/popup/first_start.html

  • go to Control pannel -> Check updates -> Advance config and set to Alfa (latest updates) and reboot rpi/docker containers
  • update majordomo from control panel and reboot rpi/docker containers
  • install MQTT plugin (Control pannel -> Plugin market), and set to:
Hostname: 127.0.0.1
Subscription path: /var/now/#, $SYS/broker/uptime, homebridge/from/#

b) For initial setup "phpmyadmin" follow http://your-ip-address:8081

c) For initial setup "homebridge" follow http://your-ip-address:8080

{
"platform": "mqtt",
"name": "mqtt",
"url": "mqtt://127.0.0.1",
"topic_type": "multiple",
"topic_prefix": "homebridge",
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD"
}
  • Majordomo part:

    • install HomeKit plugin (Control pannel -> Plugin market)
    • follow it and push Enable service
    • follow Objects -> HomeBridgeClass -> Edit -> Methods -> Add new method, and set to:
Title: dataUpdated
Code: require(DIR_MODULES.'devices/processHomebridgeMQTT.inc.php');
  • follow Objects -> HomeBridgeClass -> Edit -> Properties, and set to all titles:
On-change Method -> dataUpdated

d) For initial setup "mosquitto":

identify mosquitto docker container

docker ps

go in it

docker exec -it "mosquitto docker container" mosquitto_passwd -c  /mosquitto/config/passwd "mosquitto username"

then type password and add to mosquitto.config

persistence true
persistence_location /mosquitto/data
allow_anonymous false
password_file /mosquitto/config/passwd

e) For initial setup "zigbee2mqtt":

- install zigbee2mqtt plugin (Control pannel -> Plugin market)
- change MQTT settings -> Host address to 127.0.0.1
- username and passwd if required

Additional improvements

Working with MySQL data from the ramdisk

You are able to move you MySQL data into the RAM disk. This option make your system faster but will use near 200Mb of memory.

https://github.com/sevrugin/docker-majordomo/tree/master/scripts/mysql-tmpfs

Optional - enable Pi4 64-bit raspbian kernel and update bootloader

add to config.txt

sudo nano /boot/config.txt

and add to the end:

arm_64bit=1

then update rpi and reboot:

sudo rpi-update
sudo reboot

test

uname -a

About

Docker for majordomo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 35.9%
  • Makefile 31.4%
  • Dockerfile 21.7%
  • Shell 11.0%