{{{ GoogleAdsense <script type="text/javascript"><!-- google_ad_client="pub-8866927345406277"; google_ad_host="pub-9941151214016196"; google_alternate_color="FFFFFF"; google_ad_width=468; google_ad_height=60; google_ad_format="468x60_as"; google_ad_type="text_image"; google_color_border="003399"; google_color_bg="EEEEEE"; google_color_link="0000FF"; google_color_url="0000FF"; google_color_text="000000"; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> }}} = IOT-House_pi = Raspberry Piでホームオートメーションやホームセキュリティを実現するものです IOT-House_piはRaspberry Pi 1専用になっていますので他のRaspberry Piで使用出来ません GPIOの0~3の4bitを出力、4~7の4bitを入力として使い、GPIOのピンは、gpio readallコマンドで表示されるwPiの番号です ハードウエアとしては、Raspberry PiにModuleカメラ、MONOSTICKとTWE-Lite-DIP、学習型赤外線リモコンIRkit、USBモデム、I2C温湿度センサーAM2320 or BME680を使います 無線モジュールMONOSTICKとTWE-Lite-DIPはDIOだけではなく、I2C接続の温湿度計AM2320(AM2321)、100均電卓のソラーパネルで簡易照度センサーなどを利用して離れた物を監視制御しています [[Embed(zero_w_iothouse001.png, float=checked)]] {{{ 下記容量のflashメモリを用意して下さい # fdisk /dev/mmcblk0 Welcome to fdisk (util-linux 2.29.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): p Disk /dev/mmcblk0: 7.3 GiB, 7820279808 bytes, 15273984 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x15ae16d5 }}} 下記URLよりダウンロードします https://ja.osdn.net/projects/pepolinux/releases/70316 ダウンロードしたIOT-House_pi_xx.7zを展開、IOT-House_pi_xx.imgをflashメモリへ書き込みます IOT-House_pi_xx.imgを書き込んだflashメモリ装着します Raspberry Pi電源を投入します、ACT LEDの点滅が落ち着くまで3分以上待って電源オフします flashメモリを取り出し、下記/boot/iothouse_config.txtをテキストエディタで例に習って編集します MAC AddressフィルタリングしているWifi環境では以下の表示されているアドレスを登録、フィルタリングを有効にします ※ # Wireless address of this machine --> b8:27:eb:XX:XX:XX USB接続eth0で認識出来るデバイスを使う場合はSSIDとKEYをコメントアウトします {{{ # Please describe the setting for IOTHouse below # Wireless address of this machine --> b8:27:eb:XX:XX:XX # The following is an example of a static ip address #HOST_NAME=iot000 #SSID=iothouse999 #KEY=999iothouse #IP_ADDRESS=192.168.1.200/24 #GATE_WAY=192.168.1.1 #NAME_SERVER=8.8.8.8 # end of an example # The following is an example of dynamic ip address # Access is iot000.local #HOST_NAME=iot000 #SSID=iothouse999 #KEY=999iothouse #IP_ADDRESS=dhcp # end of an example HOST_NAME= SSID= KEY= IP_ADDRESS= GATE_WAY= NAME_SERVER= }}} /boot/iothouse_config.txtの編集が終わったflashメモリを装着し、Raspberry Piを再度電源を投入 Webブラウザでhttp://HOST_NAME.localへアクセス、ユーザー名:remote パスワード:hand でログインします sshでは ユーザー名:pi パスワード:pepolinux です === Mail Settingタブでgmailアドレス、パスワード、keyward、gmailチェック間隔、ジッターなどを設定します === 【Mail Check】項目を0にすると定期的なメールの読み取りを行わない・・・警報やアラートなどの送信のみ 【Jitter】項目を0にすると最大5分前迄のメールコマンド実行を有効にする [[Embed(https://osdn.jp/projects/pepolinux/wiki/Raspberry+Pi%EF%BC%8BPiface+Home+Electronics%26Security/attach/Mail_setting.PNG)]] === Sever Controlタブでwebログインのユーザー名とパスワード環境を設定します、設定したログイン情報は他Raspberry Piと連携する際、同じものを使います === [[Embed(zero_w_iothouse002.png, float=checked)]] 以上で最低限の設定をしてrestartします === DIO Settingタブで監視制御と対象の入力端子、出力端子の別名や、IRkit、Tocos無線モジュール、modemなどの設定をします === [[Embed(https://osdn.net/projects/pepolinux/wiki/%E5%AE%9F%E8%B7%B5IoT%E3%83%8F%E3%82%A6%E3%82%B9/attach/IOT_house_dio_setting.png)]] UVC対応USBカメラやモジュールカメラを接続、ライブ動画を配信する事が出来ます === GPIOに接続したAM2320温度湿度センサーのグラフを表示させます === [[Embed(gpio_temp.png, float=checked)]] [[Embed(gpio_hum.png, float=checked)]] === CPU温度をグラフ表示させます === [[Embed(https://osdn.net/projects/pepolinux/wiki/%E5%AE%9F%E8%B7%B5IoT%E3%83%8F%E3%82%A6%E3%82%B9/attach/cpu_temp.png)]] === TWE-LITE DIPに温湿度計AM2320(AM2321)接続してグラフ表示させます === [[Embed(https://osdn.net/projects/pepolinux/wiki/%E5%AE%9F%E8%B7%B5IoT%E3%83%8F%E3%82%A6%E3%82%B9/attach/i2c_temp.png)]] [[Embed(https://osdn.net/projects/pepolinux/wiki/%E5%AE%9F%E8%B7%B5IoT%E3%83%8F%E3%82%A6%E3%82%B9/attach/i2c_hum.png)]] === TWE-LITE DIPのAIに百均電卓を接続して屋外簡易照度センサーとして使用 === 屋外簡易照度の値をグラフ表示、日没後に玄関電灯を点けるタイミングをスライス値で決定 [[Embed(https://osdn.net/projects/pepolinux/wiki/%E5%AE%9F%E8%B7%B5IoT%E3%83%8F%E3%82%A6%E3%82%B9/attach/Illuminance_sensor.PNG)]] === 定時処理で各種のセンサー値のスライス条件で電灯などをオン・オフ === [[Embed(https://osdn.net/projects/pepolinux/wiki/%E5%AE%9F%E8%B7%B5IoT%E3%83%8F%E3%82%A6%E3%82%B9/attach/Scheduled_processing.PNG)]] === Smart Phone用に出力操作が容易に出来る画面を用意しました === [[Embed(https://osdn.jp/projects/pepolinux/wiki/Raspberry+Pi%EF%BC%8BPiface+Home+Electronics%26Security/attach/Screenshot_Remote-hand.jpg)]]