@Sean
You sir, are a freakin’ genius - it works perfectly.
Thanks again for all the effort.
Read the statement by Michael Teeuw here.
Posts
-
RE: [Guide] Control MM via Google Home
-
RE: [Guide] Control MM via Google Home
@Sean
OnScreenMenu is one of the 3rd Party modules here:
https://github.com/shbatm/MMM-OnScreenMenuI used notificationReceived because it was similar to your example of SHOW_ALERT.
From alert.js - show_alert: function(params, sender) {
From MMM-NotificationTrigger.js - notificationReceived: function (notification, payload, sender) {
Maybe not correct but that’s why I did it.Here’s where I got the example used for the content of notification and payload:
https://github.com/shbatm/MMM-AlexaOnOff/blob/master/README.md
Again, maybe not correct but that’s why I did it.{ module: 'MMM-OnScreenMenu', position: 'bottom_right', }, { module: 'MMM-AlexaOnOff', config: { devices: [{ name: "Magic Mirror", on: { notification: "ONSCREENMENU_PROCESS_ACTION", payload: { actionName:'monitorOn' } }, off: { notification: "ONSCREENMENU_PROCESS_ACTION", payload: { actionName:'monitorOff' } }, }] } }Thoughts?
Thanks,
Scott -
RE: [Guide] Control MM via Google Home
@Sean
Thanks - that fixed the error message however it still doesn’t turn the monitor off.
I’m not sure what else to look at now. Below is what I’m seeing but with no error message, kind of hard to tell what to work on.I’m considering installing Remote-Control and seeing if I can get that to work unless you’ve got another thought.
Thanks,
Scottpi@raspberrypi:~ $ cd MagicMirror pi@raspberrypi:~/MagicMirror $ sudo npm start > magicmirror@2.7.1 start /home/pi/MagicMirror > sh run-start.sh Starting MagicMirror: v2.7.1 Loading config ... Loading module helpers ... No helper found for module: alert. No helper found for module: clock. Initializing new module helper ... Module helper loaded: calendar No helper found for module: currentweather. No helper found for module: weatherforecast. No helper found for module: MMM-google-route. Initializing new module helper ... Module helper loaded: MMM-OnScreenMenu Initializing new module helper ... Module helper loaded: MMM-NotificationTrigger All module helpers loaded. Starting server on port 8080 ... Server started ... Connecting socket for: calendar Starting node helper for: calendar Connecting socket for: MMM-OnScreenMenu Connecting socket for: MMM-NotificationTrigger Sockets connected & modules started ... Launching application. Create new calendar fetcher for url: https://calendar.google.com/calendar/ical/xxx/basic.ics - Interval: 300000 reqpost? { sender: { name: 'IFTTT' }, notification: 'ONSCREENMENU_PROCESS_ACTION', payload: { actionName: 'monitorOff' } } -
RE: Magic Mirror Redesign WIP :D
-
RE: Magic Mirror Redesign WIP :D
-
RE: Magic Mirror Redesign WIP :D
@earlman
Thanks for putting this together.
Finally had some time to work on this today but got the following error message when running it for the first time:pi@raspberrypi:~ $ cd MagicMirror pi@raspberrypi:~/MagicMirror $ sudo npm start > magicmirror@2.7.1 start /home/pi/MagicMirror > sh run-start.sh Starting MagicMirror: v2.7.1 Loading config ... WARNING! Could not validate config file. Starting with default configuration. Please correct syntax errors at or above this line: /home/pi/MagicMirror/config/config.js:116 pexels_key: [my API key was here], ^^^^^^ SyntaxError: Invalid or unexpected token at new Script (vm.js:74:7) at createScript (vm.js:246:10) at Object.runInThisContext (vm.js:298:10) at Module._compile (internal/modules/cjs/loader.js:678:28) at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10) at Module.load (internal/modules/cjs/loader.js:620:32) at tryModuleLoad (internal/modules/cjs/loader.js:559:12) at Function.Module._load (internal/modules/cjs/loader.js:551:3) at Module.require (internal/modules/cjs/loader.js:658:17) at require (internal/modules/cjs/helpers.js:20:18) Loading module helpers ... Initializing new module helper ... Module helper loaded: updatenotification No helper found for module: helloworld. All module helpers loaded. Starting server on port 8080 ... Server started ... Connecting socket for: updatenotification Sockets connected & modules started ... Launching application.Here’s my config.js:
{ module: "MMM-Wallpaper", position: "fullscreen_below", config: { // See "Configuration options" for more information. source: "pexels", slideInterval: 60 * 1000, // Change slides every minute orientation: "vertical", pexels_key: [my API key was here], pexels_search: "beach" } },Thoughts?
Thanks,
Scott -
RE: [Guide] Control MM via Google Home
@Sean
Can you read through the code below and determine where the error is?First, updating like you said did the trick. After updating/upgrading I was able to download everything and complete Step 2. Went on to complete Steps 3 & 4 and the IFTTT test worked.
Now, I’m trying to use the format of your test code and rewrite it to turn my monitor off using OnScreenMenu. I get the following error message:
pi@raspberrypi:~ $ cd MagicMirror pi@raspberrypi:~/MagicMirror $ sudo npm start > magicmirror@2.7.1 start /home/pi/MagicMirror > sh run-start.sh Starting MagicMirror: v2.7.1 Loading config ... Loading module helpers ... No helper found for module: alert. No helper found for module: clock. Initializing new module helper ... Module helper loaded: calendar No helper found for module: currentweather. No helper found for module: weatherforecast. No helper found for module: MMM-google-route. Initializing new module helper ... Module helper loaded: MMM-OnScreenMenu Initializing new module helper ... Module helper loaded: MMM-NotificationTrigger All module helpers loaded. Starting server on port 8080 ... Server started ... Connecting socket for: calendar Starting node helper for: calendar Connecting socket for: MMM-OnScreenMenu Connecting socket for: MMM-NotificationTrigger Sockets connected & modules started ... Launching application. Create new calendar fetcher for url: https://calendar.google.com/calendar/ical/xxx/basic.ics - Interval: 300000 SyntaxError: Unexpected token a in JSON at position 96 at JSON.parse (<anonymous>) at parse (/home/pi/MagicMirror/node_modules/body-parser/lib/types/json.js:89:19) at /home/pi/MagicMirror/node_modules/body-parser/lib/read.js:121:18 at invokeCallback (/home/pi/MagicMirror/node_modules/body-parser/node_modules/raw-body/index.js:224:16) at done (/home/pi/MagicMirror/node_modules/body-parser/node_modules/raw-body/index.js:213:7) at IncomingMessage.onEnd (/home/pi/MagicMirror/node_modules/body-parser/node_modules/raw-body/index.js:273:7) at IncomingMessage.emit (events.js:182:13) at endReadableNT (_stream_readable.js:1090:12) at process._tickCallback (internal/process/next_tick.js:63:19)My config.js is here:
{ module: 'MMM-OnScreenMenu', position: 'bottom_right', }, { module: "MMM-NotificationTrigger", config: { useWebhook:true, triggers:[ { trigger: "ONSCREENMENU_PROCESS_ACTION", fires: [ { fire:"notificationReceived", payload: (payload) => {return payload} }, ], }, ] } },My IFTTT is here:
{ "sender":{ "name":"IFTTT" }, "notification":"ONSCREENMENU_PROCESS_ACTION", "payload":{actionName: 'monitorOff' } }Thoughts?
Thanks,
Scott -
RE: Magic Mirror Redesign WIP :D
@earlman
I’m using the default clock, calendar, current weather, and weather forecast. I’m also using google-route. I’d be interested in anything you could do to make the Google map look better in the route module. I assume you don’t care about the modules that run in the background and don’t show on the screen. Thanks -
RE: [Guide] Control MM via Google Home
@Sean
I’m having trouble with Step 2 - Installing nginx.I was able to follow Step 1 and have a wormhole URL from Dataplicity. However, I get the following error messages when running the line “sudo apt-get install nginx”
pi@raspberrypi:~ $ sudo apt-get install nginx Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libc-ares2 libhttp-parser2.8 libuv1 nodejs-doc realpath Use 'sudo apt autoremove' to remove them. The following additional packages will be installed: libnginx-mod-http-auth-pam libnginx-mod-http-dav-ext libnginx-mod-http-echo libnginx-mod-http-geoip libnginx-mod-http-image-filter libnginx-mod-http-subs-filter libnginx-mod-http-upstream-fair libnginx-mod-http-xslt-filter libnginx-mod-mail libnginx-mod-stream nginx-common nginx-full Suggested packages: fcgiwrap nginx-doc ssl-cert The following NEW packages will be installed: libnginx-mod-http-auth-pam libnginx-mod-http-dav-ext libnginx-mod-http-echo libnginx-mod-http-geoip libnginx-mod-http-image-filter libnginx-mod-http-subs-filter libnginx-mod-http-upstream-fair libnginx-mod-http-xslt-filter libnginx-mod-mail libnginx-mod-stream nginx nginx-common nginx-full 0 upgraded, 13 newly installed, 0 to remove and 39 not upgraded. Need to get 1,505 kB of archives. After this operation, 2,563 kB of additional disk space will be used. Do you want to continue? [Y/n] Y Err:1 http://raspbian.raspberrypi.org/raspbian stretch/main armhf nginx-common all 1.10.3-1+deb9u2 404 Not Found [IP: 93.93.128.193 80] Err:2 http://raspbian.raspberrypi.org/raspbian stretch/main armhf libnginx-mod-http-auth-pam armhf 1.10.3-1+deb9u2 404 Not Found [IP: 93.93.128.193 80] Err:3 http://raspbian.raspberrypi.org/raspbian stretch/main armhf libnginx-mod-http-dav-ext armhf 1.10.3-1+deb9u2 404 Not Found [IP: 93.93.128.193 80] Err:4 http://raspbian.raspberrypi.org/raspbian stretch/main armhf libnginx-mod-http-echo armhf 1.10.3-1+deb9u2 404 Not Found [IP: 93.93.128.193 80] Err:5 http://raspbian.raspberrypi.org/raspbian stretch/main armhf libnginx-mod-http-geoip armhf 1.10.3-1+deb9u2 404 Not Found [IP: 93.93.128.193 80] Err:6 http://raspbian.raspberrypi.org/raspbian stretch/main armhf libnginx-mod-http-image-filter armhf 1.10.3-1+deb9u2 404 Not Found [IP: 93.93.128.193 80] Err:7 http://raspbian.raspberrypi.org/raspbian stretch/main armhf libnginx-mod-http-subs-filter armhf 1.10.3-1+deb9u2 404 Not Found [IP: 93.93.128.193 80] Err:8 http://raspbian.raspberrypi.org/raspbian stretch/main armhf libnginx-mod-http-upstream-fair armhf 1.10.3-1+deb9u2 404 Not Found [IP: 93.93.128.193 80] Err:9 http://raspbian.raspberrypi.org/raspbian stretch/main armhf libnginx-mod-http-xslt-filter armhf 1.10.3-1+deb9u2 404 Not Found [IP: 93.93.128.193 80] Err:10 http://raspbian.raspberrypi.org/raspbian stretch/main armhf libnginx-mod-mail armhf 1.10.3-1+deb9u2 404 Not Found [IP: 93.93.128.193 80] Err:11 http://raspbian.raspberrypi.org/raspbian stretch/main armhf libnginx-mod-stream armhf 1.10.3-1+deb9u2 404 Not Found [IP: 93.93.128.193 80] Err:12 http://raspbian.raspberrypi.org/raspbian stretch/main armhf nginx-full armhf 1.10.3-1+deb9u2 404 Not Found [IP: 93.93.128.193 80] Err:13 http://raspbian.raspberrypi.org/raspbian stretch/main armhf nginx all 1.10.3-1+deb9u2 404 Not Found [IP: 93.93.128.193 80] E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/n/nginx/nginx-common_1.10.3-1+deb9u2_all.deb 404 Not Found [IP: 93.93.128.193 80] E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/n/nginx/libnginx-mod-http-auth-pam_1.10.3-1+deb9u2_armhf.deb 404 Not Found [IP: 93.93.128.193 80] E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/n/nginx/libnginx-mod-http-dav-ext_1.10.3-1+deb9u2_armhf.deb 404 Not Found [IP: 93.93.128.193 80] E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/n/nginx/libnginx-mod-http-echo_1.10.3-1+deb9u2_armhf.deb 404 Not Found [IP: 93.93.128.193 80] E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/n/nginx/libnginx-mod-http-geoip_1.10.3-1+deb9u2_armhf.deb 404 Not Found [IP: 93.93.128.193 80] E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/n/nginx/libnginx-mod-http-image-filter_1.10.3-1+deb9u2_armhf.deb 404 Not Found [IP: 93.93.128.193 80] E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/n/nginx/libnginx-mod-http-subs-filter_1.10.3-1+deb9u2_armhf.deb 404 Not Found [IP: 93.93.128.193 80] E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/n/nginx/libnginx-mod-http-upstream-fair_1.10.3-1+deb9u2_armhf.deb 404 Not Found [IP: 93.93.128.193 80] E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/n/nginx/libnginx-mod-http-xslt-filter_1.10.3-1+deb9u2_armhf.deb 404 Not Found [IP: 93.93.128.193 80] E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/n/nginx/libnginx-mod-mail_1.10.3-1+deb9u2_armhf.deb 404 Not Found [IP: 93.93.128.193 80] E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/n/nginx/libnginx-mod-stream_1.10.3-1+deb9u2_armhf.deb 404 Not Found [IP: 93.93.128.193 80] E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/n/nginx/nginx-full_1.10.3-1+deb9u2_armhf.deb 404 Not Found [IP: 93.93.128.193 80] E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/n/nginx/nginx_1.10.3-1+deb9u2_all.deb 404 Not Found [IP: 93.93.128.193 80] E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?I tried continuing with the other lines but just got error messages that the files were missing.
Thoughts?
Thanks,
Scott -
RE: Need some help getting AlexaOnOff to work with Google Mini
@smackenzie5 said in Need some help getting AlexaOnOff to work with Google Mini:
@shbatm
According to this article, Google home runs port 80:
https://github.com/makermusings/fauxmo/issues/21Don’t know if that would make a difference?
Thanks
-
Need some help getting AlexaOnOff to work with Google Mini
@shbatm
Need some help getting AlexaOnOff to work with Google MiniI’m including the following folks in this post since, at some point in the forum, they have all asked how to get AlexaOnOff working with Google Home @eddgeywing @retroflex @selarp @felipemfa
If any of you have already gotten Google to work with AlexOnOff, please share.@shbatm in previous posts you asked for the following info so here it is:
- My mirror version is 2.7.1. My understanding is I don’t need to change line 21 in MMM-AlexaOnOff to match this number.
- “FauxMo service started. Listening on 192.168.1.32:21900” is listed – see below.
- Tested with example but got similar results as original – see below.
- Even tried discovery from alexa.amazon.com but unable to register for account since I don’t have an echo – yes, I’m desperate…
Here is the code for my config.js – should be same as yours:
{ module: 'MMM-OnScreenMenu', position: 'bottom_right', }, { module: 'MMM-AlexaOnOff', config: { devices: [{ name: "Magic Mirror", on: { notification: "ONSCREENMENU_PROCESS_ACTION", payload: { actionName:'monitorOn' } }, off: { notification: "ONSCREENMENU_PROCESS_ACTION", payload: { actionName:'monitorOff' } }, }] } },Here is what I get when I start MagicMirror:
pi@raspberrypi:~ $ cd MagicMirror pi@raspberrypi:~/MagicMirror $ sudo npm start > magicmirror@2.7.1 start /home/pi/MagicMirror > sh run-start.sh Starting MagicMirror: v2.7.1 Loading config ... Loading module helpers ... No helper found for module: clock. Initializing new module helper ... Module helper loaded: calendar No helper found for module: currentweather. No helper found for module: weatherforecast. No helper found for module: MMM-google-route. Initializing new module helper ... Module helper loaded: MMM-OnScreenMenu Initializing new module helper ... Module helper loaded: MMM-AlexaOnOff All module helpers loaded. Starting server on port 8080 ... Server started ... Connecting socket for: calendar Starting node helper for: calendar Connecting socket for: MMM-OnScreenMenu Connecting socket for: MMM-AlexaOnOff Module helper started for MMM-AlexaOnOff Sockets connected & modules started ... Launching application. Create new calendar fetcher for url: https://calendar.google.com/calendar/ical/xxx/basic.ics - Interval: 300000 21900 FauxMo service started. Listening on 192.168.1.32:21900Here is the sudo netstat -tulpn:
pi@raspberrypi:~ $ sudo netstat -tulpn Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN 3081/electron tcp 0 0 0.0.0.0:21900 0.0.0.0:* LISTEN 3081/electron udp 0 0 0.0.0.0:1900 0.0.0.0:* 3081/electron udp 0 0 0.0.0.0:68 0.0.0.0:* 307/dhcpcd udp 0 0 0.0.0.0:56022 0.0.0.0:* 335/avahi-daemon: r udp 0 0 224.0.0.251:5353 0.0.0.0:* 1334/libpepflashpla udp 0 0 224.0.0.251:5353 0.0.0.0:* 1334/libpepflashpla udp 0 0 0.0.0.0:5353 0.0.0.0:* 335/avahi-daemon: r udp6 0 0 :::55455 :::* 335/avahi-daemon: r udp6 0 0 :::5353 :::* 335/avahi-daemon: r pi@raspberrypi:~ $And starting the example:
pi@raspberrypi:~ $ cd ~/MagicMirror/modules/MMM-AlexaOnOff/node_modules/fauxmojs/example pi@raspberrypi:~/MagicMirror/modules/MMM-AlexaOnOff/node_modules/fauxmojs/example $ node example.js started..And the sudo netstat -tulpn for the example:
pi@raspberrypi:~ $ sudo netstat -tulpn Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN 3081/electron tcp 0 0 0.0.0.0:11000 0.0.0.0:* LISTEN 3634/node tcp 0 0 0.0.0.0:11001 0.0.0.0:* LISTEN 3634/node tcp 0 0 0.0.0.0:21900 0.0.0.0:* LISTEN 3081/electron udp 0 0 0.0.0.0:1900 0.0.0.0:* 3634/node udp 0 0 0.0.0.0:1900 0.0.0.0:* 3081/electron udp 0 0 0.0.0.0:68 0.0.0.0:* 307/dhcpcd udp 0 0 0.0.0.0:56022 0.0.0.0:* 335/avahi-daemon: r udp 0 0 224.0.0.251:5353 0.0.0.0:* 1334/libpepflashpla udp 0 0 224.0.0.251:5353 0.0.0.0:* 1334/libpepflashpla udp 0 0 0.0.0.0:5353 0.0.0.0:* 335/avahi-daemon: r udp6 0 0 :::55455 :::* 335/avahi-daemon: r udp6 0 0 :::5353 :::* 335/avahi-daemon: r pi@raspberrypi:~ $Switching gears –
I started looking at the Belkin website for how to connect Wemo to Google:
https://www.belkin.com/us/support-article?articlenum=224185The article basically says that you have to setup your Wemo device before Google can find it. In order to setup your Wemo device, you have to select it from your wifi menu:
https://www.belkin.com/us/support-article?articlenum=110936After running Mirror (and same with example), I tried setting up Wemo but I’m not able to see the faux Wemo switch or devices on my wifi.
Is the faux Wemo discoverable under wifi as the article directs?
Another option Belkin describes is entering the MAC address.
Is there a MAC address for the faux Wemo switch?I know that’s a lot of stuff to go through but I’ve been working on this for a while.
I really want to get this working. Without it, my mirror is pretty much useless.
I’m going to use AlexaOnOff with OnScreenMenu to turn the monitor on and off only (BTW – OnScreenMenu works great, thanks).Any help with AlexaOnOff would be appreciated.
Thanks,
Scott -
Moving Map Labels in google-route Module
Anybody know how to move map labels (cities) so they aren’t covered up by the driving direction route line?
labelOrigin seems to be good for a single marker but doesn’t work with multiple city labels on the route.Thanks
-
Help Getting Google-Route Module to Zoom Map
I’m trying to get the google-route module to zoom in on the map it generates for the routes. Currently, the map returned for my directions is too big and the routes too small.
Based on my reading to date, it looks like you can control the zoom through mapOptions however, I haven’t had any luck and I’m out of ideas. Below is my config.js file that shows how I’ve written the zoom function. Ideas?
Thanks
{ module: 'MMM-google-route', position: 'bottom_bar', header: 'Which Commute Sucks Less', config: { key: 'key', directionsRequest:{ origin: '30.388259,-86.507500', destination: '30.482197,-86.503158' }, mapOptions:{ zoom: 10 } } }, -
RE: Layout and positioning on a tiny screen.
Thanks @broberg
Does the config.js file takes precedence over the css files?
I’ve tried deleting the calendar’s position line in the config.js file and the calendar module can’t be seen. I tried changing the calendar’s position to absolute in the config.js files and that prevented the mirror from loading at all. Basically, is there anything that needs to be done to the config.js file or should the custom.css file take precedence over everything?
-
RE: Layout and positioning on a tiny screen.
@broberg Is there an order of precedence between custom.css, calendar.css, and config.js?
I’ve added the position, left and top lines above to my custom.css and calendar.css.
(I put the lines in both just trying to get it to work)When I start up MagicMirror, the calendar module is in the correct position when it says “Loading…” but once the calendar loads, the module changes position. To me, it looks like the module is at the “top_left” position below the clock which is what the config.js specifies.
Any thoughts on why the module is moving position after loading?
BTW – I added the lines to drop the margin completely to my custom.css and it worked great, no problems.
Thanks,
Scott -
MMM-SORT - WorldTides API Key Pricing
Re: MMM-SORT - (Static Or Rotating Tides)
@Mykle1 First thanks for the module. Installed it yesterday and everything’s working great.
I did have a question regarding WorldTides API Keys and pricing - just want to make sure I’m understanding it correctly.Their website says:
“When you register, you get one month of 100 free credits to make API calls.
After that, credits cost $1.99 per 1000 credits and subscriptions start at only $0.99/mo. Bulk pricing also available for as low as $0.10 per 1000 credits.”To me that reads the first month is free then you have to pay to get the module data after that.
Is that your experience using the WorldTides API?Thanks,
Scott

