MagPi91でも記事に → https://magpi.raspberrypi.org/issues/91
※金欠なので今回はハーフミラーは使わず単に液晶に表示だけ
Nodejs10以上を推奨 Nodejs入ってない人は入れておく https://nodejs.org/en/download/
$ git clone https://github.com/MichMich/MagicMirror $ cd MagicMirror/ $ npm install $ npm start
Alt
key でメニューバーが現れる.
メニューや, Ctrl+q
で終了.(普通に閉じようとすると復帰する)
自動導入scriptや,Dockerイメージもあるが動作未確認
重いので動かないらしい(2以降ならok) クライアントとサーバを別マシンで起動することも出来るのでRaspberry Piはclient起動のみで動かすと動くらしい.
server起動(要client接続許可設定)
$ node serveronly
client起動
$ node clientonly --address 192.168.1.5 --port 8080
$ curl http://bulk.openweathermap.org/sample/city.list.json.gz | zcat | jq -r '.[] | select(.country=="JP") | [.id, .name] | @csv' |lv
$ diff -u config/config.js.sample config/config.js|sed -e 's/appid: \".*\"/appid: \"YOUR_OPENWEATHER_API_KEY\"/' --- config/config.js.sample 2020-03-15 02:21:57.735194126 +0900 +++ config/config.js 2020-03-14 06:30:35.782576195 +0900 @@ -21,7 +21,7 @@ // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format : // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"], - language: "en", + language: "ja", timeFormat: 24, units: "metric", // serverOnly: true/false/"local" , @@ -44,13 +44,13 @@ }, { module: "calendar", - header: "US Holidays", + header: "日本の休日", position: "top_left", config: { calendars: [ { symbol: "calendar-check", - url: "webcal://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics" } + url: "https://www.google.com/calendar/ical/ja.japanese%23holiday%40group.v.calendar.google.com/public/basic.ics" } ] } }, @@ -62,9 +62,9 @@ module: "currentweather", position: "top_right", config: { - location: "New York", - locationID: "", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city - appid: "YOUR_OPENWEATHER_API_KEY" + location: "Kanoya", + locationID: "1860112", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city + appid: "YOUR_OPENWEATHER_API_KEY" } }, { @@ -72,9 +72,9 @@ position: "top_right", header: "Weather Forecast", config: { - location: "New York", - locationID: "5128581", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city - appid: "YOUR_OPENWEATHER_API_KEY" + location: "Chiyoda-ku", + locationID: "1864529", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city + appid: "YOUR_OPENWEATHER_API_KEY" } }, { @@ -83,8 +83,16 @@ config: { feeds: [ { - title: "New York Times", - url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml" + title: "NHKニュース", + url: "https://www.nhk.or.jp/rss/news/cat0.xml" + }, + { + title: "@matoken1", + url: "https://matoken.org/twitter/matoken1.xml" + }, + { + title: "MBC南日本放送", + url: "https://headlines.yahoo.co.jp/rss/mbcnews-loc.xml" } ], showSourceTitle: true,
https://docs.magicmirror.builders/modules/introduction.html
センサーの値を表示したり ジェスチャーを感知したり(ハーフミラーの後ろにセンサやカメラを仕込む)
とりあえず人感センサと組み合わせて人が来たら表示するようにしたい(節電&液晶寿命)
コメント