@mumblebaj {
module: ‘MMM-Dockerstat’,
header: ‘Docker Status’,
position: ‘top_right’,
config: {
host: ‘192.168.1.200’, // IP address of the second Pi running Docker
interval: 600000, //60 seconds
user:‘pi’,
password:‘mypass’,
container: ‘wireguard’, // just added to check
offlineIcon: ‘fa-times-circle’, // Font Awesome icon for offline status
onlineIcon: ‘fa-check-circle’ // Font Awesome icon for online status
}
},
Yes i added the name of the container. It is still not displaying the status. Anyways the idea was for the module to probe and display the status of all containers running in docker.
Read the statement by Michael Teeuw here.
Posts made by Rags
-
RE: ChatGpt developed Module MMM-Dockerstat
-
RE: ChatGpt developed Module MMM-Dockerstat
@mumblebaj
Yes Sir. I noticed the changes committed by you and I immediately approved the merge commit. Please understand this is my first attempt and I had ChatGPT to help me. I guess we both are still learning. Well, I cloned the fresh updated repository and installed it. Now when i run it the constantly rotating arrow is not displayed anymore, but even the status of the containers are not being displayed. The npm start logs do not have any error messages. The dev console is also not indicating any issue. So probably some more debug is required. Sincere request to keep assisting till it is resolved.
Thanks -
RE: ChatGpt developed Module MMM-Dockerstat
@mumblebaj
Thanks for the help, i am running with npm start. The display does not show the status of the docker containers. Instead the rotating arrow is continuously displayed.
I don’t know if the these error messages will indicate something, however here goesThe error msg with npm start;
02.04.2023 17:12.36.528] [LOG] Host 192.168.1.200 is offline.
[02.04.2023 17:12.36.530] [ERROR] (node:11566) UnhandledPromiseRejectionWarning: TypeError: Cannot read properties of undefined (reading ‘info’)
at /home/pi/MagicMirror/modules/MMM-Dockerstat/node_helper.js:59:21
at /home/pi/MagicMirror/modules/MMM-Dockerstat/node_modules/ping/lib/ping-sys.js:40:9
[02.04.2023 17:12.36.531] [ERROR] (node:11566) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 5)
with developer console;Failed to load resource: the server responded with a status of 404 (Not Found)
0.0.0.0/:1 Refused to execute script from ‘http://0.0.0.0:8088/modules/MMM-Dockerstat/fontawesome.js’ because its MIME type (‘text/html’) is not executable, and strict MIME type checking is enabled.
loader.js:194 Error on loading script: modules/MMM-Dockerstat/fontawesome.js
script.onerror @ loader.js:194 -
RE: ChatGpt developed Module MMM-Dockerstat
@mumblebaj Thanks for the encouragement. I made the changes as suggested and updated the files on github. I also did some debugging and tried to resolve issues. However, I guess i am reaching a dead end. So any help will be appreciated greatly.
-
RE: ChatGpt developed Module MMM-Dockerstat
@sdetweil Ok, is there any other method of achieving this?
-
RE: MMM-Moon, See the moon phases and rise/set times!
@sdetweil said in MMM-Moon, See the moon phases and rise/set times!:
@Rags a much better way is to use css to set the size instead of changing the code
Sure. Understood. Just learning.
-
ChatGpt developed Module MMM-Dockerstat
I am novice self taught coder having basic knowledge of coding in various languages. I used ChatGPT to help me code a module for MagicMirror. The results are definitely encouraging. I am sure the masters in coding may not need to rely on ChatGPT, but for novice coders it is a good beginning.
So the Module is uploaded on github . It is not fully functional and has a few bugs. ChatGPT almost gave up to debug the code and advised me to check with the community/forum to resolve it and make it work. So i request the community to identify the bugs and make it work.
The idea of the module is very basic and is to;- ssh into another machine running on the home network and probe the status of the docker container running.
- Display the results in a dashboard form on the MM instance running on another pi.
Any help will be greatly appreciated and will definitely motivate many MM fans to start to design and code newer modules and increase the fan base.
https://github.com/Ragziesoft/MMM-Dockerstat -
RE: Is it possible to clone an existing Magic Mirror installation on a Fresh Installation of Raspbian ?
@sdetweil said in Is it possible to clone an existing Magic Mirror installation on a Fresh Installation of Raspbian ?:
@Rags thanks for the feedback
\1. what modules? I’d like to examine that. the restore does npm install if there is a package json or there is a node_helper that uses one of the removed libs (after creating the package
json)\4. this is w my install script, right? can u send me the ~/install.log
same userid at gmail2/3. yes modules that depend on other files that I don’t know about.
still. less than a day is a win
I have mailed you the install.log file. Few of the modules that needed npm install (as far as i remember) are DHT sensor, PIR sensor, GPIO notification, speedtest, mmm-tools, default calendar, Open Ai, Google photos; the list is incomplete as i dont remember now. Anyways i feel there could be certain issues which either got sorted automatically during reboot or after npm install .
The font awesome icons for calendar are not showing up, the speed test module has been put in EOL, so it did not fire up. So i guess the script should detect if a certain module is in EOL in the github and suggest a backup.During restore of MM the following msg was visible;
npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient…
npm WARN old lockfile
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Mat>Do i need to upgrade to ver 7 ??
Finally, yes your script to backup and restore is certainly a win. Thanks
-
RE: Is it possible to clone an existing Magic Mirror installation on a Fresh Installation of Raspbian ?
@sdetweil Ok i finally managed to migrate to a new SSD. However, it was not without surprises. i had to
- Redo a npm install on a few modules to make them work.
- MMM-Google photos module folder was missing the token.json file had to be recopied from backup(Thank god i had module folder on my SD)
- API key of MMM-OpenAi had to be recreated and stored in .env file.
- The PM2 did not work with the automated installation. I got an error [PM2][ERROR] File ecosystem.config.js not found. Could be an error from my side while configuring, not sure. I deleted the instance of pm2 and reinstalled manually.
But the process was not smooth, it took some doing, but finally my new MM seems to been successfully cloned. Yet to fully check all modules.
I have regained configuration control of the display and have been able to rotate it to Portrait mode. i am yet to check sound configuration.
-
RE: Is it possible to clone an existing Magic Mirror installation on a Fresh Installation of Raspbian ?
@sdetweil Thanks for the reply. If i understood correctly, the steps involved would be;
- Run your backup script and take a backup of the existing MM installation and save it to an externally location.
- Install a fresh Raspberry Pi OS on the new SSD.
- Install MM using your script.
- Copy the saved MM backup directory to the new SSD MM directory.
- Run your restore script to restore the MM to the original configuration.
So if these steps are followed, will just running the restore script ensure ;
- All dependencies will also be automatically loaded and configured?
- Is there any other configuration setting specially for GPIO control that may be required?
- Are there any other additional scripts that may be required to be run?
Sorry for requesting for specific queries to be answered. I don’t want to goof up the installation and then spend hours to recover.
Thanks