diff --git a/README.md b/README.md index 084643c..0c36747 100644 --- a/README.md +++ b/README.md @@ -80,9 +80,124 @@ For the professionals out there, most of you will already know how to pixel cont * A promt should appear to enter a password. Just enter the password you set for the PI. * Now comes the fun part of just copy pasta ;) -``` -sudo apt install python3 python3-pip git python3-flask python3-flask-mysqldb python3-adafruit-circuitpython-neopixel python3-wifi apache2 php mariadb-server mariadb-client -y +### Commands to install all the required packages: +``` +sudo apt install python3 python3-pip git python3-flask apache2 php mariadb-server mariadb-client ola ola-python dnsmasq hostapd -y + +pip3 install flask-mysqldb -y +pip3 install adafruit-circuitpython-neopixel -y +pip3 install wifi -y +``` + + +### Setup the wifi access point: + +This is required for the tubes to connect to the master server. The tubes will connect over wifi to the master server to receive their configurations and their ArtNET. + +Copy and paste the following commands: + +Stop the access point (ap) services: + +``` +sudo systemctl stop dnsmasq +sudo systemctl stop hostapd +``` + +Set static IP for wifi interface: + +``` +sudo nano /etc/dhcpcd.conf +``` + +Past this into the text editor (nano): + +``` +interface wlan0 + static ip_address=192.168.0.1/24 + nohook wpa_supplicant +``` + +This ^ gives the Raspberry Pi on the Wifi interface the IP 192.168.0.1 + +Tip: If you can't connect over ethernet to the Pi or you want to give it a static ip on the ethernet interface later, just connect to the wifi and you can acccess it via this ip on ssh and all the webinterfaces. + + +Exit and save nano by pressing [Cntrl]+[O] then [Enter] and then [Cntrl]+[x]. Keep this in mind for later. + + +Configure DHCP: + +Edit the DHCP config: + +sudo mv /etc/dnsmasq.conf /etc/dnsmasq.conf.orig +sudo nano /etc/dnsmasq.conf +Again, past this into nano: + +``` +interface=wlan0 +dhcp-range=192.168.0.2,192.168.0.254,255.255.255.0,24h +``` +Now exit nano again. Do you remember how? If not here is how you do it ;) + +Exit and save nano by pressing [Cntrl]+[O] then [Enter] and then [Cntrl]+[x]. + + +Now start the DHCP service: + +``` +sudo systemctl start dnsmasq +``` + +Configure the AP itself: + +Edit the config: + +``` +sudo nano /etc/hostapd/hostapd.conf +``` +Past this: + +``` +country_code=DE +interface=wlan0 +ssid=PiXelTube Master +channel=9 +auth_algs=1 +wpa=2 +wpa_passphrase=change_me +wpa_key_mgmt=WPA-PSK +wpa_pairwise=TKIP CCMP +rsn_pairwise=CCMP +``` + +ATTENTION: for the country_code set your own and also change the wpa_passphrase to a password you remember or wrote down. This password is important for later. With this every tube can connect to the AP. + + +Exit and save. + +Now edit the hostapd file: + +``` +sudo nano /etc/default/hostapd +``` +And past this: + +``` +DAEMON_CONF="/etc/hostapd/hostapd.conf" +``` +Exit and save. + +Now enable and start all required services: + +``` +sudo systemctl unmask hostapd +sudo systemctl enable hostapd +sudo systemctl start hostapd +``` +### Setup the MySQL database: + +``` sudo mysql -u root -p # Enter the password you set for the pi @@ -102,3 +217,15 @@ flush privileges; sudo systemctl restart apache2 ``` + + +### Setup Open Lighting Archetecture as the ArtNET sACN middle man: + +You can access the Pi's OLA webinterface via the following address: + +`http://:9090/` + +* From there click add universe > set universe ID > set universe name. +* Select Artnet input with the IP address from the ethernet port and as Artnet output the address from the wifi access point. + +Repeat this process for every universe you are going to use for your tubes. As an addition to Artnet you can also use sACN (E1.31) as an input.