Is it possible to have the default compliments module display one compliment and then fade to black? Ideally, it would display a compliment either on start or on waking up via a PIR sensor.
I don’t see that as an option in the documentation.
Is it possible to have the default compliments module display one compliment and then fade to black? Ideally, it would display a compliment either on start or on waking up via a PIR sensor.
I don’t see that as an option in the documentation.
@sdetweil This works if you know your IP address. My daughter will take this to college with her, so I’m not sure she will know the IP address the dorm assigns her. I also don’t know if DHCP will change over the course of the semester.
Or am I misunderstanding your suggestion?
I have a related question. I’d like to use MMM-QRCode to access my MMM-Remote Control. All I would need is for the QRCode to pull my current mirror’s IP address, add “:8080” to the end of the url and generate the code. However, I don’t see how to do that in the documentation. Can someone point me in the right direction?
I think I figured it out and see where I needed a third closing brace. The weird thing is that Compliments seems to be the only module that doesn’t start with an opening brace, where all the others appear to. If I add an opening brace to it, I get an error. If I leave it out, it runs.
Forgive me for pursuing this, but I see an opportunity to really learn here. When I look at my code, I have closed all of my braces:
},
module: "compliments",
position: "lower_third",
config: { \\ open
compliments: { \\open
anytime: ["Hey there Emma!"],
morning: ["Good morning, Emma!", "Enjoy your day!", "How was your sleep?"],
afternoon: ["Hello, Emma!", "You look beautiful!", "Looking good today!"],
evening: ["Wow, you look great!", "You look nice!", "Hi, Emma!"],
"....-01-01": ["Happy new year!"]
} \\close
}, \\close
module: "weather",
If I add another closing brace, won’t I have an error because there is no opening brace?
On the suggestion for bitvise ssh, I’m working directly off the pi itself. I would love to run the entire MM configuration in a vm until it is right and then simply copy that over to the pi, but that’s a bit beyond my knowledge level.
@sdetweil That’s the strange thing, I’m not getting any errors when I run npm run config:check.
Unfortunately, I had to rebuild my config.js since I installed a module, edited config.js and ended up with a blank screen that no commenting the config.js entries didn’t fix.
Here’s the new (old) compliments entries:
module: "compliments",
position: "lower_third",
config: {
compliments: {
anytime: ["Hey there Emma!"],
morning: ["Good morning, Emma!", "Enjoy your day!", "How was your sleep?"],
afternoon: ["Hello, Emma!", "You look beautiful!", "Looking good today!"],
evening: ["Wow, you look great!", "You look nice!", "Hi, Emma!"],
"....-01-01": ["Happy new year!"]
}
},
And my npm run config:check:
pi@emmasmagicmirror:~/MagicMirror $ npm run config:check
> magicmirror@2.15.0 config:check /home/pi/MagicMirror
> node js/check_config.js
[24.04.2021 16:58.15.197] [INFO] Checking file... /home/pi/MagicMirror/config/config.js
[24.04.2021 16:58.15.352] [INFO] Your configuration file doesn't contain syntax errors :)
pi@emmasmagicmirror:~/MagicMirror $
My apologies for resurrecting a dead thread, but it seemed like keeping all similar questions to one thread might be useful to others.
I was happy with the default compliments, but wanted to customize them to the user. I copied the compliments entries from compliments.js and inserted them into my config.js. I don’t get any errors when I run config:check, but the compliments no longer appear on the screen. Here’s my code:
{
module: "compliments",
position: "lower_third",
config: {
compliments: {
anytime: ["Hey there Emma!"],
morning: ["Good morning, Emma!", "Enjoy your day!", "How was your sleep?"],
afternoon: ["Hello, Emma!", "You look beautiful!", "Looking good today!"],
evening: ["Wow, you look great!", "You look nice!", "Hi, Emma!"],
"....-01-01": ["Happy new year!"]
}
},
@sdetweil I’m not logged into my pi ATM so I can’t post code, but that’s not what’s in my config.js. My config.js has only two lines for “compliments” - that it exists and position.
This is not my actual file, but it looks essentially like this:
{
module: "compliments",
position: "lower_third",
}
In having this conversation, it looks like I have to add the config header and lines to do what I want and then edit that.
@sdetweil Thanks, that’s very helpful. I imagine I can simply edit that compliments.js file, since I can always download another one if I want to return to default.
Alternatively, I could copy/paste a second set of those lines, edit them, and “no comment” the defaults. (I think that’s the correct term.) However, that would add/leave in unnecessary lines of code, which strikes me as inefficient.