Benutzer:MathiasMahnke/Luftdaten: Unterschied zwischen den Versionen
Aus Opennet
(→Sammelbestellung Sept. 2017) |
(→API Server) |
||
Zeile 53: | Zeile 53: | ||
PHP unter LEDE/OpenWrt installieren (ca. 1,6 MB im Flash): | PHP unter LEDE/OpenWrt installieren (ca. 1,6 MB im Flash): | ||
opkg update | opkg update | ||
− | opkg install php5 | + | opkg install php5 php5-cgi |
− | + | opkg install zoneinfo-core zoneinfo-europe | |
− | opkg install zoneinfo-core | + | |
Falls in "php-cgi -m" sockets nicht enthalten ist: | Falls in "php-cgi -m" sockets nicht enthalten ist: | ||
Zeile 66: | Zeile 65: | ||
... | ... | ||
list interpreter ".php=/usr/bin/php-cgi" | list interpreter ".php=/usr/bin/php-cgi" | ||
+ | |||
+ | Zeitzone manuell in /etc/php.ini setzen: | ||
+ | [Date] | ||
+ | date.timezone = Europe/Berlin | ||
=== Sammelbestellung Sept. 2017 === | === Sammelbestellung Sept. 2017 === |
Version vom 15. Oktober 2017, 18:31 Uhr
Inhaltsverzeichnis |
Materialliste
- CH340 NodeMcu V3 WIFI (Basis ESP8266)
- USB EU Wall Charger Plug 5V AC
- Flat Micro Usb Cable 2.0 Data Sync Cable (2 m)
- Dupont Cable 20cm 2.54mm 1pin 1p-1p Female to Female Jumper Wire (7 Stück)
- Laser PM2.5 sensor SDS011 / particle & dust sensor
- DHT22 digital temperature and humidity sensor module (Basis AM2302)
- HT Bogen DN 75 87° (2 Stück)
- PVC Schlauch 6 mm Innen / 9 mm Außen (ca. 20 cm)
- div. Kabelbinder
- Fliegengitter od. ähnliches
ca. 35 EUR (2017)
Installation
CH34x USB Driver:
brew tap mengbo/ch340g-ch34g-ch34x-mac-os-x-driver https://github.com/mengbo/ch340g-ch34g-ch34x-mac-os-x-driver brew cask install wch-ch34x-usb-serial-driver
Device (ggf. aufsteigende ID):
/dev/cu.wchusbserial1410
Arduino IDE:
brew cask install arduino
- Menü > Einstellungen > Additional Board Manager URLs (Zusätzliche Boardverwalter-URLs) = http://arduino.esp8266.com/stable/package_esp8266com_index.json
- Menü > Werkzeuge > Bord: Arduino.. > Boardverwalter > Suche = esp8266 + "Installieren"
Luftdaten DE Firmware:
cd /tmp wget https://www.madavi.de/sensor/update/data/latest_de.bin ~/Library/Arduino15/packages/esp8266/tools/esptool/0.4.9/esptool -vv -cd nodemcu \ -cb 57600 -ca 0x00000 -cp /dev/cu.wchusbserial1410 -cf latest_de.bin
Betrieb
- http://rostock.maps.luftdaten.info/
- https://www.madavi.de/sensor/graph.php?sensor=esp8266-5478763-sds011 (ID = 5585)
- https://www.madavi.de/sensor/graph.php?sensor=esp8266-5478763-dht (ID = 5586)
- https://opensensemap.org/explore/59b6e71dd67eb50011566706
- http://1.27.aps.on:81/data.json (nur innerhalb von Opennet)
Bilder
API Server
PHP unter LEDE/OpenWrt installieren (ca. 1,6 MB im Flash):
opkg update opkg install php5 php5-cgi opkg install zoneinfo-core zoneinfo-europe
Falls in "php-cgi -m" sockets nicht enthalten ist:
opkg install php5-mod-sockets
Sowie dann sockets in /etc/php.ini aktivieren (andernfalls diesen Schritt überspringen):
extension=sockets.so
Webserver mit PHP Unterstützung, hierzu /etc/config/uhttpd erweitern:
config uhttpd 'main' ... list interpreter ".php=/usr/bin/php-cgi"
Zeitzone manuell in /etc/php.ini setzen:
[Date] date.timezone = Europe/Berlin
Sammelbestellung Sept. 2017
Name | Anzahl | Status |
---|---|---|
Lars K | 3 | Bezahlt |
Sascha S | 1 | Bezahlt |
Mathias | 2 | Bezahlt |
Opennet | 1 | Ausgelegt |
Matthias M | 0 | Abgesagt |
Oyla | 1 | Bezahlt |
Andreas K | 1 | Bezahlt |
Ingo J | 1 | Bezahlt |
Felix W | 2 | Bezahlt |
Dirk R | 1 | Bezahlt |
Oliver F | 1 | Bezahlt |
Tom H | 1 | Bezahlt |
Summe | 15 |
Komponente | Anzahl | AMZN | Summe | ALI | Summe | Bestellt - Anzahl | Bestellt - Preis | Geliefert |
---|---|---|---|---|---|---|---|---|
CH340 | 13 | 7,49 | 104,86 | 2,27 | 31,78 | 8 + 7 | 19,50 + 17,47 | |
USB Charger | 13 | 6,00 | 84,00 | 0,74 | 10,36 | 15 | 11,10 | |
USB Cable | 13 | 1,62 | 22,68 | 1,11 | 15,54 | 15 | 19,66 | |
Jumper Wire | 7 | 3,99 | 27,93 | 0,77 | 5,39 | 7 | 6,10 | |
SDS011 | 13 | 41,99 | 587,86 | 14,85 | 207,9 | 2 + 3*2 + 2*2 | 29,66 + 3*29,66 + 2*29,82 (La) + 2*29,82 (La) + 14,91 (La) | |
DHT22 | 13 | 4,65 | 65,10 | 1,83 | 25,62 | 8 + 7 | 18,94 + 15,76 | |
BMP280 | 15 | 11,03 | ||||||
HT Bogen | 26 | 1,50 | 39 | 1 (Hornbach) | 26,00 | 28 | 25,9 | OK |
PVC Schlauch | 4 | 2,86 | 14,30 | 1,75 (Hornbach) | 8,75 | 5 | 4,75 | OK |
Summe | 945,73 | 331,34 | 148,86 + 3*29,66 + 30,65 + 2*29,82 + 2*29,82 + 14,91 |
26,85 EUR pro Person (Stand 2017/10/08)
TODO: Fliegengitter, Kabelbinder
TODO
- Luftdruck per BMP280 ?