IRKitは学習型のネットワーク赤外線リモコンで、wgetで赤外線データをjson形式で読み取り
これをwgetで出力すれば赤外線で操作できる
[root@remote-hand tmp]# wget http://192.168.1.192/messages --output-document=${WORKDIR}/irkit_out_document --post-data='{"format":"raw","freq":38,"data":[3968,1994,10762,1994,2813,1111,2813,1111,843,1111,843,1111,843,1111,843,1111,843,1111,843,1111,2911,1002,843,1111,843,1111,843,1111,843,1111,843,1111,843,1111,2813,1150,935,935,843,1111,843,1111,843,1111,843,1111,843,1111,843,1111,2813,1111,935,935,843,1111,843,1111,843,1111,843,1111,843,1111,843,1111,843,1111,935,935,843,1111,843,1111,2813,1111,2813,1111,843,1111,2813,1073,843,1111,843,21415,3834,1994,10762,1994,2813,1111,2813,1111,843,1111,843,1111,843,1111,843,1111,843,1111,843,1111,2911,1002,843,1111,843,1111,843,1111,843,1111,843,1111,843,1111,2813,1111,935,935,843,1111,873,1111,873,1111,873,1111,873,1111,873,1111,2813,1111,935,935,843,1111,873,1111,873,1111,873,1111,873,1111,873,1111,873,1111,873,1002,873,1002,873,1002,2813,1073,2813,1073,873,1073,2813,1073,873,1073,873,21415,3834,1994,10762,1994,2813,1073,2813,1073,873,1073,873,1073,873,1073,873,1073,873,1073,873,1073,2813,1073,873,1073,873,1073,873,1073,873,1073,873,1073,873,1073,2813,1111,935,935,935,1073,935,1073,935,1073,843,1111,843,1111,843,1111,2911,1037,935,935,935,1073,935,1073,935,1073,935,1073,935,1073,843,1111,843,1111,935,935,935,1073,935,1073,2813,1073,2813,1073,873,1073,2813,1073,873,1073,873]}'
Connecting to 192.168.1.192:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/plain]
Saving to: ‘/irkit_out_document’
[ <=> ] 0 --.-K/s in 0s
2014-08-14 17:39:07 (0.00 B/s) - ‘/irkit_out_document’ saved [0]
pepoと
IRKitは学習型のネットワーク赤外線リモコンで
wgetで赤外線データをjson形式で読み取ります
[root@remote-hand tmp]# wget http://192.168.1.192/messages --output-document=irkit_out_document
--2014-08-14 17:29:57-- http://192.168.1.192/messages
Connecting to 192.168.1.192:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/plain]
Saving to: ‘irkit_out_document’
[ <=> ] 1,218 --.-K/s in 0s
2014-08-14 17:29:57 (9.29 MB/s) - ‘irkit_out_document’ saved [1218]
[root@remote-hand tmp]#
[root@remote-hand tmp]# cat irkit_out_document
{"format":"raw","freq":38,"data":[3968,1994,10762,1994,2813,1111,2813,1111,843,1111,843,1111,843,1111,843,1111,843,1111,843,1111,2911,1002,843,1111,843,1111,843,1111,843,1111,843,1111,843,1111,2813,1150,935,935,843,1111,843,1111,843,1111,843,1111,843,1111,843,1111,2813,1111,935,935,843,1111,843,1111,843,1111,843,1111,843,1111,843,1111,843,1111,935,935,843,1111,843,1111,2813,1111,2813,1111,843,1111,2813,1073,843,1111,843,21415,3834,1994,10762,1994,2813,1111,2813,1111,843,1111,843,1111,843,1111,843,1111,843,1111,843,1111,2911,1002,843,1111,843,1111,843,1111,843,1111,843,1111,843,1111,2813,1111,935,935,843,1111,873,1111,873,1111,873,1111,873,1111,873,1111,2813,1111,935,935,843,1111,873,1111,873,1111,873,1111,873,1111,873,1111,873,1111,873,1002,873,1002,873,1002,2813,1073,2813,1073,873,1073,2813,1073,873,1073,873,21415,3834,1994,10762,1994,2813,1073,2813,1073,873,1073,873,1073,873,1073,873,1073,873,1073,873,1073,2813,1073,873,1073,873,1073,873,1073,873,1073,873,1073,873,1073,2813,1111,935,935,935,1073,935,1073,935,1073,843,1111,843,1111,843,1111,2911,1037,935,935,935,1073,935,1073,935,1073,935,1073,935,1073,843,1111,843,1111,935,935,935,1073,935,1073,2813,1073,2813,1073,873,1073,2813,1073,873,1073,873]}[root@remote-hand tmp]#
こんな感じよん
IRKitは学習型のネットワーク赤外線リモコンで
wgetで赤外線データをjson形式で読み取り
wgetで読み取ったjsonデータを出力する事が出来る
なので、Raspberry piを使い携帯メールでUSB 温度計の値を取得して
その結果を見てIRKit でクーラーオンしたり、LED照明の操作を行う事が出来る
[root@remote-hand ~]# cat /usr/local/bin/pepocooler_on
#!/bin/sh
#pepocooler_on
WORKDIR=/www/remote-hand/tmp
wget http://192.168.1.192/messages --output-document=${WORKDIR}/irkit_out_document --post-data='{"format":"raw","freq":38,"data":[6648,3458,787,2626,787,2626,787,787,787,904,787,904,787,2626,815,904,815,904,815,2626,815,2626,815,904,815,2537,787,935,761,935,761,2537,787,2537,935,843,761,2626,761,2626,761,843,843,843,761,2626,815,815,815,935,787,2626,815,815,815,935,761,935,935,935,761,935,761,935,761,935,843,935,761,904,761,904,761,904,761,904,761,904,761,904,761,904,761,904,761,904,761,2626,787,935,761,935,761,2626,787,935,761,935,761,2626,761,2626,761,935,761,935,761,935,761,935,761,935,761,935,761,935,761,2626,761,873,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,968,735,2626,735,2626,735,2626,735,2626,735,2626,735,968,735,968,735]}'
http://www.ospn.jp/osc2014-do/のときはIRKit が無かったけど
これが出張デモした100均ケースのRaspberry piよん
その上にあるのがIRKit
IRKitは奥の無線LANルータのそばに無いと繋がりませんよん
pepoと
Raspberry piを使い携帯メールでUSB 温度計の値を取得
携帯メール経由Raspberry piでIRKit でクーラーオンします