Read the statement by Michael Teeuw here.
A problem about MMM-BMW-DS
-
I’m new to magic mirror.I found a cute module MMM-BMW-DS, I really love it and want to use it.But I encountered a problem that I am trying to use the darksky weather module but it never loads and just displays “Acquiring your weather…”
I have got a new API keys and try again, but it doesn’t seem to work.
What should I do next?Please help me:folded_hands:
Here is the relevant section of the config.js{ disabled: false, module: “MMM-BMW-DS”, position: “bottom_bar”, // bottom_bar is best config: { apiKey: “My API key”, // Free API key @ darksky.net tempUnits: “F”, // MUST BE CAPITAL LETTER C or F lat: ‘31.318889’, lng: ‘121.395’, css: “1”, // 1=default, 2=Clean, 3=Lord of the Rings, 4=handwriting, 5=Julee, 6=Englebert, “” = returns default css ownTitle: “Current Conditions”, // Use your own language and statement playSounds: “yes”, // yes = weather sounds, no = no weather sounds useHeader: false, header: “Your header”, maxWidth: “100%”, } },
-
{ disabled: false, module: "MMM-BMW-DS", position: "bottom_bar", // bottom_bar is best config: { apiKey: "YOUR API KEY GOES HERE", // Free API key @ darksky.net tempUnits: "F", // MUST BE CAPITAL LETTER C or F lat: '31.318889', lng: '121.395', css: "1", // 1=default, 2=Clean, 3=Lord of the Rings, 4=handwriting, 5=Julee, 6=Englebert, "" = returns default css ownTitle: "Current Conditions", // Use your own language and statement playSounds: "yes", // yes = weather sounds, no = no weather sounds useHeader: false, header: "Your header", maxWidth: "100%", } },
Your curly quotes are not acceptable, causing syntax errors. Notice the difference. I’ve fixed them and tested the entry. Copy and paste it and add your API key.
Consider using a code editor that will eliminate those problems.
-
@Mykle1
Thank you for your correction:winking_face: But I just try again and it still doesn’t seem to work.:dizzy_face: Is there anything else I can check besides ‘config.js’? -
@zokiya number to the right of : should not have quotes… turns them into strings
lat: '31.318889', lng: '121.395', css: "1", // 1=default, 2=Clean, 3=Lord of the Rings, 4=handwriting, 5=Julee, 6=Englebert, "" = returns default css ownTitle: "Current Conditions", // Use your own language and statement
-
@sdetweil
Thank you.I took your suggestion to modify the code, but it doesn’t seem to work.:face_with_cold_sweat: -
@zokiya open the developers window, ctrl-shift-i on the keyboard, select the tab labeled console, and scroll up to see any errors, usually red text.
-
@sdetweil said in A problem about MMM-BMW-DS:
number to the right of : should not have quotes… turns them into strings
In this case, they ARE stings. The OP’s config example is rife with syntax errors. So, I corrected it, tested it, confirmed its validity and posted it, minus the API key. :thumbsup:
-
@Mykle1 hmmmmm, need to learn, never correct a module author!
-
Please follow sdetweil’s suggestion to look for errors. Again, if you copy and paste the following config entry directly into your config it should avoid the syntax errors. Enter your API key EXACTLY. This is very important.
{ disabled: false, module: "MMM-BMW-DS", position: "bottom_bar", // bottom_bar is best config: { apiKey: "YOUR API KEY GOES HERE", // Free API key @ darksky.net tempUnits: "F", // MUST BE CAPITAL LETTER C or F lat: '31.318889', lng: '121.395', css: "1", // 1=default, 2=Clean, 3=Lord of the Rings, 4=handwriting, 5=Julee, 6=Englebert, "" = returns default css ownTitle: "Current Conditions", // Use your own language and statement playSounds: "yes", // yes = weather sounds, no = no weather sounds useHeader: false, header: "Your header", maxWidth: "100%", } },
-
@sdetweil said in A problem about MMM-BMW-DS:
hmmmmm, need to learn, never correct a module author!
Feel free to correct me any time you like. :-)
I’ve learned much by being corrected. :thumbsup: