Also, would these instructions work with the button I have?: http://www.mausberrycircuits.com/pages/setup
Or would they only work with the mausberry circuits buttons that attach to the power cord?
Also, would these instructions work with the button I have?: http://www.mausberrycircuits.com/pages/setup
Or would they only work with the mausberry circuits buttons that attach to the power cord?
@Jopyth So, with the module you linked, would these default settings mean that it activates when pin 5 is grounded? I apologize for all these dumb questions. Iḿ really new to this entire scene. Also, what would I need to change to make it shutdown?
´/* global Module */
/* Magic Mirror
Module.register(‘MMM-Button’,{
defaults: {
buttonPIN: 5,
//time in miliseconds before another button click is recognized
clickDelay: 500,
},
// Override socket notification handler.
socketNotificationReceived: function(notification, payload) {
if (notification === “BUTTON_PRESSED”){
this.sendNotification(notification, payload)
}
},
start: function() {
this.sendSocketNotification(‘BUTTON_CONFIG’, this.config);
Log.info('Starting module: ’ + this.name);
}
});´
@Jopyth
That would be awesome, thanks.
Hi, I am trying to add a button/switch to my mirror for safe shutdown. I am using RPi3 model B.
I have this: https://www.amazon.com/gp/product/B0170B75EU/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1
The problem I am having is with adding the code to make it function as a shutdown button.
Full disclosure: I know absolutely nothing about how to use python.
Any help you can provide would be appreciated.
I actually managed to figure it out. The problem was in the configs for the individual modules. They were set for ´config.js´ instead of ´config.units´ and ´congif.timeFormat´. Once I changed those it worked out.
Thanks for the help though!
@yawns
´/* Magic Mirror Config
*
var config = {
port: 8080,
language: 'en',
timeFormat: 12,
units: 'imperial',
modules: [
{
module: 'alert',
},
{
module: 'clock',
position: 'top_left'
},
{
module: 'calendar',
header: 'US Holidays',
position: 'top_left',
config: {
calendars: [
{
symbol: 'calendar-check-o ',
url: 'webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics'
}
]
}
},
{
module: 'compliments',
position: 'lower_third'
},
{
module: 'currentweather',
position: 'top_right',
config: {
location: 'Charlottesville',
locationID: '', //ID from http://www.openweathermap.org
appid: '1a42661953c78c36f761da67f2d94fef'
}
},
{
module: 'weatherforecast',
position: 'top_right',
header: 'Weather Forecast',
config: {
location: 'Charlottesville',
locationID: '5128581', //ID from http://www.openweathermap.org
appid: '1a42661953c78c36f761da67f2d94fef'
}
},
{
module: 'newsfeed',
position: 'bottom_bar',
config: {
feeds: [
{
title: "New York Times",
url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml"
}
],
showSourceTitle: true,
showPublishDate: true
}
},
]
};
/*************** DO NOT EDIT THE LINE BELOW ***************/
if (typeof module !== ‘undefined’) {module.exports = config;}´
Hi, I am having a huge problem getting the time in the default clock module to change to 12 hour time, and the same problem with setting both the current weather and the weather forecast modules to Fahrenheit.
I tried using the information here: https://github.com/MichMich/MagicMirror/wiki/MagicMirror²-Modules
But it either causes the module to fail or makes no change.
Any help is appreciated.