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

My Smart? Home Architecture with Golang

My Smart? Home Architecture with Golang

「我が家のアーキテクチャ with Gokang」
GoCon2015 summerにて

y_matsuwitter

June 22, 2015
Tweet

More Decks by y_matsuwitter

Other Decks in Programming

Transcript

  1. About me • Gunosy inc., Corporate Officer • iOS, Android,

    Infrastructure, Web, etc... • Uses Golang in production since 2014/02 • ਖ਼࠲
  2. 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)
  3. 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.
  4. MQTT with Go • MQTT Broker centered, event driven data

    flow. • One to many Pub/Sub message queueing. • 2 kind of topics. (/command, /sensor)
  5. RaspberryPi with Go • Collect sensor data (SHT21) • Send

    sensor values to MQTT broker • Monitored by mackerel-agent with kidoman/embd
  6. 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.
  7. IRKit with Go • Wifi connected remote controller • HTTP

    API • MQTT broker => command event => Go => Power on/off More about IRKit => Link