本システムの動作は、タイムリーに行いたかったため、Firebase の Realtime Database を利用しました。
今回、M5Atom Lite には WiFiとIR送信機がパッケージされているので、赤外線リモコンの役割を担ってもらいました。
本システムの動作の流れを説明します。
- ユーザーは スマートスピーカーに 「エアコンつけて/消して」と呼びかける。(音声アシスタントを呼び、音声コマンドを入力。)
- 事前に作成したIFTTTのアプレットが 音声アシスタントをトリガーとして 起動する。
- IFTTTで設定したThing (Webhooks) により、Firebaseへ HTTP送信して Databaseの変数を変更する。
- M5Atom Lite は Firebase の Database の更新を待っており、変更があったタイミングで、IR信号を発光する。
- IR信号を受けた エアコンは "電源オン" or "電源オフ" する。
I wanted to operate this system in a timely manner, so I used Firebase's Realtime Database. This time, the M5Atom Lite comes packaged with a WiFi and IR transmitter, so I asked them to act as an infrared remote controller. This section describes the operation flow of this system.
- The user calls the smart speaker to "turn on / off the air conditioner". (Call the voice assistant and enter voice commands.)
- The pre-created IFTTT applet is triggered by the Voice Assistant.
- By Thing (Webhooks) set in IFTTT, HTTP is sent to Firebase to change the variables of her Database.
- M5Atom Lite is waiting for the Firebase Database to be updated, and emits an IR signal when there is a change.
- Her air conditioner that receives the IR signal "powers on" or "powers off".