When there is an API there is a way! :-)
Have a look at this community approach to describe Max! Cube API.
When there is an API there is a way! :-)
Have a look at this community approach to describe Max! Cube API.
Awesome idea!
And while we are at it, I think that @Mykle1’s excellent step-by-step guides should also have a home in the wiki. The forum is the right place to work them out, but once the instruction have matured they should become part of the project itself.
If I see it correctly, you are installing Magic Mirror in directory /123/MagicMirror
. Usual place is in the home directory of user pi, i.e. /home/pi/MagicMirror
or ~/MagicMirror
.
In your startup logs you get many errors on loading resources such as CSS files. I’d assume the web server you are starting as user pi when starting MagicMirror is not allowed to access files in an arbitrary root directory, which your directory /123/MagicMirror
actually is.
I totally like the idea that my mirror informs me about upcoming shipments. I was wondering if there is a convenient way so that I don’t have to put the tracking numbers into the config.js?
Some ideas:
I’d love to get your thoughts on this. Thanks!
Hmm, this is weird. The original MMM-FRITZ-Box-Callmonitor comes with a node_helper.js
. Are you sure you did not delete it by accident resp. forgot to copy it to your dev environment? Moreover package.json
and the README.md
are missing.
Are you familiar with git? I’d advice that you fork the MMM-FRITZ-Box-Callmonitor into your own GitHub account and make all your changes there. This would also allow me to read your latest code after each git commit. From this forked repository there is an easy way to get your improvement back into the original repository once you are done.
One thing which does not look right is the custom in your path. Moreover your path is in the root and not under /home/pi
. It should read /home/pi/MagicMirror/modules/MMM-EmbedYoutube
or ~/MagicMirror/modules/MMM-EmbedYoutube
, which is equivalent for user pi.
From your description I get the impression that you did not use the tool git to checkout the module into your modules
directory. Is this possible? If so, please do the following:
cd ~/MagicMirror/modules
git clone https://github.com/nitpum/MMM-EmbedYoutube.git
I think there is also a zoom factor setting in config.js. Would this help?
See documentation on zoom
config setting:
This allows to scale the mirror contents with a given zoom factor. The default value is 1.0
Oh, one idea for your module. The calendar has a dedicated calendar fetcher as mentioned in my previous post. This may be interesting for your reverse lookup as well. Other people may want to use other online phone books, e.g. for different countries, and by configuring the right reverse lookup fetcher they could do so. Maybe have a look at the code of the calendar fetcher and the node helper where it is being called. However, IMHO you should first get your module working as it is. This is a suggestion for a future extension.
Hi @AxLed, great to see your progress!
There are a few remarks on testing that come to mind:
npm start dev
. This starts a browser UI for MM and in addition shows you the loaded HTML, CSS, source code, etc. In the browser’s source window you can set breakpoints and once they get hit, the program execution pauses and you have time to inspect variables. Please note that you don’t have to stop and start MM all the time with the command above. Just change source code in your programming editor, save it, and reload the MM browser (F5). This works both on Raspberry Pi and Windows PC.node debug.js
.Well, if you have created your config.js
from the config.js.sample
then you should already have a configuration sequence like below.
modules: [
...
{
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"
} ]
}
},
...
]
You have to put the fetchInterval
setting into the config
setting section of the calendar module. The result would look like this (just typing the calendar module’s part for simplicity):
{
module: "calendar",
header: "US Holidays",
position: "top_left",
config: {
fetchInterval: 1000 * 60 * 1,
calendars: [ {
symbol: "calendar-check-o ",
url: "webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics"
} ]
}
},
The value 60 * 1000 * 1
retrieves the calendar from the source (see parameter url
) every minute. Please note that the interval time value is given in milliseconds according to the documentation. When you pick a value make sure that your fetching is not too aggressiv. Too frequent syncs take bandwidth on your network, increases CPU load on Raspberry Pi, and there might be limitation enforced by the calendar provider.