Read the statement by Michael Teeuw here.
MM Config check goes bad
-
So, I wanted to get rid of the compliments module. I don’t mind a respectful computer, but I don’t care for the obsequious toadying and so forth. And I wanted to take a swing at adding modules.
So, I went with MMM-BinaryClock. Simple, nothing too weird, what could possibly go wrong, right?
Blank screens on MM, that’s what. I ran npm run config:check like it said I should. This is what it said:
Your configuration file contains syntax errors :( [30.01.2022 14:11.12.180] [ERROR] Line 71 column 3: Parsing error: Unexpected token {
I guess by column 3 it means the third tab out.
Thing is, that’s exactly where it was with the compliments thing.
Here’s what it was:
url: "webcal://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics" } ] } }, { module: "compliments", position: "lower_third" }, { module: "weather",
Here it is after I changed it:
url: "webcal://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics" } ] } }, { module: 'MMM-BinaryClock', position:"lower_third", config: { size: 30 }, { module: "weather",
I don’t see any difference between the two starts and ends. It has the same number of tab spaces as the previous one. I don’t see what the problem is. Granted, I don’t know a whole lot about this stuff.
Here’s what the page wants:
var config = { modules: [ { module: 'MMM-BinaryClock', position:"top_left", config: { size: 30 } } ] }
Obviously, a bit of a difference, but since in mine it isn’t the first one at the top, I didn’t figure that leaving out the stuff from the beginning should be a problem.
So, any ideas on what the problem might be? I really don’t want to go through this every time I ad a module, because there are a few I;'ve got my eye on.
Thanks
-
@halpi-thousand typically the error is reported on the line AFTER the actual error line
unexpected token means 95% of the time, the line before should end with a comma, but does not
see the two topics in my signature
-
@halpi-thousand said in MM Config check goes bad:
{ module: 'MMM-BinaryClock', position:"lower_third", config: { size: 30 },
this is missing a } for the config: {
-
That helps, thanks.
Why doesn’t Geany tell me these things? Granted, I’m only getting started learning about this, and maybe I missed something somewhere but I would think that at least for little stuff - missing parentheses and so forth - it could manage to tell me what’s missing.
Or is it that it probably did, and I just didn’t notice?
-
@halpi-thousand said in MM Config check goes bad:
Geany
?
it did report, that somewhere further down it lost the structure
deducing where it was caused is a fun time project.
I wrote a module for this kind of problem, that presents a form. no more config editing
funny it’s called MMM-Config!
-
@sdetweil said in MM Config check goes bad:
@halpi-thousand said in MM Config check goes bad:
Geany
?
it did report, that somewhere further down it lost the structure
deducing where it was caused is a fun time project.
I wrote a module for this kind of problem, that presents a form. no more config editing
funny it’s called MMM-Config!
:astonished_face: And just like that, you’re my new best MagicMirror friend - I’ve been wanting something like this to make working on this stuff easier. Love this idea. Looks like it should be a fair bit more Newb-friendly than fiddling around in the config file tends to be.
One thing: it apparently requires the Pi IP address and Port ID. The IP address wasn’t a problem, but I don’t know where or what to look for to get the Port ID. Or did I just miss something somewhere?
Thanks again
-
@halpi-thousand if you use showQR:true
then there will be a qr code to use from outside
the default port on mm is 8080
the doc (readme.md) says what link to use if not using the qr code
-
@sdetweil said in MM Config check goes bad:
@halpi-thousand if you use showQR:true
then there will be a qr code to use from outside
the default port on mm is 8080
the doc (readme.md) says what link to use if not using the qr code
Right, the link where you substitute the IP and Port for that one part
http://MM_IP_Address:MM_Port/modules/MMM-Config/review
I tried the Pi’s IP and Port 8080, and got this error:
Unable to connect
Firefox can’t establish a connection to the server
at 192.168.1.13:8080.
The site could be temporarily unavailable or
too busy. Try again in a few moments.
If you are unable to load any pages, check
your computer’s network connection.
• If your computer or network is protected by
a firewall or proxy, make sure that Firefox is
permitted to access the Web.I also tried adding in that ShowQR: true line; it didn’t give me a QR.
Any ideas where I might be getting it wrong?
-
@halpi-thousand if the mm config says
address:“localhost”,the Only apps INSIDE the pi can connect
if u want to connect from outside the pi (phone, tablet, ??? )
then u have to change address and ipWhitelist
to allow outside machines anto connect
it’s showQR not ShowQR
case matters in MagicMirror, everywhere
-
@sdetweil said in MM Config check goes bad:
@halpi-thousand if the mm config says
address:“localhost”,
the Only apps INSIDE the pi can connectif u want to connect from outside the pi (phone, tablet, ??? )
then u have to change address and ipWhitelist
to allow outside machines anto connectit’s showQR not ShowQR
case matters in MagicMirror, everywhere
I checked, and it’s set up as localhost. That shouldn’t be a problem, this one isn’t headless. Two displays and a wireless keyboard/trackpad.
Also, showQR is correct spelling and case.