AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
New magic mirror modules12/6/2023 ![]() A quick Google search yielded the HTTP API for Prometheus. Since Grafana Mimir is Prometheus-compatible, I should be able to use the Prometheus APIs to get alert data. However, as I stared at my office panel, it occurred to me that there should be a way to gather these alerts and show them in Magic Mirror. Currently, I have a personal Slack team with an alerts channel, and that has been working nicely. In recent weeks, my experimentation with Mimir has lead me to write some alerts to keep tabs on things in my Kubernetes cluster and, well, the overall health of my systems. A slideshow of pictures using the Background Slideshow module.Site status using the StatusPage.IO module.My to-do list using the Microsoft ToDo module.Incoming package deliveries using the OneTracker module.Calendar Events via the Calendar module.Presently, my Magic Mirror configuration uses the following modules: As I continue my dive into Prometheus for monitoring, it occurred to me that I might be able to create a new module for displaying Prometheus Alerts. A quick glance gives my family and I a look at information that is relevant for the days ahead. My personal blog for topics relating to software testing, programming and anything else that grabs my attention.I have had MagicMirror running for about a year now, and I love having it in my office. How to Remote Edit Files on Raspberry Pi Using VS Code.How to set up Home Assistant OS on a headless Raspberry Pi.This can be resolved by deleting your cache. One of the problems I ran into when I was starting to set up my Magic Mirror, was that the settings were cached, and changes would not show up. Delete cache to force reload of the settings If you want to manually restart Magic Mirror (to reload updated settings for example), you can use pm2 restart mm. Your Magic Mirror will now start when the Raspberry Pi starts. Now start Magic Mirror using PM2 and your script: Make the script executable using: chmod +x mm.sh Save and close the file with CTRL+Q, Y and enter. I put mine in my home folder: cd ~Īnd paste in these lines: cd. We don’t want to risk overwriting this script when updating Magic Mirror, so place it outside your Magic Mirror folder. ![]() Next we need to make a script that can start Magic Mirror. We can use PM2, a production process manager, to accomplish this. It is pretty useful if Magic Mirror starts anytime the Raspberry Pi (re-)starts, without user intervention. Automatically start Magic Mirror when the Raspberry Pi (re-)starts However, do check the installation and configuration instructions for each module. Installing them is usually as easy as going to the modules folder ( MagicMirror/modules) and cloning the module repository into that folder. You can find a list of available modules on the Magic Mirror Wiki. I personally don’t use this, because I already have Apache running, and MMPM wants to install NGINX which is a hassle next to Apache. To manage these modules, you can use MMPM, the MagicMirror Package Manager. There are so many, and it is relatively easy (if you know how to code) to create your own. The power of Magic Mirror is in the modules you can use. Make sure that you are cloning from the location where you want this folder to be.Ĭp config/config.js.sample config/config.jsĪnd start the application (with its visual components): This will download the Magic Mirror code into a folder called MagicMirror. We will clone the repository and check out the master branch: Let’s first download and install Node.js: curl -sL | sudo -E bash. I looked at several solutions, but due to its extensibility I chose Magic Mirror.īefore we start, let’s make sure our Raspberry Pi is up to date: sudo apt update Things like our calendar’s, the weather, trash days, commute information etc. I want a screen in our living room that displays relevant information for our family. As my entry to the challenge (see my earlier post) I am going to create a home dashboard.
0 Comments
Read More
Leave a Reply. |