Aart MQTT notes

Uit MakerSpace Leiden
Versie door Aart (overleg | bijdragen) op 9 mrt 2017 om 11:19 (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...')
(wijz) ← Oudere versie | Huidige versie (wijz) | Nieuwere versie → (wijz)
Ga naar: navigatie, zoeken

These are my personal notes & developments; any opinion expressed on this page is just that :-)

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

Use test programs to test sensors and hardware / Wifi / MQTT setup before putting it together.

  • OneWire Temperature lib / example:
  • Neopixel lib / example:
  • HIH6030 (i2c temperature & humidity):
  • Senseair K30 analog (CO2):
  • Thermal mains voltage sensor:
  • Adafruit MQTT example:

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

Configure WLAN as accespoint & build a bridge

hostapd