NodeRedでAlexa連携

by K.I
Date 181205〜181219

Index


概要


[top]

NodeRed

NodeRedアップグレード

$ cd ~/.node-red
$ npm rebuild

NodeRedの起動

NodeRedのプログラム

追加ノードのインストール

DashBoard

フローの保存

[{"id":"f8eef13c.d0d9a","type":"tab","label":"Flow 1","disabled":false,"info":""},
{"id":"da6d27cc.816308","type":"ui_slider","z":"f8eef13c.d0d9a","name":"","label":"slider","tooltip":"","group":"7f89b930.684488","order":1,"width":0,"height":0,"passthru":true,"outs":"all","topic":"","min":0,"max":10,"step":1,"x":343,"y":1570,"wires":[["8e8b80be.e524b","3d5bdbc5.7a3f04"]]},
{"id":"8e8b80be.e524b","type":"ui_gauge","z":"f8eef13c.d0d9a","name":"","group":"7f89b930.684488","order":2,"width":0,"height":0,"gtype":"gage","title":"gauge","label":"units","format":"{{value}}","min":0,"max":10,"colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":512,"y":1541,"wires":[]},
{"id":"3d5bdbc5.7a3f04","type":"ui_chart","z":"f8eef13c.d0d9a","name":"","group":"7f89b930.684488","order":2,"width":0,"height":0,"label":"chart","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"x":512,"y":1611,"wires":[[],[]]},
{"id":"7f89b930.684488","type":"ui_group","name":"Group 1","tab":"83cc1169.5074b","order":1,"disp":true,"width":6},
{"id":"83cc1169.5074b","type":"ui_tab","name":"Tab 1","icon":"dashboard","order":1}]

別のプログラムを実行


1これはちゃんと固定IPにしてIPアドレスを指定した方が良い。
2NodeRedは、ノードを部品としていろいろ追加することができるらしい。
3見やすいように、ノード毎に改行を入れた。
4NodeRedのインスタンスを複数生成するということになるらしい。

[top]

RaspberryPiでLED点灯

MouseでLED点灯

TriggerでLED点灯

Functionで反転させる


5ということだと思うが、ここら辺はあまり自信がない。

[top]

Alexa連携

デバイス設定

Alexaのデバイスを確認

Alexa Home Skill Bridge インストール

Alexa home ノード

やっぱりLED点灯

PCのON/OFF


6下にある、検出ボタンを押すと更新されるようだ。
7たぶん、Alexaに適当な応答をしてくれるものなんじゃないかと思う。
8これはやってみると思ったよりも面白い!意味もなく何回も点灯したり、消したりしてしまう。

[top]

まとめ


[top]

参考


[top] [電子工作関連に戻る]

comments powered by Disqus