I’m setting up my first Magic Mirror as replacement for a family whiteboard/calendar. I have pretty much everything working correctly except for one item. I have a behavior reward star chart for my kids. Its a simple php form to a database set up on my pi.
The Add, Remove, Reset buttons are supposed to change the corresponding number of stars for each row. When I load the php file in a browser, everything works fine.
I have the file on my MM using MMM-iFrame-Ping on a slide by itself within MMM-Carousel:
{
module: 'MMM-Carousel',
position: 'top_bar', // Required only for navigation controls
config: {
transitionInterval: 0,
mode: "slides",
showPageIndicators: true,
showPageControls: true,//CSS file has been modified to make invisible because setting to false crashes module
ignoreModules: ['updatenotification', 'alert'],
slides: [
['MMM-CalendarExt','MMM-NOAA3','MMM-ImagesPhotos',{name:'MMM-EyeCandy',carouselId:'1'},'clock'],
[{name:'MMM-EyeCandy',carouselId:'2',position:'top_left'},'clock','MMM-HTMLBox','calendar'],
['MMM-BackgroundSlideshow', 'clock'],
['MMM-iFrame-Ping'],
],
keyBindingsMode: "DEFAULT",
keyBindings: {
NextSlide: "ArrowRight",
PrevSlide: "ArrowLeft",
Slide0: "1",
Slide1: "2",
Slide2: "3",
Slide3: "4",
}
}
},
{
module: 'MMM-iFrame-Ping',
position: 'top_left', // This can be any of the regions.
config: {
// See 'Configuration options' for more information.
url: "http://192.168.1.54/stars.php", //url to display
height:"250px",
width:"800px",
autoRefresh: false, //set to false for video
displayLastUpdate: false,
}
},
The problem is that the “Add” button in the first row doesnt work. Clicking it has no effect. All the other buttons work fine. I have tried changing the button name and value, no matter what the first button doesn’t work. Adding a separate “Add” button elsewhere in the table with the same coding works fine. The only way I can get the first “Add” button to work is to add “<br>” before the button code in the cell, but that takes more space and throws off the alignment. Any ideas on how to get this to work without the line break? Thanks