Description:
This module allows you to set the brightness of your Pi 7" screen based on the time of day. Perfect for when you use your MM as an alarm clock (from @strawberry-3-141)!
Screenshots:
N/A
Download:
Version 1
- Initial release
This module allows you to set the brightness of your Pi 7" screen based on the time of day. Perfect for when you use your MM as an alarm clock (from @strawberry-3-141)!
N/A
@daikaiju it’s on line 245 in the current release. Keep in mind that if you upgrade you’ll lose those changes (as I did exactly 2 days after I made that post…).
This module allows you to set the brightness of your Pi 7" screen based on the time of day. Perfect for when you use your MM as an alarm clock (from @strawberry-3-141)!
N/A
I had the same problem where I could’t get the screensaver (or screen blanking) to stop turning on. I stumbled across this thread, check out the answer given by JimmyN
… it helped me at least.
Wow, thanks @mochman! Now that you mention it that makes perfect sense because node_helper.js
isn’t executed on the client-end (right?).
I’m sure I’m missing something really obvious here… but I can’t see what it is. The contents of MMM-HiWorld
print out just fine but the console logging in node_helper.js
never happens. As I understand it (from reading some other forum posts) I need to initialize node_helper.js
via a call in start: function()
?
MMM-HiWorld.js:
$ cat MMM-HiWorld.js
Module.register("MMM-HiWorld",{
// Default module config.
// Default module config.
defaults: {
text: "Hi World!",
animationSpeed: 1000,
},
start: function() {
this.sendSocketNotification('Starting');
var self = this;
setInterval(function() {
self.updateDom(); // no speed defined, so it updates instantly.
}, 1000); //perform every 1000 milliseconds.
},
// Override dom generator.
getDom: function() {
var wrapper = document.createElement("div");
wrapper.innerHTML = this.config.text;
return wrapper;
},
});
node_helper.js:
$ cat node_helper.js
var NodeHelper = require('node_helper');
module.exports = NodeHelper.create({
start: function() {
console.log('Starting node_helper');
},
socketNotificationReceived: function(notification, payload) {
console.log('Okay, I got a notification.');
},
});
This is Raspbian Jessie (Raspberry Pi 2) and node v6.9.2.
Thanks!
Turns out my problem came down mostly to not really understanding the difference between ‘absolute’ and ‘relative’… I fixed my problem by modifying the code in calendar.js slightly.
// Otherwise just say 'Today/Tomorrow at such-n-such time'
timeWrapper.innerHTML = moment(event.startDate, "x").calendar(null, {
sameDay: 'H:mm',
nextDay: '[Tomorrow] H:mm',
nextWeek: 'dddd',
lastDay: '[Yesterday]',
lastWeek: '[Last] dddd',
sameElse: 'DD/MM/YYYY'
});
I sort of hijacked this thread. Sorry (but I think my solution might help out the OP ).
… and by
{
timeFormat: ‘relative’
}
I mean
{
timeFormat: ‘absolute’
}
ugh.
Any word on this? I’m using a 7" raspberry pi display and that ‘Tomorrow at 10:00 AM’ eats up a lot of real estate.
Here’s my config:
{
module: 'calendar',
header: 'My Calendar',
position: 'top_right',
config: {
calendars: [
{
symbol: 'calendar-check-o ',
url: '[redacted]'
}
],
maximumEntries: 10,
maxTitleLength: 12,
titleReplace: {'Appointment':'Appt'},
displaySymbol: false,
timeFormat: 'relative'
}
},