Basics of home automation and analysis application of Internet of Lights focusing more on backend and architecture. How we allowed strangers to illuminate our garden.
Talk given at Warsaw Ruby User Group in January 2020. ( https://www.youtube.com/watch?v=FxZZTWp7yc4 )
For better quality, please download the presentation
2. - CTO of Visuality 3 years
- Prepared many different architectures for differents parts of the technology
- Architectured a couple of production grade IoT systems internally and
commercially
- Created many tailored internal IoT projects
- Created IoT Team & Room
3. IoT Team
- Magic Mirror
- Christmas Lights
- KitchenApp
- Sesame - slack door opener
- GarageDoor
4. Objectives
- Learn Basics of Home Automation
- Analyze an application of Internet of Lights
focusing more on backend and
architecture
Out of scope
- Details of given solution
- Architecture’s relation to computers
- Connection protocols
- Details of NFs implementation
- Alternative components
- IoT or IoL definitions
- Frontend details
- Testing
- What can go wrong & backup scenarios
- Business perspective
- Projecting and team work
- Challenges
17. How to connect end users to see what’s going on?
- Streaming
- YouTube
- In the beginning was the most challenging part as we didn’t know much about
it and we needed to connect to our IP camera
18.
19. Stream the input from camera to YouTube
ffmpeg -an -f lavfi -i anullsrc -rtsp_transport tcp
-i rtsp://IP_CAMERA/live1.sdp -tune zerolatency -vcodec libx264
-pix_fmt + -c:v copy -c:a aac -strict experimental
-f flv rtmp://a.rtmp.youtube.com/live2/YOUTUBE_TOKEN
20. What are the other ways that Switch and Backend
can communicate?
- Sending commands directly to the device
- Device checking if there’s a new message every 1 second
- Particle’s service(calling functions via HTTP requests)
- Chat(good for animations - continuous conversation, history, queuing, online
status, no need to reconnect, errors are handled)
21.
22. MQTT
MQTT(MessageQueue Telemetry Transport) is a machine-to-machine
(M2M)/"Internet of Things" connectivity protocol.
- It was designed as an extremely lightweight publish/subscribe messaging
transport.
- It is useful for connections with remote locations where a small code
footprint is required
- and/or network bandwidth is at a premium.
25. Project: Christmas Lights
Live webcam stream with buttons which will let people to turn on/off the lights,
so someone from somewhere can share the Christmas Spirit online.
- Features:
- Web-controlled lights
- Send animations
- Landing page
- NFs
- No fragile solution
- Near real time feeling
- Fault tolerant
- Until Christmas time(2016) :)
35. MQTT worker
- Handles the queue of animations
and MQTT communication
- Works 2 ways, knows when
animation is started and finished
- Auto recovers the system if
something is stuck