@stardyze unuxpected token, means the line before doesn’t end with a comma
Read the statement by Michael Teeuw here.
Best posts made by sdetweil
-
RE: Weather Module LocationID Error
-
MMM-SleepWake using external motion detection source
Description
Enable MagicMirror sleep from external (camera) sources
If you are running the MM on a non PI device, or want to control sleep/wake without having to wire up another device, this module will take external info and signal MM to sleep or wake up.
I use a Webcam camera for the motion detection, driven by the github Motion project.
That project allows for a script to be run when motion starts and ends. I provide a script that
creates a file for both events, and the module detects those files.the module supports sleep and wake 3 different ways… On PI using the tvservice command, or the exec dpms command if not using HDMI, or hiding all modules if using an energystar monitor (like my tv)
I have submitted changes to MMM-voice and HelloLucy to allow our modules to know about the others processing… so voice Go To Sleep and motion wakeup work… if using the Hide method, modules already hidden at sleep will remain hidden on wakeup.
Download:
[card:sdetweil/MMM-SleepWake]
Version 1.0
-
RE: How do I delete a module?
open a terminal window
ctrl-alt-tcd ~/MagicMirror/modules rm -rf xxxxx
where xxxxx is the module you have installed and now want to delete.
exact letter case matters
foo is not the same as Foo on Linuxthen do
cd ~/MagicMirror/config nano config.js
use the arrow keys on the keyboard to move up and down, left and right
find the entry
module:"xxxxx`,
where xxxxx is the module u want to delete
move the cursor to the right end of that linehit the enter key
typedisabled:true,
hit Ctrl-o
hit enterhit ctrl-x
you will be back at the terminal window prompt
do
cd ~/MagicMirror
you can now restart MagicMirror however you do that
npm start
or
pm2 restartread the two links in my signature below
we did the disable approach cause it’s the easiest to do, and requires the least amount of content format knowledge. -
RE: MMM-WeatherOrNot
@Mykle1 does the module rebuild the display or does it locate the dom elements and update those?
document.getElementbyId() … if so, you probably have duplicate IDs w 2 versions runningin my modules I use the module identifier as part of the item id to avoid this
this.identifer in the modulename.js
-
RE: How do I properly uninstall magic mirror on raspberry pi 4
@r3d6 my bullseye script should handle either way. I updated the comments to include other systems, not just bullseye
-
RE: MMM-euro2024
@0m4r the sample is missing the config:{} section
{ disabled: false, module: "MMM-euro2024", position: "bottom_center", defaults: { updateInterval: 60 * 1000, // one minute }, token: [YOUR_TOKEN] }
should be
{ disabled: false, module: "MMM-euro2024", position: "bottom_center", config:{ updateInterval: 60 * 1000, // one minute token: [YOUR_TOKEN] } }
your module passes this.config to the node_helper, but there is no config block, so only {} gets passed
this.sendSocketNotification(this.name + 'CONFIG', this.config);
-
RE: Can't get update alert to go away
@pminich weird
docd ~/MagicMirror git pull
-
RE: MMM-GoogleMapsTraffic
there is a problem with the original module… I have a fixed version
here https://github.com/sdetweil/MMM-GoogleMapsTrafficDo this
cd ~/MagicMirror/modules mv MMM-GoogleMapsTraffic MMM-GoogleMapsTraffic.original git clone https://github.com/sdetweil/MMM-GoogleMapsTraffic cd MMM-GoogleMapsTraffic npm install
then restart the mirror app
-
RE: Merge conflict after update to 2.19
also
git checkout filename
will restore a file to it’s repo contents.
-
RE: MacMirror
@trividar mmm-voice/hello Lucy use pocketsphinx for voice reco. It is supported on osx and Ubuntu.
And those modules support ‘go to sleep’. Which can launch a command to turn off hdmi, or whatever.
My MMM-SleepWake does motion detection via camera and can do the wakeup when they do sleep