͍ͭͰGolangΤϯδχΞืूத
We are always hiring Golang
engineers.
Slide 5
Slide 5 text
About today's talk
• झຯ։ൃͰࣗΛͦΕͬΆ͍εϚʔτԽͨ͠
• The story about my (maybe not) intelligent home
Slide 6
Slide 6 text
Overview
Slide 7
Slide 7 text
Overview
• MQTT broker centered architecture
• RaspberryPi with temperature and humidity sensor
• Slack with bots
• IRKit (as air conditioner controller)
• Influxdb (for data store)
• Mackerel (for server monitoring)
Slide 8
Slide 8 text
with Golang!!
Slide 9
Slide 9 text
MQTT with Go
MQTT is a machine-to-machine (M2M)/"Internet of Things"
connectivity protocol.
It was designed as an extremely lightweight publish/subscribe
messaging transport.
Slide 10
Slide 10 text
MQTT with Go
• MQTT Broker centered, event driven data flow.
• One to many Pub/Sub message queueing.
• 2 kind of topics. (/command, /sensor)
Slide 11
Slide 11 text
RaspberryPi with Go
• Collect sensor data (SHT21)
• Send sensor values to MQTT broker
• Monitored by mackerel-agent
with kidoman/embd
Slide 12
Slide 12 text
Slack Bot with Go
• Using Slack's slash command and incoming webhook
integrations.
• A Slash command process sends command event to MQTT
Broker.
• Bot Processes receive events and send some information to
Slack.
Slide 13
Slide 13 text
IRKit with Go
• Wifi connected remote controller
• HTTP API
• MQTT broker => command event => Go => Power on/off
More about IRKit => Link
Slide 14
Slide 14 text
Demo
Slide 15
Slide 15 text
Point
• Send events and sensor values to MQTT anyway.
Slide 16
Slide 16 text
Golang empowers
your home hack.
Runs almost anywhere you want.