Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Home Automation with MicroPython, the ESP8266 a...

Dale Humby
October 16, 2020

Home Automation with MicroPython, the ESP8266 and Google Home

In this IoT talk we will demo a home automation project by wiring up a switch to an ESP8266, write and load a MicroPython web service on the hardware, link it to Home Assistant.

This is a live hardware build and coding session. All hardware will be locally sourced, the instructions and code will be on GitHub.

https://github.com/dalehumby/DevFest2020

Dale Humby

October 16, 2020
Tweet

More Decks by Dale Humby

Other Decks in Technology

Transcript

  1. Home Automation with MicroPython, the ESP8266 and Google Home Dale

    Humby CTO, Nomanini Google Cloud Developer Expert
  2. Price ±R1,400 1.5 - 2 GHz CPU 4 GB RAM

    Gigabit Ethernet Low power < 5W 40 PIN GPIO
  3. Price ±R1,400 1.5 - 2 GHz CPU 4 GB RAM

    Gigabit Ethernet Low power < 5W 40 PIN GPIO Debian 10 / Raspberry OS Onboard WiFi + Bluetooth LE 2x mini-HDMI 2x USB2 + 2xUSB3 5V USB type-C Needs heatsink!
  4. Price ±R1,400 1.5 - 2 GHz CPU 4 GB RAM

    Gigabit Ethernet Low power < 5W 40 PIN GPIO Debian 10 / Raspberry OS Onboard WiFi + Bluetooth LE 2x mini-HDMI 2x USB2 + 2xUSB3 5V USB type-C Needs heatsink! Ubunt 20.04 / Android 9 1x full-size HDMI 4x USB3 Voltage range 5-17 V
  5. Home Assistant: Home automation Mosquitto MQTT broker: Pub/Sub protocol Prometheus:

    Time series database Grafana: Visualisation Node-Red: Flow-based software control Home Automation / IoT Stack
  6. 1,000 flashes per kWh LDR sensor (R20) https://www.communica.co.za/products/bmt-ambient-light-sensor D1 Mini

    (R85) https://www.communica.co.za/products/bmt-esp8266ex-nodemcu-wifi-board Screen Scrapers for Hardware Hackers
  7. 1,000 flashes per kWh LDR sensor (R20) https://www.communica.co.za/products/bmt-ambient-light-sensor D1 Mini

    (R85) https://www.communica.co.za/products/bmt-esp8266ex-nodemcu-wifi-board Screen Scrapers for Hardware Hackers
  8. 1,000 flashes per kWh LDR sensor (R20) https://www.communica.co.za/products/bmt-ambient-light-sensor D1 Mini

    (R85) https://www.communica.co.za/products/bmt-esp8266ex-nodemcu-wifi-board Screen Scrapers for Hardware Hackers
  9. 1,000 flashes per kWh ESP8266 D1 Mini LDR sensor (R20)

    https://www.communica.co.za/products/bmt-ambient-light-sensor D1 Mini (R85) https://www.communica.co.za/products/bmt-esp8266ex-nodemcu-wifi-board Screen Scrapers for Hardware Hackers
  10. https://en.wikipedia.org/wiki/ESP8266 https://www.espressif.com/ ESP8266 From Espressif Systems ... The Arduino killer

    32-bit CPU 80 MHz clock 160 kB RAM + 4 MB Flash Integrated WiFi + TCP/IP stack 16 GPIO pins / I2C / SPI / UART / ADC Cheap - used “everywhere”
  11. Resources MicroPython docs.micropython.org/en/latest/esp8266/tutorial/intro.html Home Assistant home-assistant.io Mosquitto MQTT mosquitto.org Where

    to buy {hardware} Communica communica.co.za Build Actions on Google Assistant codelabs.developers.google.com/codelabs/actions-1 Dale Humby github.com/dalehumby [email protected] dalehumby.com We’re hiring nomanini.com/careers