r0bocamp2016 Гліб Вінніков home automation by esp8266
TRANSCRIPT
![Page 1: R0boCamp2016 Гліб Вінніков Home automation by ESP8266](https://reader034.vdocument.in/reader034/viewer/2022042619/5871ac941a28abda6a8b5b7b/html5/thumbnails/1.jpg)
HOME AUTOMATION BY
ESP8266
GLEB VINNIKOV
![Page 2: R0boCamp2016 Гліб Вінніков Home automation by ESP8266](https://reader034.vdocument.in/reader034/viewer/2022042619/5871ac941a28abda6a8b5b7b/html5/thumbnails/2.jpg)
I AM
• Many years in IT :)
• FullStack Developer
• JavaScript, NodeJS, AngularJS, etc …
• Independent contractor/IT Expert/CTO
• Pet projects: IoT, Arduino, Hardware, etc …
![Page 3: R0boCamp2016 Гліб Вінніков Home automation by ESP8266](https://reader034.vdocument.in/reader034/viewer/2022042619/5871ac941a28abda6a8b5b7b/html5/thumbnails/3.jpg)
PLAN
• Already finished
• Habits
• Standard tasks
![Page 4: R0boCamp2016 Гліб Вінніков Home automation by ESP8266](https://reader034.vdocument.in/reader034/viewer/2022042619/5871ac941a28abda6a8b5b7b/html5/thumbnails/4.jpg)
PRODUCTION
• A lot of communications
• Constant changes
• Interference
![Page 5: R0boCamp2016 Гліб Вінніков Home automation by ESP8266](https://reader034.vdocument.in/reader034/viewer/2022042619/5871ac941a28abda6a8b5b7b/html5/thumbnails/5.jpg)
???
• Beginners
• Documentations
• Examples on github/stackoverflow
• Ready projects
• Easy toolchains, IDE
• Large community
• Cheap
• Wide specifications
• Flexible
![Page 6: R0boCamp2016 Гліб Вінніков Home automation by ESP8266](https://reader034.vdocument.in/reader034/viewer/2022042619/5871ac941a28abda6a8b5b7b/html5/thumbnails/6.jpg)
ESP8266
• http://espressif.com
• http://bbs.espressif.com/
• CPU: Tensilica L106 32-bit micro controller
• Operating Voltage: 3.0 ~ 3.6V
• Operating Current: ~80mA
![Page 7: R0boCamp2016 Гліб Вінніков Home automation by ESP8266](https://reader034.vdocument.in/reader034/viewer/2022042619/5871ac941a28abda6a8b5b7b/html5/thumbnails/7.jpg)
ESP8266 FAMILY
• ESP01 - 12
• Form factors
• Diff. antennas
• Flash memory 512K-4M
![Page 8: R0boCamp2016 Гліб Вінніков Home automation by ESP8266](https://reader034.vdocument.in/reader034/viewer/2022042619/5871ac941a28abda6a8b5b7b/html5/thumbnails/8.jpg)
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
![Page 9: R0boCamp2016 Гліб Вінніков Home automation by ESP8266](https://reader034.vdocument.in/reader034/viewer/2022042619/5871ac941a28abda6a8b5b7b/html5/thumbnails/9.jpg)
NETWORK PROTOCOLS
• IPv4
• TCP
• UDP
• HTTP/HTTPS
• FTP
![Page 10: R0boCamp2016 Гліб Вінніков Home automation by ESP8266](https://reader034.vdocument.in/reader034/viewer/2022042619/5871ac941a28abda6a8b5b7b/html5/thumbnails/10.jpg)
PERIPHERAL BUS
• UART
• SDIO
• SPI
• I2C
• I2S
• GPIO
• ADC
• PWM
![Page 11: R0boCamp2016 Гліб Вінніков Home automation by ESP8266](https://reader034.vdocument.in/reader034/viewer/2022042619/5871ac941a28abda6a8b5b7b/html5/thumbnails/11.jpg)
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
![Page 12: R0boCamp2016 Гліб Вінніков Home automation by ESP8266](https://reader034.vdocument.in/reader034/viewer/2022042619/5871ac941a28abda6a8b5b7b/html5/thumbnails/12.jpg)
NODEMCU
FIRMWARES
• http://nodemcu.com/
• LUA
• NodeMCU DevKit
• http://esp8266.ru/esplorer/
• Libs <
• need much more memory
• upload by file
![Page 13: R0boCamp2016 Гліб Вінніков Home automation by ESP8266](https://reader034.vdocument.in/reader034/viewer/2022042619/5871ac941a28abda6a8b5b7b/html5/thumbnails/13.jpg)
ARDUINO
FIRMWARES
• Arduino IDE
• C/C++
• Libs >
• https://github.com/esp8266/Arduino
• gitter community!
• load common bundle
![Page 14: R0boCamp2016 Гліб Вінніков Home automation by ESP8266](https://reader034.vdocument.in/reader034/viewer/2022042619/5871ac941a28abda6a8b5b7b/html5/thumbnails/14.jpg)
FIRMWARES
• MicroPython
• https://github.com/micropython/micropython
• cesanta/mongoose-iot
![Page 15: R0boCamp2016 Гліб Вінніков Home automation by ESP8266](https://reader034.vdocument.in/reader034/viewer/2022042619/5871ac941a28abda6a8b5b7b/html5/thumbnails/15.jpg)
TOOLCHAINS
• esptool.py
• https://github.com/nodemcu/nodemcu-flasher
• Espressif
![Page 16: R0boCamp2016 Гліб Вінніков Home automation by ESP8266](https://reader034.vdocument.in/reader034/viewer/2022042619/5871ac941a28abda6a8b5b7b/html5/thumbnails/16.jpg)
TOOLCHAINS
• Arduino IDE
• http://platformio.org/
• http://codebender.cc
• http://www.blynk.cc/
![Page 17: R0boCamp2016 Гліб Вінніков Home automation by ESP8266](https://reader034.vdocument.in/reader034/viewer/2022042619/5871ac941a28abda6a8b5b7b/html5/thumbnails/17.jpg)
FIRMWARE UPGRADE
• UART Download
• OTA (via network if 2x RAM)
![Page 18: R0boCamp2016 Гліб Вінніков Home automation by ESP8266](https://reader034.vdocument.in/reader034/viewer/2022042619/5871ac941a28abda6a8b5b7b/html5/thumbnails/18.jpg)
DEV BOARDS
• ready dev boards
• adapters
• FDTI
![Page 19: R0boCamp2016 Гліб Вінніков Home automation by ESP8266](https://reader034.vdocument.in/reader034/viewer/2022042619/5871ac941a28abda6a8b5b7b/html5/thumbnails/19.jpg)
DARK SIDE
• Power consumptions: up to 170Ma
• Stability
• Range distance
![Page 20: R0boCamp2016 Гліб Вінніков Home automation by ESP8266](https://reader034.vdocument.in/reader034/viewer/2022042619/5871ac941a28abda6a8b5b7b/html5/thumbnails/20.jpg)
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
![Page 21: R0boCamp2016 Гліб Вінніков Home automation by ESP8266](https://reader034.vdocument.in/reader034/viewer/2022042619/5871ac941a28abda6a8b5b7b/html5/thumbnails/21.jpg)
HA SERVERS
• create IoT network
• home-assistant.io
• openhab.org
• http://freedomotic.com/
![Page 22: R0boCamp2016 Гліб Вінніков Home automation by ESP8266](https://reader034.vdocument.in/reader034/viewer/2022042619/5871ac941a28abda6a8b5b7b/html5/thumbnails/22.jpg)
HOME ASSISTANT
• http://home-assistant.io
• Opensource
• Python
• Win, Mac, Ubuntu, RPI, …
• Components >
• Mobile, Desktop
• Automate
![Page 23: R0boCamp2016 Гліб Вінніков Home automation by ESP8266](https://reader034.vdocument.in/reader034/viewer/2022042619/5871ac941a28abda6a8b5b7b/html5/thumbnails/23.jpg)
COMMUNICATION
![Page 24: R0boCamp2016 Гліб Вінніков Home automation by ESP8266](https://reader034.vdocument.in/reader034/viewer/2022042619/5871ac941a28abda6a8b5b7b/html5/thumbnails/24.jpg)
MQTT
• MQ Telemetry Transport
• Lightweight
• PubSub
• QoS
• TCP based
![Page 25: R0boCamp2016 Гліб Вінніков Home automation by ESP8266](https://reader034.vdocument.in/reader034/viewer/2022042619/5871ac941a28abda6a8b5b7b/html5/thumbnails/25.jpg)
HTTP VS MQTT
HTTP
• Overhead
• No QoS
MQTT
• Lightweight
• QoS
• TCP based
http://stephendnicholas.com/posts/power-profiling-mqtt-vs-https
![Page 26: R0boCamp2016 Гліб Вінніков Home automation by ESP8266](https://reader034.vdocument.in/reader034/viewer/2022042619/5871ac941a28abda6a8b5b7b/html5/thumbnails/26.jpg)
MQTT SOFT
• Mosquitto - Open Source MQTT
• Clients for all langs
• Mob. apps
• Browser extensions`
• cloudmqtt.com
• https://thingmq.com/
![Page 27: R0boCamp2016 Гліб Вінніков Home automation by ESP8266](https://reader034.vdocument.in/reader034/viewer/2022042619/5871ac941a28abda6a8b5b7b/html5/thumbnails/27.jpg)
MORE EXAMPLES!
![Page 28: R0boCamp2016 Гліб Вінніков Home automation by ESP8266](https://reader034.vdocument.in/reader034/viewer/2022042619/5871ac941a28abda6a8b5b7b/html5/thumbnails/28.jpg)
THANKS!
• http://www.slideshare.net/glebvinnikov
• https://twitter.com/Gleb_V