Benutzer:MathiasMahnke/Raspbian: Unterschied zwischen den Versionen
Erscheinungsbild
Inhalt gelöscht Inhalt hinzugefügt
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
| (19 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 7: | Zeile 7: | ||
apt autoremove |
apt autoremove |
||
curl -sL https://iobroker.net/install.sh | bash - |
curl -sL https://iobroker.net/install.sh | bash - |
||
* Aktualisierung ioBroker |
|||
iobroker update |
|||
iobroker upgrade self |
|||
iobroker upgrade |
|||
* Installation InfluxDB (Zugriff anschließend via http://localhost:8086) |
* Installation InfluxDB (Zugriff anschließend via http://localhost:8086) |
||
apt install influxdb influxdb-client |
apt install influxdb influxdb-client |
||
| Zeile 17: | Zeile 21: | ||
systemctl start grafana-server && systemctl status grafana-server |
systemctl start grafana-server && systemctl status grafana-server |
||
* 64-bit Kernel |
* 64-bit Kernel |
||
rpi-update |
#rpi-update ## optional step |
||
/boot/config.txt |
/boot/config.txt |
||
[pi4] |
[pi4] |
||
| Zeile 25: | Zeile 29: | ||
raspi-config > Interface-Options > I2C > Enable |
raspi-config > Interface-Options > I2C > Enable |
||
reboot |
reboot |
||
apt install i2c-tools |
apt install i2c-tools python3-bme680 |
||
mkdir ~/bme680; cd ~/bme680 |
|||
wget https://raw.githubusercontent.com/pimoroni/bme680-python/master/examples/read-all.py |
|||
wget https://raw.githubusercontent.com/pimoroni/bme680-python/master/examples/indoor-air-quality.py |
|||
chmod +x *.py |
|||
python3 read-all.py |
|||
python3 indoor-air-quality.py |
|||
* BME680 Sensor to InfluxDB (https://github.com/ayeks/bme680_to_influxdb) |
* BME680 Sensor to InfluxDB (https://github.com/ayeks/bme680_to_influxdb) |
||
influx -execute 'create database bme680' |
|||
apt install python3-bme680 python3-influxdb python3-dotenv python3-bme680 |
|||
cd ~/bme680 |
|||
git clone https://github.com/ayeks/bme680_to_influxdb |
|||
cd bme680_to_influxdb |
|||
vi config.ini |
|||
host = localhost |
|||
port = 8086 |
|||
user = |
|||
password = |
|||
dbname = bme680 |
|||
vi /etc/rc.local |
|||
.. |
|||
# BME680 measurement |
|||
python3 /root/bme680/bme680_to_influxdb/senddata.py "/root/bme680/bme680_to_influxdb/config.ini" >/dev/null & |
|||
.. |
|||
exit 0 |
|||
* Wireguard (via buster-backports, on aarch64) |
|||
echo "deb http://deb.debian.org/debian buster-backports main" > /etc/apt/sources.list.d/debian-backports.list |
|||
apt-key adv --keyserver hkps://keyserver.ubuntu.com --recv-keys 648ACFD622F3D138 04EE7237B7D453EC |
|||
apt update |
|||
apt install wireguard |
|||
# for 32-bit default kernel only: |
|||
apt install raspberrypi-kernel-headers |
|||
# workaround kernel headers for 64-bit aarch64 kernel: |
|||
#apt install git bc bison flex libssl-dev rpi |
|||
apt install rpi-source |
|||
rpi-source |
|||
# also after kernel updates: |
|||
dpkg-reconfigure wireguard-dkms |
|||
cd /etc/wireguard |
|||
umask 077 |
|||
wg genkey | tee peer1_privatekey | wg pubkey > peer1_publickey |
|||
wg genkey | tee server_privatekey | wg pubkey > server_publickey |
|||
* Kernel-Header Workaround Script: https://gist.githubusercontent.com/satmandu/a507c59d84737f6d29ff353395819d51/raw/f8559498951ec4f413377dc97b480b151f864a75/make_current_arm64_rpi_kernel_debs.sh |
|||
Aktuelle Version vom 30. November 2021, 19:12 Uhr
- Bereinigung GUI
apt purge wolfram-engine apt purge cups* gnome* (apt purge x11-common*)
- Installation ioBroker (Zugriff anschließend per http://<pi.lan>:8081)
apt purge node nodejs apt autoremove curl -sL https://iobroker.net/install.sh | bash -
- Aktualisierung ioBroker
iobroker update iobroker upgrade self iobroker upgrade
- Installation InfluxDB (Zugriff anschließend via http://localhost:8086)
apt install influxdb influxdb-client
- Installation Grafana (Zugriff anschließend per http://<pi.lan>:3000)
wget -q -O - https://packages.grafana.com/gpg.key | apt-key add - echo "deb https://packages.grafana.com/oss/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list apt update apt install grafana systemctl daemon-reload && systemctl enable grafana-server.service systemctl start grafana-server && systemctl status grafana-server
- 64-bit Kernel
#rpi-update ## optional step /boot/config.txt [pi4] arm_64bit=1 reboot
- BME680 Sensor (https://pypi.org/project/bme680/)
raspi-config > Interface-Options > I2C > Enable reboot apt install i2c-tools python3-bme680 mkdir ~/bme680; cd ~/bme680 wget https://raw.githubusercontent.com/pimoroni/bme680-python/master/examples/read-all.py wget https://raw.githubusercontent.com/pimoroni/bme680-python/master/examples/indoor-air-quality.py chmod +x *.py python3 read-all.py python3 indoor-air-quality.py
- BME680 Sensor to InfluxDB (https://github.com/ayeks/bme680_to_influxdb)
influx -execute 'create database bme680' apt install python3-bme680 python3-influxdb python3-dotenv python3-bme680 cd ~/bme680 git clone https://github.com/ayeks/bme680_to_influxdb cd bme680_to_influxdb vi config.ini host = localhost port = 8086 user = password = dbname = bme680 vi /etc/rc.local .. # BME680 measurement python3 /root/bme680/bme680_to_influxdb/senddata.py "/root/bme680/bme680_to_influxdb/config.ini" >/dev/null & .. exit 0
- Wireguard (via buster-backports, on aarch64)
echo "deb http://deb.debian.org/debian buster-backports main" > /etc/apt/sources.list.d/debian-backports.list apt-key adv --keyserver hkps://keyserver.ubuntu.com --recv-keys 648ACFD622F3D138 04EE7237B7D453EC apt update apt install wireguard # for 32-bit default kernel only: apt install raspberrypi-kernel-headers # workaround kernel headers for 64-bit aarch64 kernel: #apt install git bc bison flex libssl-dev rpi apt install rpi-source rpi-source # also after kernel updates: dpkg-reconfigure wireguard-dkms cd /etc/wireguard umask 077 wg genkey | tee peer1_privatekey | wg pubkey > peer1_publickey wg genkey | tee server_privatekey | wg pubkey > server_publickey