ユーザ用ツール

サイト用ツール


サイドバー

最新の10件
一覧
magickmirror2

MagickMirror²を少し試す

  • スマートミラー,PCミラー アクリル,ガラス,フィルムのハーフミラー(two way mirror?)などの後ろに液晶モニタを仕込んで液晶消灯時や輝度の低い部分は鏡のように見えるディスプレイ サイネージでよく使われる
  • MagicMirror² スマートミラーの表示部分を担当 モジュールでカスタマイズできる Node+electron製,MITライセンス

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イメージもあるが動作未確認


Raspberry Pi 1/Zero

重いので動かないらしい(2以降ならok) クライアントとサーバを別マシンで起動することも出来るのでRaspberry Piはclient起動のみで動かすと動くらしい.

server起動(要client接続許可設定)

$ node serveronly

client起動

$ node clientonly --address 192.168.1.5 --port 8080

とりあえず動いた!

bg right:60%


設定

動いたけど設定がないので中身がない.サンプル設定ファイルをコピーして起動

$ cp config/config.js.sample config/config.js
$ npm start


設定を少しいじる

$ 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,


標準モジュール

  • Clock
  • Calendar
  • Current Weather
  • Weather Forecast
  • News Feed
  • Compliments
  • Hello World
  • Alert

https://docs.magicmirror.builders/modules/introduction.html


サードパーティモジュール

module自作

自分の用途にあったものを作って組み込める

https://docs.magicmirror.builders/development/introduction.html


応用

センサーの値を表示したり ジェスチャーを感知したり(ハーフミラーの後ろにセンサやカメラを仕込む)

とりあえず人感センサと組み合わせて人が来たら表示するようにしたい(節電&液晶寿命)

url

コメント

コメントを入力. Wiki文法が有効です:
   __  ___ ______   __ __   __ __  _      __
  /  |/  //_  __/  / //_/  / //_/ | | /| / /
 / /|_/ /  / /    / ,<    / ,<    | |/ |/ / 
/_/  /_/  /_/    /_/|_|  /_/|_|   |__/|__/
 
magickmirror2.txt · 最終更新: 2020/05/12 00:20 by matoken