Aart MQTT notes: verschil tussen versies
(Nieuwe pagina aangemaakt met 'These are my personal notes & developments; any opinion expressed on this page is just that :-) = MQTT on Wifi Principals = * assume no privacy * Use short, syst...') |
(→Sensors) |
||
Regel 12: | Regel 12: | ||
== Sensors == | == Sensors == | ||
− | Use test programs to test sensors and | + | |
− | * | + | === Links === |
− | * Neopixel | + | |
− | * HIH6030 | + | Use proven test programs & setups to test the sensors, hardware and Wifi / MQTT setup before putting it all together. |
− | * Senseair K30 | + | |
− | * | + | Links to datasheets, standard libraries & examples of sensors i use; use the Arduino library manager to get these: |
− | * | + | * DS18S20 One-wire thermometer. [https://datasheets.maximintegrated.com/en/ds/DS18B20.pdf Datasheet] [http://playground.arduino.cc/Learning/OneWire OneWire] |
+ | * Neopixel leds: [https://cdn-shop.adafruit.com/datasheets/WS2812B.pdf Datasheet] [https://github.com/FastLED/FastLED FastLED library] | ||
+ | * HIH6030 i2c temperature & humidity. [https://sensing.honeywell.com/index.php/ci_id/142165/la_id/1/document/1/re_id/0 Datasheet] [http://playground.arduino.cc/Main/HoneywellHumidIconTMDigitalHumidity-TemperatureSensors Honeywell HIH library] | ||
+ | * Senseair K30 CO2 sensor [http://www.senseair.asia/Datablad/K30_Platform_description.pdf Datasheet] | ||
+ | * MQTT: [https://github.com/adafruit/Adafruit_MQTT_Library Adafruit library] | ||
+ | |||
+ | === My own code === | ||
+ | * Non blocking [[Single DS reader]] | ||
= Pi3B Broker = | = Pi3B Broker = |
Versie van 9 mrt 2017 om 16:28
These are my personal notes & developments; any opinion expressed on this page is just that :-)
Inhoud
MQTT on Wifi Principals
- assume no privacy
- Use short, systematic but human readable topics and messages. Using a room number in common use is fine, an eight byte digital address is not. Use standard units and formatting (e.g. aart/kitchen/temperature 17,2 )
- Minimize the amount of wires, use more nodes if required
- Hardware- and MQTT configurations are managed in the source for now, as nodes tend to be all different. Counter offsets can be set after a power up by posting on MQTT.
ESP8266 Node firmware development
ESP Boards
Sensors
Links
Use proven test programs & setups to test the sensors, hardware and Wifi / MQTT setup before putting it all together.
Links to datasheets, standard libraries & examples of sensors i use; use the Arduino library manager to get these:
- DS18S20 One-wire thermometer. Datasheet OneWire
- Neopixel leds: Datasheet FastLED library
- HIH6030 i2c temperature & humidity. Datasheet Honeywell HIH library
- Senseair K30 CO2 sensor Datasheet
- MQTT: Adafruit library
My own code
- Non blocking Single DS reader
Pi3B Broker
Makerspace Leiden workshop on 27-02-2017
Raspbian
- Download: Raspbian lite
- Install on SD card following the instructions
Using a serial console
- add line "enable_uart=1" at the end of /boot/config.txt
- Pins: GPIO 6 gnd, 8 Pi Txd, 10 Pi RxD - 3V3 logic levels (!)
- Speed: 115200
Update
Run:
- apt update
- apt -y upgrade