In der cmdline.txt die Werte für die IP Konfig eintragen:
ip=<Raspi-ip>:<Netboot-ip>:<Gateway-ip>:<Subnetzmaske>:<Hostname>:<Netzwerkkarte>:<Autoconf>
Anschließend noch ssh Server aktivieren. Einfach eine Leerdatei ssh im selben Ordner erstellen.
Just another WordPress site
In der cmdline.txt die Werte für die IP Konfig eintragen:
ip=<Raspi-ip>:<Netboot-ip>:<Gateway-ip>:<Subnetzmaske>:<Hostname>:<Netzwerkkarte>:<Autoconf>
Anschließend noch ssh Server aktivieren. Einfach eine Leerdatei ssh im selben Ordner erstellen.
BLE im ResinOS Container klappt noch nicht. Und da ich die Werte bereits in der InfluxDB habe kann ich diese gleich von dort aus auslesen.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
- platform: influxdb host: 10.xx.xx.xx username: buyenne password: xxxxxxxx12345wasmitzahlen queries: - name: feuchtigkeit_3 unit_of_measurement: '%' value_template: '{{ value | round(1) }}' group_function: mean where: '"mac" = ''C4:7C:8D:65:68:F3'' and time > now() - 24h' measurement: 'miflora_sensor' field: moisture database: miflora |
Danach kann dieser Wert als Entity sensor.feuchtigkeit_3 angezeigt werden.
nicht meins. Woltle ich aber schon länger auch mal testen…
https://randomnerdtutorials.com/esp8266-and-node-red-with-mqtt/
Der Raspberry der sich um das Auslesen der miFlora Sensoren kümmert ist im Büro. Die Sensoren später auf dem Balkon. Leider stören die Jalousien das Auslesen der Daten. Also muß ein “Relay” her. Ich hatte noch ein Orange PI Zero herum liegen und dieser wird nun dafür genutzt.
Edit: TL;DR – der Mist wollte partout nicht funktionieren. Problem mit einem Raspberry Zero W gelöst.
Ein Raspberry für € 5,-. Klang sehr verlockend. Leider nur einzeln im Ausland zu bekommen. Durch die Portokosten ist dieses Teil nicht mehr wirklich interessant wenn man es mit einen chinesischen Konkurrenten vergleicht. Mußte ich dennoch haben. Vor allem die Größe war interessant. Dazu noch ein Cam Modul und ein passendes FFC und es konnte los gehen. Versand von Pimoroni war schnell.
Bei Aliexpress gabs ein 3er Bundle mi flora (internationale Version) Sensoren für $ 39,-. Die günstigere Variante ist für den chinesischen Markt gedacht und macht wohl Probleme mit der App bez. Lokalisation. Hersteller dieser Sensoren ist die Firma HuaHuaCaCao.
Edit: Beim Xiaomi EU Store gibt’s die Dinger für $10,99. Aber Porto liegt wiederum bei $13 – $16.
If your screen goes black during command line after 30 minutes or so, you have screen blanking enabled most likely. If you want to turn it off:
Edit the file /etc/kbd/config Change these lines:
1 2 3 |
BLANK_TIME=0 BLANK_DPMS=off POWERDOWN_TIME=0 |
Es wurde eine microSD mit dem aktuellsten Debbie Image erstellt und anschließend der Raspi gestartet.
Zuerst ein paar Grundarbeiten ausführen
1 2 3 4 5 6 7 8 |
sudo apt-get update sudo apt-get upgrade sudo apt-get install ntpdate sudo apt-get install rpi-update sudo rpi-update sudo apt-get install iftop htop tcptrack zabbix-agent sudo nano /etc/network/interfaces sudo apt-get install perl |
Installation FHEM
1 2 3 4 |
wget http://fhem.de/fhem-5.7.deb sudo dpkg -i fhem*.deb sudo apt-install -f sudo reboot |
1 |
sudo apt-get install subversion-tools libjpeg8-dev imagemagick |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
svn co https://svn.code.sf.net/p/mjpg-streamer/code/mjpg-streamer/ mjpg-streamer A mjpg-streamer/mjpg_streamer.c A mjpg-streamer/plugins A mjpg-streamer/plugins/input_control A mjpg-streamer/plugins/input_control/dynctrl.c A mjpg-streamer/plugins/input_control/dynctrl.h A mjpg-streamer/plugins/input_control/uvc_compat.h A mjpg-streamer/plugins/input_control/uvcvideo.h A mjpg-streamer/plugins/input_control/Makefile A mjpg-streamer/plugins/input_control/input_uvc.c A mjpg-streamer/plugins/output_file A mjpg-streamer/plugins/output_file/output_file.c A mjpg-streamer/plugins/output_file/Makefile A mjpg-streamer/plugins/output_file/examples A mjpg-streamer/plugins/output_file/examples/ftp_upload.sh A mjpg-streamer/plugins/output_file/examples/show_filename.sh A mjpg-streamer/plugins/output_file/examples/change_filename.sh A mjpg-streamer/plugins/output_http A mjpg-streamer/plugins/output_http/output_http.c A mjpg-streamer/plugins/output_http/httpd.c A mjpg-streamer/plugins/output_http/httpd.h A mjpg-streamer/plugins/output_http/Makefile A mjpg-streamer/plugins/output_viewer A mjpg-streamer/plugins/output_viewer/output_viewer.c A mjpg-streamer/plugins/output_viewer/Makefile A mjpg-streamer/plugins/input_gspcav1 A mjpg-streamer/plugins/input_gspcav1/utils.c A mjpg-streamer/plugins/input_gspcav1/utils.h A mjpg-streamer/plugins/input_gspcav1/spcaframe.h A mjpg-streamer/plugins/input_gspcav1/spcav4l.c A mjpg-streamer/plugins/input_gspcav1/encoder.c A mjpg-streamer/plugins/input_gspcav1/marker.c A mjpg-streamer/plugins/input_gspcav1/spcav4l.h A mjpg-streamer/plugins/input_gspcav1/input_gspcav1.c A mjpg-streamer/plugins/input_gspcav1/encoder.h A mjpg-streamer/plugins/input_gspcav1/huffman.c A mjpg-streamer/plugins/input_gspcav1/jconfig.h A mjpg-streamer/plugins/input_gspcav1/marker.h A mjpg-streamer/plugins/input_gspcav1/quant.c A mjpg-streamer/plugins/input_gspcav1/huffman.h A mjpg-streamer/plugins/input_gspcav1/readme.spcacat A mjpg-streamer/plugins/input_gspcav1/jdatatype.h A mjpg-streamer/plugins/input_gspcav1/Makefile A mjpg-streamer/plugins/input_gspcav1/quant.h A mjpg-streamer/plugins/input.h A mjpg-streamer/plugins/output.h A mjpg-streamer/plugins/output_autofocus A mjpg-streamer/plugins/output_autofocus/processJPEG_onlyCenter.c A mjpg-streamer/plugins/output_autofocus/output_autofocus.c A mjpg-streamer/plugins/output_autofocus/processJPEG_onlyCenter.h A mjpg-streamer/plugins/output_autofocus/Makefile A mjpg-streamer/plugins/output_rtsp A mjpg-streamer/plugins/output_rtsp/output_rtsp.c A mjpg-streamer/plugins/output_rtsp/rtsp.c A mjpg-streamer/plugins/output_rtsp/Makefile A mjpg-streamer/plugins/output_udp A mjpg-streamer/plugins/output_udp/output_udp.c A mjpg-streamer/plugins/output_udp/Makefile A mjpg-streamer/plugins/input_testpicture A mjpg-streamer/plugins/input_testpicture/testpictures.h A mjpg-streamer/plugins/input_testpicture/input_testpicture.c A mjpg-streamer/plugins/input_testpicture/Makefile A mjpg-streamer/plugins/input_testpicture/pictures A mjpg-streamer/plugins/input_testpicture/pictures/960x720_2.jpg A mjpg-streamer/plugins/input_testpicture/pictures/160x120_1.jpg A mjpg-streamer/plugins/input_testpicture/pictures/160x120_2.jpg A mjpg-streamer/plugins/input_testpicture/pictures/320x240_1.jpg A mjpg-streamer/plugins/input_testpicture/pictures/320x240_2.jpg A mjpg-streamer/plugins/input_testpicture/pictures/640x480_1.jpg A mjpg-streamer/plugins/input_testpicture/pictures/640x480_2.jpg A mjpg-streamer/plugins/input_testpicture/pictures/960x720_1.jpg A mjpg-streamer/plugins/input_uvc A mjpg-streamer/plugins/input_uvc/dynctrl.c A mjpg-streamer/plugins/input_uvc/dynctrl.h A mjpg-streamer/plugins/input_uvc/jpeg_utils.c A mjpg-streamer/plugins/input_uvc/uvc_compat.h A mjpg-streamer/plugins/input_uvc/v4l2uvc.c A mjpg-streamer/plugins/input_uvc/huffman.h A mjpg-streamer/plugins/input_uvc/uvcvideo.h A mjpg-streamer/plugins/input_uvc/jpeg_utils.h A mjpg-streamer/plugins/input_uvc/v4l2uvc.h A mjpg-streamer/plugins/input_uvc/Makefile A mjpg-streamer/plugins/input_uvc/input_uvc.c A mjpg-streamer/plugins/input_file A mjpg-streamer/plugins/input_file/input_file.c A mjpg-streamer/plugins/input_file/Makefile A mjpg-streamer/utils.c A mjpg-streamer/LICENSE A mjpg-streamer/www A mjpg-streamer/www/sidebarbg.gif A mjpg-streamer/www/style.css A mjpg-streamer/www/JQuerySpinBtn.js A mjpg-streamer/www/jquery.js A mjpg-streamer/www/stream.html A mjpg-streamer/www/favicon.ico A mjpg-streamer/www/JQuerySpinBtn.css A mjpg-streamer/www/videolan.html A mjpg-streamer/www/stream_simple.html A mjpg-streamer/www/rotateicons.png A mjpg-streamer/www/jquery.ui.core.min.js A mjpg-streamer/www/jquery.ui.tabs.min.js A mjpg-streamer/www/javascript_simple.html A mjpg-streamer/www/cambozola.jar A mjpg-streamer/www/functions.js A mjpg-streamer/www/java_control.html A mjpg-streamer/www/java.html A mjpg-streamer/www/jquery.rotate.js A mjpg-streamer/www/static.html A mjpg-streamer/www/jquery.ui.custom.css A mjpg-streamer/www/java_simple.html A mjpg-streamer/www/javascript_motiondetection.html A mjpg-streamer/www/LICENSE.txt A mjpg-streamer/www/static_simple.html A mjpg-streamer/www/control.htm A mjpg-streamer/www/spinbtn_updn.gif A mjpg-streamer/www/favicon.png A mjpg-streamer/www/javascript.html A mjpg-streamer/www/index.html A mjpg-streamer/www/example.jpg A mjpg-streamer/www/bodybg.gif A mjpg-streamer/www/jquery.ui.widget.min.js A mjpg-streamer/www/fix.css A mjpg-streamer/TODO A mjpg-streamer/mjpg_streamer.h A mjpg-streamer/start.sh A mjpg-streamer/utils.h A mjpg-streamer/CHANGELOG A mjpg-streamer/scripts A mjpg-streamer/scripts/make_deb.sh A mjpg-streamer/Makefile A mjpg-streamer/README Ausgecheckt, Revision 182. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
pi@raspberrypivpn ~ $ cd mjpg-streamer/ pi@raspberrypivpn ~/mjpg-streamer $ ls -l insgesamt 88 -rw-r--r-- 1 pi pi 102 Jul 3 14:53 CHANGELOG -rw-r--r-- 1 pi pi 17987 Jul 3 14:53 LICENSE -rw-r--r-- 1 pi pi 5107 Jul 3 14:53 Makefile -rw-r--r-- 1 pi pi 15738 Jul 3 14:53 mjpg_streamer.c -rw-r--r-- 1 pi pi 3617 Jul 3 14:53 mjpg_streamer.h drwxr-xr-x 13 pi pi 4096 Jul 3 14:53 plugins -rw-r--r-- 1 pi pi 2631 Jul 3 14:53 README drwxr-xr-x 2 pi pi 4096 Jul 3 14:53 scripts -rwxr-xr-x 1 pi pi 4630 Jul 3 14:53 start.sh -rw-r--r-- 1 pi pi 285 Jul 3 14:53 TODO -rw-r--r-- 1 pi pi 2866 Jul 3 14:53 utils.c -rw-r--r-- 1 pi pi 2399 Jul 3 14:53 utils.h drwxr-xr-x 2 pi pi 4096 Jul 3 14:53 www pi@raspberrypivpn ~/mjpg-streamer $ make gcc -D'SVN_REV="3:172"' -O2 -DLINUX -D_GNU_SOURCE -Wall -c -o mjpg_streamer.o mjpg_streamer.c gcc -D'SVN_REV="3:172"' -O2 -DLINUX -D_GNU_SOURCE -Wall -c -o utils.o utils.c gcc -D'SVN_REV="3:172"' -O2 -DLINUX -D_GNU_SOURCE -Wall mjpg_streamer.o utils.o -lpthread -ldl -o mjpg_streamer chmod 755 mjpg_streamer make -C plugins/input_uvc all make[1]: Entering directory `/home/pi/mjpg-streamer/plugins/input_uvc' gcc -c -O1 -DLINUX -D_GNU_SOURCE -Wall -shared -fPIC -o v4l2uvc.lo v4l2uvc.c v4l2uvc.c: In function âinit_videoInâ: v4l2uvc.c:88:23: warning: variable âcurrentHeightâ set but not used [-Wunused-but-set-variable] v4l2uvc.c:88:9: warning: variable âcurrentWidthâ set but not used [-Wunused-but-set-variable] gcc -c -O1 -DLINUX -D_GNU_SOURCE -Wall -shared -fPIC -o jpeg_utils.lo jpeg_utils.c gcc -c -O1 -DLINUX -D_GNU_SOURCE -Wall -shared -fPIC -o dynctrl.lo dynctrl.c gcc -O1 -DLINUX -D_GNU_SOURCE -Wall -shared -fPIC -o input_uvc.so input_uvc.c v4l2uvc.lo jpeg_utils.lo dynctrl.lo -ljpeg make[1]: Leaving directory `/home/pi/mjpg-streamer/plugins/input_uvc' cp plugins/input_uvc/input_uvc.so . make -C plugins/output_file all make[1]: Entering directory `/home/pi/mjpg-streamer/plugins/output_file' gcc -O2 -DLINUX -D_GNU_SOURCE -Wall -shared -fPIC -o output_file.so output_file.c make[1]: Leaving directory `/home/pi/mjpg-streamer/plugins/output_file' cp plugins/output_file/output_file.so . make -C plugins/output_udp all make[1]: Entering directory `/home/pi/mjpg-streamer/plugins/output_udp' gcc -O2 -DLINUX -D_GNU_SOURCE -Wall -shared -fPIC -o output_udp.so output_udp.c make[1]: Leaving directory `/home/pi/mjpg-streamer/plugins/output_udp' cp plugins/output_udp/output_udp.so . make -C plugins/output_http all make[1]: Entering directory `/home/pi/mjpg-streamer/plugins/output_http' gcc -c -O1 -DLINUX -D_GNU_SOURCE -Wall -shared -fPIC -o httpd.lo httpd.c gcc -O1 -DLINUX -D_GNU_SOURCE -Wall -shared -fPIC -o output_http.so output_http.c httpd.lo make[1]: Leaving directory `/home/pi/mjpg-streamer/plugins/output_http' cp plugins/output_http/output_http.so . make -C plugins/input_testpicture all make[1]: Entering directory `/home/pi/mjpg-streamer/plugins/input_testpicture' convert pictures/960x720_1.jpg -resize 640x480! pictures/640x480_1.jpg convert pictures/960x720_1.jpg -resize 320x240! pictures/320x240_1.jpg convert pictures/960x720_1.jpg -resize 160x120! pictures/160x120_1.jpg converting file: 160x120_1.jpg converting file: 320x240_1.jpg converting file: 640x480_1.jpg converting file: 960x720_1.jpg converting file: 160x120_2.jpg converting file: 320x240_2.jpg converting file: 640x480_2.jpg converting file: 960x720_2.jpg gcc -O2 -DLINUX -D_GNU_SOURCE -Wall -shared -fPIC -o input_testpicture.so input_testpicture.c make[1]: Leaving directory `/home/pi/mjpg-streamer/plugins/input_testpicture' cp plugins/input_testpicture/input_testpicture.so . make -C plugins/input_file all make[1]: Entering directory `/home/pi/mjpg-streamer/plugins/input_file' gcc -O2 -DLINUX -D_GNU_SOURCE -Wall -shared -fPIC -o input_file.so input_file.c make[1]: Leaving directory `/home/pi/mjpg-streamer/plugins/input_file' cp plugins/input_file/input_file.so . pi@raspberrypivpn ~/mjpg-streamer $ sudo make install install --mode=755 mjpg_streamer /usr/local/bin install --mode=644 input_uvc.so output_file.so output_udp.so output_http.so input_testpicture.so input_file.so /usr/local/lib/ install --mode=755 -d /usr/local/www install --mode=644 -D www/* /usr/local/www pi@raspberrypivpn ~/mjpg-streamer $ |
1 |
./mjpg_streamer -i "./input_uvc.so -n -y -f 15 -r 1280x720" -o "./output_http.so -n -w ./www -p 8060" |
danach einen reboot
1 |
sudo reboot |
und mit
1 2 3 4 5 6 7 8 9 10 11 |
pi@raspberrypivpn ~/mjpg-streamer $ ./mjpg_streamer -i "./input_uvc.so -n -y -f 15 -r 1280x720" -o "./output_http.so -n -w ./www -p 8060" MJPG Streamer Version: svn rev: 3:172 i: Using V4L2 device.: /dev/video0 i: Desired Resolution: 1280 x 720 i: Frames Per Second.: 15 i: Format............: YUV i: JPEG Quality......: 80 o: www-folder-path...: ./www/ o: HTTP TCP port.....: 8060 o: username:password.: disabled o: commands..........: disabled |
die Anwendung starten. Diese kann dann in einem screen gestartet werden damit die cam auch weiter läuft nachdem die console geschlossen wurde.