HOME AUTOMATION BY
ESP8266
GLEB VINNIKOV
I AM
• Many years in IT :)
• FullStack Developer
• JavaScript, NodeJS, AngularJS, etc …
• Independent contractor/IT Expert/CTO
• Pet projects: IoT, Arduino, Hardware, etc …
PLAN
• Already finished
• Habits
• Standard tasks
PRODUCTION
• A lot of communications
• Constant changes
• Interference
???
• Beginners
• Documentations
• Examples on github/stackoverflow
• Ready projects
• Easy toolchains, IDE
• Large community
• Cheap
• Wide specifications
• Flexible
ESP8266
• http://espressif.com
• http://bbs.espressif.com/
• CPU: Tensilica L106 32-bit micro controller
• Operating Voltage: 3.0 ~ 3.6V
• Operating Current: ~80mA
ESP8266 FAMILY
• ESP01 - 12
• Form factors
• Diff. antennas
• Flash memory 512K-4M
WI-FI
• Wi-Fi: 802.11 b/g/n
• Wi-Fi mode: station/softAP/SoftAP+station, WPA/WPA2, WEP/TKIP/AES
• Types of Antenna: PCB Trace, External, IPEX Connector, Ceramic Chip
NETWORK PROTOCOLS
• IPv4
• TCP
• UDP
• HTTP/HTTPS
• FTP
PERIPHERAL BUS
• UART
• SDIO
• SPI
• I2C
• I2S
• GPIO
• ADC
• PWM
ESPRESSIF
FIRMWARES
• http://bbs.espressif.com
• AT commands
• SDK> AT > OK
> AT+GMR > AT version:0.60.0.0(Feb 2 2016 18:43:31) SDK version:1.5.2(80914727) compile time:Feb 2 2016 18:59:50 OK
NODEMCU
FIRMWARES
• http://nodemcu.com/
• LUA
• NodeMCU DevKit
• http://esp8266.ru/esplorer/
• Libs <
• need much more memory
• upload by file
ARDUINO
FIRMWARES
• Arduino IDE
• C/C++
• Libs >
• https://github.com/esp8266/Arduino
• gitter community!
• load common bundle
FIRMWARES
• MicroPython
• https://github.com/micropython/micropython
• cesanta/mongoose-iot
TOOLCHAINS
• esptool.py
• https://github.com/nodemcu/nodemcu-flasher
• Espressif
TOOLCHAINS
• Arduino IDE
• http://platformio.org/
• http://codebender.cc
• http://www.blynk.cc/
FIRMWARE UPGRADE
• UART Download
• OTA (via network if 2x RAM)
DEV BOARDS
• ready dev boards
• adapters
• FDTI
DARK SIDE
• Power consumptions: up to 170Ma
• Stability
• Range distance
WHAT’S NEXT?
• Work without i-net
• Network, routing , VPN, port forwarding
• Heterogeneous env
• Device management (DHCP, DNS, Provisioning)
• Automatization
• Visualization
• Access from inside/outside
• Web/mobile
HA SERVERS
• create IoT network
• home-assistant.io
• openhab.org
• http://freedomotic.com/
HOME ASSISTANT
• http://home-assistant.io
• Opensource
• Python
• Win, Mac, Ubuntu, RPI, …
• Components >
• Mobile, Desktop
• Automate
COMMUNICATION
MQTT
• MQ Telemetry Transport
• Lightweight
• PubSub
• QoS
• TCP based
HTTP VS MQTT
HTTP
• Overhead
• No QoS
MQTT
• Lightweight
• QoS
• TCP based
http://stephendnicholas.com/posts/power-profiling-mqtt-vs-https
MQTT SOFT
• Mosquitto - Open Source MQTT
• Clients for all langs
• Mob. apps
• Browser extensions`
• cloudmqtt.com
• https://thingmq.com/
MORE EXAMPLES!
THANKS!
• http://www.slideshare.net/glebvinnikov
• https://twitter.com/Gleb_V
Top Related