@sdetweil but can i trust https://jshint.com/
and do what it saying to get it right, like 102
just swap ] to }’ on 102
i what to learn… but is really hard, i Appreciate you time and @idoodler too
@sdetweil but can i trust https://jshint.com/
and do what it saying to get it right, like 102
just swap ] to }’ on 102
i what to learn… but is really hard, i Appreciate you time and @idoodler too
102 Expected ‘}’ to match ‘{’ from line 90 and instead saw ‘]’.
108 Expected ‘]’ to match ‘[’ from line 28 and instead saw ‘}’.
109 Expected ‘}’ to match ‘{’ from line 11 and instead saw ‘]’.
109 Missing semicolon.
109 Unrecoverable syntax error. (94% scanned).
okej, igot this,
we can take 102 dose that mean i just need to swap to }?
109 i have no ide what that translate :S
/* Magic Mirror Config Sample
*
* By Michael Teeuw http://michaelteeuw.nl
* MIT Licensed.
*
* For more information how you can configurate this file
* See https://github.com/MichMich/MagicMirror#configuration
*
*/
var config = {
address: "localhost", // Address to listen on, can be:
// - "localhost", "127.0.0.1", "::1" to listen on loopback interface
// - another specific IPv4/6 to listen on a specific interface
// - "", "0.0.0.0", "::" to listen on any interface
// Default, when address config is left out, is "localhost"
port: 8080,
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses
// or add a specific IPv4 of 192.168.1.5 :
// ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
// 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",
timeFormat: 24,
units: "metric",
modules: [
{
module: "alert",
},
{
module: "MMM-NowPlayingOnSpotify",
position: "bottom_right",
config: {
showCoverArt: true,
clientID: "c162a50685084953913d4fc247758a9e",
clientSecret: "d464b761e3c849a3846d087a96739d0c",
accessToken: "BQCJP0CGFThDfAv6p8my-fkZJQjPUoQN3nBYnV4Q-jtdVRtjcx3mCaDnX9QpSKD4YfXgSVAWh3vU_Mpij_9NpyrN1KK_6lv93Ffz3IkJqUiX31WQmJXzsIatawIhTbbqx0KLdP0qK-qFQx_MKuvSrUSB",
refreshToken: "AQCJi17nSbRBpLbfjH6M2t-6x2FIrBlqiHC4cctLslmIj1STMwj1pTH7JJ8TUvHIonlEnogyKqltqD3KxfYzOml4PUiW-fyFHcaPhLeRTVNwyz3DtCjFblIggtYwUkF6wk0QJw"
}
},
{
module: "updatenotification",
position: "top_bar"
},
{
module: "clock",
position: "top_left"
},
{
module: "calendar",
header: "Kalender",
position: "top_left",
config: {
calendars: [
{
symbol: "calendar-check",
url: "https://calendar.google.com/calendar/ical/berntsson88%40gmail.com/public/basic.ics" }
]
}
},
{
module: "compliments",
position: "lower_third"
},
{
module: "currentweather",
position: "top_right",
config: {
location: "Vara,Sweden",
locationID: "2665018", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
appid: "cb3ba3fb9618b6f6de3fbbb9ee78284e"
}
},
{
module: "weatherforecast",
position: "top_right",
header: "Weather Forecast",
config: {
location: "Vara,Sweden",
locationID: "5128581", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
appid: "cb3ba3fb9618b6f6de3fbbb9ee78284e"
}
},
{
module: "newsfeed",
position: "bottom_bar",
config: {
feeds: [
{
title: "Aftonbladet",
url: "http://www.aftonbladet.se/nyheter/rss.xml"
},
{
title: "Macworld",
url: "http://feeds.idg.se/idg/FPjt",
},
]
],
showSourceTitle: true,
showPublishDate: true,
broadcastNewsFeeds: true,
broadcastNewsUpdates: true
}
},
]
};
/*************** DO NOT EDIT THE LINE BELOW ***************/
if (typeof module !== "undefined") {module.exports = config;}
i got Spotify to work, the weather is not working and not the RSS feed, i tyde to add one more to newfeed, but it sems like i mess up my config.
i toke a code and paste in to: jslint.com thats @idoodler did fix for me, got lots of error.
How are u guys doing?
if i change one thing i am messing somting up, i just what something to contoll the code, before i use in config.
/* Magic Mirror Config Sample
*
* By Michael Teeuw http://michaelteeuw.nl
* MIT Licensed.
*
* For more information how you can configurate this file
* See https://github.com/MichMich/MagicMirror#configuration
*
*/
var config = {
address: "localhost", // Address to listen on, can be:
// - "localhost", "127.0.0.1", "::1" to listen on loopback interface
// - another specific IPv4/6 to listen on a specific interface
// - "", "0.0.0.0", "::" to listen on any interface
// Default, when address config is left out, is "localhost"
port: 8080,
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses
// or add a specific IPv4 of 192.168.1.5 :
// ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
// 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",
timeFormat: 24,
units: "metric",
modules: [
{
module: "alert",
},
{
module: "MMM-NowPlayingOnSpotify",
position: "top_right",
config: {
showCoverArt: true,
clientID: "",
clientSecret: "",
accessToken: "",
refreshToken: ""
}
},
{
{
module: "updatenotification",
position: "top_bar"
},
{
module: "clock",
position: "top_left"
},
{
module: "calendar",
header: "US Holidays",
position: "top_left",
config: {
calendars: [
{
symbol: "calendar-check",
url: "webcal://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics" }
]
}
},
{
module: "compliments",
position: "lower_third"
},
{
module: "currentweather",
position: "top_right",
config: {
location: "Vara,Sweden",
locationID: "2665018", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
appid: "YOUR_OPENWEATHER_API_KEY"
}
},
{
module: "weatherforecast",
position: "top_right",
header: "Weather Forecast",
config: {
location: "Vara,Sweden",
locationID: "2665018", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
appid: "YOUR_OPENWEATHER_API_KEY"
}
},
{
module: "newsfeed",
position: "bottom_bar",
config: {
feeds: [
{
title: "Aftonbladet",
url: "http://www.aftonbladet.se/nyheter/rss.xml"
}
],
showSourceTitle: true,
showPublishDate: true,
broadcastNewsFeeds: true,
broadcastNewsUpdates: true
}
},
]
};
/*************** DO NOT EDIT THE LINE BELOW ***************/
if (typeof module !== "undefined") {module.exports = config;}
i have download the visual Studio code, i have done this, donw know if its right or not. Well see what javascipt linter is telling me…cross you finger:D
i did something wrong, i think, i have edit the code, looks good?
regard
i am new to this, dont have a problem…(yet)
but i just install a modul and now i have some text that i need to get in config.
but i dont understand whear i can paste it. It contains so much ()()( on all strange thing, i just have the standard config,
sholde i use a some program, thaht will make it alot easyer.
Regard
{
module: "MMM-NowPlayingOnSpotify",
position: "top_right",
config: {
showCoverArt: false,
clientID: "<YOUR_CLIENT_ID>",
clientSecret: "<YOUR_CLIENT_SECRET>",
accessToken: "<YOUR_ACCESS_TOKEN>",
refreshToken: "<YOUR_REFRESH_TOKEN>"
}
}
@sdetweil said in Spotify module newbi:
@berne can u show us what you added to config… seems a missing comma probably
yes, u have done some thing i Home assistent, but this semms alot harder, when pasteing code, i did a new intall, Think i will do the spotify to morrow
98:11 error Parsing error: Unexpected token, expected ";" 96 | { 97 | module: "MMM-NowPlayingOnSpotify", > 98 | position: "top_left", | ^ 99 | 100 | config: { 101 | clientID: "431313e344ta464erfef3c0812323235c9232äå"
When i now trying to boot MM , i cant find any config, if i have use the java liner to chek it, got this?
i@raspberrypi:~/MagicMirror/modules/MMM-NowPlayingonSpotify $ npm install
npm WARN deprecated socks@1.1.10: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm notice created a lockfile as package-lock.json. You should commit this file.
added 675 packages from 771 contributors and audited 4894 packages in 216.211s
found 27 vulnerabilities (2 low, 5 moderate, 20 high)
run npm audit fix
to fix them, or npm audit
for details
@sdetweil said in Spotify module newbi:
@berne said in Spotify module newbi:
MMM-NowPlayingOnSpotify
ok, from the MagicMirror/modules folder do
ls
it will list the folders and files…
linux is case sensitive
$ cd /home/pi/MagicMirror/modules
pi@raspberrypi:~/MagicMirror/modules $ ls
default MMM-NowPlayingonSpotify node_modules package-lock.json README.md
pi@raspberrypi:~/MagicMirror/modules $
EDIT: i can see all the files in /home/pi/MagicMirror/Moduels/MMM-NowPlayingSpotify
EDIT2 pi@raspberrypi:~/MagicMirror/modules/MMM-NowPlayingonSpotify $
get the same result
EDIT3
i went to pi@raspberrypi:~/MagicMirror/modules/MMM-NowPlayingonSpotify and then write npm install. i think thaht works:S
@sdetweil said in Spotify module newbi:
@berne said in Spotify module newbi:
you shouldcd /home/pi/MagicMirror/modules
then
git clone https://github.com/raywo/MMM-NowPlayingOnSpotify
then
cd MMM-NowPlayingOnSpotify
does that work?
i works to the last part, it saying the same, no file or folder