@wjdw87 Make sure that you created the mm.sh script as part of the pm2 process. Run ls -lh ~/ and see if mm.sh is one of the files.
There should be an entry that looks like this:
-rwxr-xr-x 1 pi pi 40 Oct 17 18:46 mm.sh
@wjdw87 Make sure that you created the mm.sh script as part of the pm2 process. Run ls -lh ~/ and see if mm.sh is one of the files.
There should be an entry that looks like this:
-rwxr-xr-x 1 pi pi 40 Oct 17 18:46 mm.sh
@wjdw87 The readme.md is also downloaded with the MirrorMirror code when you run the installation command. You’ll find it on your Pi at ~/MagicMirror/README.md.
@wjdw87 Indeed, you can. The documentation for the newsfeed module gives a simple example.
If you have not installed the package “unclutter”, simply plug a USB mouse into your Raspberry Pi and move it about. You should see the mouse cursor.
If you have installed unclutter, you may remove it via the command sudo apt-get remove unclutter.
@wjdw87 Why do you have the newsfeed module specified twice? You have:
{
module: 'newsfeed',
position: 'bottom_bar',
config: {
feeds: [
{
title: "Bloomberg Baby!",
url: "https://www.bloomberg.com/feeds/podcasts/etf_report.xml"
}
],
showSourceTitle: true,
showPublishDate: true
}
},
{
module: 'newsfeed',
position: 'bottom_bar',
config: {
feeds: [
{
tittle: "BBC Sci-Tech",
url: "http://feeds.bbci.co.uk/news/video_and_audio/technology/rss.xml?edition=uk"
}
],
showSourceTitle: true,
showPublishDate: true
}
},
Would it not make more sense to just put both feeds in the feed array?
{
module: 'newsfeed',
position: 'bottom_bar',
config: {
feeds: [
{
title: "Bloomberg Baby!",
url: "https://www.bloomberg.com/feeds/podcasts/etf_report.xml"
},
{
title: "BBC Sci-Tech",
url: "http://feeds.bbci.co.uk/news/video_and_audio/technology/rss.xml?edition=uk"
}
],
showSourceTitle: true,
showPublishDate: true
}
}
(Also, you misspelled “title” in your second newsfeed. You have an extra “t”.)
Check the console log. I suspect you’ll see a security error preventing the browser from accessing the monitor. Either launch your mirror in dev mode (modify your mm.sh script to read DISPLAY=:0 npm start dev and then restart via pm2 restart 0) or browse to your mirror’s address via a web browser and enter developere mode.
Please post your config.js file so that we may take a look at it. Please remember to use the markdown features of the forum while you’re at it. :)
Acrylic is a plastic and as such is not conductive. The capacitance touch screen works by your body’s natural conductivity. Your finger touch disrupts an electrical field and that disruption is measured to determine where you touched it. The acrylic mirror is an effective insulator and will prevent your touch from registering.
If this blog/advertisement on photo booths is accurate, they use a Microsoft Kinect to perform motion tracking on the subject. Now adapting that would be an interesting RPi project!
For more information: How Do Touch Screens Actually Work?
Not a worry. Everyone has been quite friendly. It just have to keep it in mind when attempting to spell things in the URLs. :)
Marvelous. Thank you. I take back all the snark I was going to deliver about Europeans and their extra “u” characters in their words. Like “favorite”. :)
How one is supposed to understand that bookmark => favourite is left as an exercise for the student.
There have been a couple of really useful posts by fellow members that I have bookmarked via the interface. How do I find them again? I don’t see a link to view my bookmarked posts.
@Shawnsully Double-check your commas and curly braces, specifically at the beginning of your module entry. You have:
},
module: 'MMM-NFL',
position: ‘bottom_left’,
...
You probably want:
},
{
module: 'MMM-NFL',
position: ‘bottom_left’,
...
Okay, thanks to @strawberry-3-141 expert advice, I have it up and running. The code he gave me is good, the JSON file I am loading from is not. We’ve got it sorted out and now I’m loading a compliment array from a file. Woohoo!
@cowboysdude said in Calendar Module: How to declare local calendar:
console.log(json.compliments.morning[0])I’m not programmer either but doesn’t this line just call the first object in the json file?
Yes, it does. My test file has ten compliments loaded for each array (morning, afternoon & evening). That line was just to verify that I was getting a JSON object and not a file path. Which it does, meaning that I have the code reading from a local and parsing into a JSON object correctly. Now if I can just get that object in place of the default one, I’m golden.
@strawberry-3-141 said in Calendar Module: How to declare local calendar:
@bhepler something like this should do the job:
move the call of complimentFile into the start method, you want to load that file only once not every 30 secs
then override the the config compliments object with your data, that should be it
Well, nuts. I inserted this code and now the config.compliments is undefined. But I do think you’ve got me on the right track. Thanks!
compliments.js:67 Uncaught TypeError: Cannot read property 'length' of undefined
I’m currently trying to do the same as a modification to the compliments module. As part of the gift, my wife is writing up about 100 compliments for the recipients. That’s a bit much to throw into the config.js file, so I am attempting to get it to load the JSON for the compliments array in a separate file.
I’ve had some success. I managed to get the file loaded into a variable. I can log out the contents of the array. What I can’t seem to do it get that variable into the existing compliments code. Hopefully you’ll have more success. Loading JSON file code taken from Codepen.
complimentFile: function(callback) {
var xobj = new XMLHttpRequest();
xobj.overrideMimeType("application/json");
xobj.open('GET', this.file([***file name***]), true);
xobj.onreadystatechange = function () {
if (xobj.readyState == 4 && xobj.status == "200") {
callback(xobj.responseText);
}
};
xobj.send(null);
},
And the call:
randomCompliment: function() {
var compliments = this.complimentArray();
var complimentFile = this.complimentFile(function (response) {
var json = JSON.parse(response);
console.log(json.compliments.morning[0])
});
var index = this.randomIndex(compliments);
return compliments[index];
},
With this code, I can get the console to show the contents of the JSON file. In the log, I can see the first of the morning compliments I set up in my external file. But for the life of me, I can’t seem to get that json object out of the function. Javascript is obviously not my thing.
You should be able to use the default Calendar module that comes with the stock Magic Mirror installation. So long as you can get your calendar available to you as an ICS feed, you should be good to go. Flipping through the Amion website, I did find a reference to ICS format, so I know they’re capable of producing it.
It seems like you should be able to tie in with little trouble.
On the off chance you missed it, here is the link to the Calendar module documentation.