RaspberryPi für CBPi installieren:

Image mit Etcher auf SD Karte flashen

vor dem Einsetzen Datei "ssh" erstellen
Datei "wpa_supplicant.conf" mit folgendem Inhalt erstellen:

# Datei wpa_supplicant.conf in der Boot-Partition ( ab Raspbian Stretch)
country=DE
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
       ssid="DEINE WLAN SSID"
       psk="DEIN PASSWORT"
       key_mgmt=WPA-PSK
}

sudo raspi-config
7 -> A1 Expand Filesystem
3 -> VNC aktivieren

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

sudo nano /boot/config.txt
am Ende einfügen:
lcd_rotate=2
# nur einfügen um nervige low voltage zu unterdrücken
avoid_warnings=2

sudo reboot

Samba installieren:
sudo apt-get install samba samba-common smbclient
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_ori

homes auskommentieren

#=================== Custom Share Definitions ====================
[boot]
    path = /boot
    guest ok = yes
    read only = no
    force user = pi
    browseable = yes

[pi-home]
    path = /home/pi
    guest ok = yes
    read only = no
    force user = pi
    browseable = yes

[system-logs]
    path = /var/log
    guest ok = yes
    read only = yes
    force user = root
    browseable = yes

Statische IP für WLAN
sudo nano /etc/dhcpcd.conf
interface wlan0
static ip_address=192.168.100.31/24
static routers=192.168.100.1
static domain_name_servers=192.168.100.1

sudo reboot

MQTT broker installieren:
pip install paho-mqtt
sudo apt-get install mosquitto
cd /usr/lib/python3/dist-packages
sudo ln -s /home/pi/.local/lib/python2.7/site-packages/paho

CBPI3 installieren
cd /home/pi
git clone https://github.com/avollkopf/craftbeerpi3
cd craftbeerpi3
sudo ./install.sh

craftbeerpi.db und plugins Verzeichnis kopieren

Autostart konfigurieren:
sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
#@xscreensaver -no-splash
point-rpi
@xset s off
@xset -dpms
@xset s noblank
@sed -i 's/"exited_cleanly": false/"exited_cleanly": true/' ~/.config/chromium-browser/Default/Preferences
@chromium-browser --noerrdialogs --disable-crash-reporter --disable-infobars --force-device-scale-factor=1.00 --start-fullscreen --disable-restore-session-state http://localhost:5000 --incognito

########## optional KrimsKrams ######

Influx installieren:
wget -qO- https://repos.influxdata.com/influxdb.key | sudo apt-key add -
source /etc/os-release
echo "deb https://repos.influxdata.com/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
sudo apt update
sudo apt install -y influxdb
sudo systemctl unmask influxdb.service
sudo systemctl start influxdb.service
sudo systemctl enable influxdb.service

Zugriff auf die Datenbank einrichten:
sudo nano /etc/influxdb/influxdb.conf
Mit der Tastenkombination Strg+W nach HTTP suchen. In diesem Abschnitt muss mindestens aktiviert werden:

enabled = true
bind-address = ":8086"

Grafana installieren:
wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -
echo "deb https://packages.grafana.com/oss/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list

sudo apt-get update
sudo apt-get install -y grafana

Grafana automatisch bei Systemstart starten:

sudo systemctl enable grafana-server
sudo systemctl start grafana-server
