@perilax
Or just a quick work-around as the default for updateInterval for openweathermap is 10 minutes anyway.
Try to comment out those 2 lines with //.
@kristjanesperanto
Quick response; quick fix π
@perilax
Or just a quick work-around as the default for updateInterval for openweathermap is 10 minutes anyway.
Try to comment out those 2 lines with //.
@kristjanesperanto
Quick response; quick fix π
@KristjanESPERANTO said:
I would be happy to hear your feedback.
Iβve replaced the Hafas module with this new one and am currently testing it.
Only using it for 1 S-Bahn to and from a single location.
For the moment it looks to meet my needs.
The only thing that I would like to additionally see, is the last 2 departures/arrivals in the past, but I think that is a limitation of the API.
@evroom keyword means find this(via regex) in the title, then work rest of customization . ONLY For events that find keyword string
.* Means all events
Yes, it is a double regex, right?
First look if this an event title that you would like to change, then search for the string you want to replace.
Still do not understand why the examples from the first post do not work, but for that we would need the exact event titles.
{keyword: βthis eventβ, transform: { search: βchangedβ, replace: βmodifiedβ}
Event title: βwe want this event to be changedβ.
New title: βwe want this event to be modifiedβ.
Do you happen to know how to make the keyword case insensitive?
string/i or m/string/i do not work.
Neither does (?i)
which means βmatch the reminder of the pattern with the i modifier.
The comments in the code are very confusing, but I think I get it now, more or less.
Try this:
{keyword: '.*', transform: { search: 'Spotify', replace: 'Music'}},
{keyword: '.*', transform: { search: 'Canterbury-Bankstown Bulldogs', replace: 'Bulldogs'},
The keyword is the event title string you want to change, in format regex.
The search is the substring that you want to replace, in format regex
The replace is what will be replaced based on your search
So in this case, letβs say the event title string is:
βSpotify play listβ
Then you search the complete string (.*) for the substring from search and you replace it by the string from replace.
Hence, the event title now becomes:
βMusic play listβ
I hope it is a little bit more clear.
Should it not work, then please supply a event title and in short what you want to be replaced.
The βRegular Expressionβ is your βsearchβ from the config line, hence βin Hamburg$β.
The βReplacement Patternβ is your βReplaceβ from the config line, hence ββ (nothing)
The βTest Stringβ is what is triggered by your βkeywordβ so in this case βGeburtstag in Hamburgβ will trigger the search and replace.
So, fill in:
Regular Expression: in Hamburg$
Test String: Geburtstag in Hamburg
Replacement Pattern: ββ
Then your Match will be βin Hamburgβ and your Highlighted will be βGeburtstagβ (that what remains white).
For testing search & replace on https://regex101.com, you will need to choose Function - Substitution on the left side.
Regular Expression: .in.Hamburg$
Test String: Geburtstag in Hamburg
Substitution:
This will result in: Geburtstag
This will only match on βin Hamburgβ, so to make it more flexible you will need to make use of so called grouping:
Regular Expression: (Geburtstag).+$
Substitution: $1
This will result in: Geburtstag
A pity it does not work for you.
Strange that is only happens after a several hours
But mplayer is rather old, perhaps that is the primary issue.
Still, I tried it on my Pi 3b with 1Gb RAM and it runs well.
It is 3 to 5 seconds lagging.
Like the stream on my P4b with 8Gb.
It also does not seem very memory hungry.
Pi 3b is steaming now for over 2 hours, so I will need to look later again to see if it got messed up.
The Pi 4b is streaming for 2 weeks straight now, without issues.
To me it looks more like a camera issue, but if you say that other players have no issues β¦
Somehow mplayer does not like your rtsp stream, or it is a combination of factors.
I have found that there is a config file, where you can set options.
Try out some options (need to restart MagicMirror after every change).
For example try nocache first.
Then try cache=65536.
The option nosound is always good (can be set in the MMM-Mplayer options too, if not already done so).
The bandwidth option is just a shot in the dark.
$ vi ~/.mplayer/config
# Write your default config options here!
# No cache
nocache=yes
# Cache size in kBytes (4MB / 8MB / 16MB / 64MB)
# cache=4096
# cache=8192
# cache=16384
# cache=65536
# Do not play/encode sound
nosound=yes
# Bandwidth (10MB / 100MB / 1000MB)
# bandwidth=80000000
bandwidth=100000000
# bandwidth=1000000000
What also can be the case, is that the windowSize is not matching your stream resolution.
This can cause issues as it needs to recode this portion.
Try:
windowSize: { width: 960, height: 540 },
for a 1920x1080 (16:9) stream.
That is all I can think of.
Good luck.
@plainbroke said in pm2 doesnt work with crontab:
@evroom,
I get that nothing is found, when I run either of your suggestions.
The journalctl -f shows the current activities.
Simular to tail -f <filename>.
So when there are none, you will see none.
Use that when you know that a cron job is going to occur anytime soon.
The --since "1 hour ago" searches for activities in the last hour.
Change to, for example --since "24 hours ago" for activities in the last 24 hours.
When nothing comes out, then indeed nothing happened (during the time period you are searching in).
Other --since options:
"today"
"00:20"
"2025-11-12"
"2025-11-12 07:30:00"
About /var/log/syslog.
Debian does not use that anymore, already since a while.
As far as I understand it, you will need to get familiar with journalctl.
For cron jobs try this:
$ journalctl --since "1 hour ago" --unit cron.service
$ journalctl -f -u cron.service
Happy hunting.
No, sorry, no idea.
What Sam says, but that needs knowledge.
But I opened an issue/request, so letβs see if it will be granted:
https://github.com/CuddlyCow/MMM-HoymilesPVMonitor/issues
Remove the old module from the config:
$ vi ~/MagicMirror/config/config.js
Remove the "MMM-Hoymiles-Wifi" config, or set:
module: "MMM-Hoymiles-Wifi"
disabled: true,
Delete HoymilesWifi from pm2:
$ pm2 stop HoymilesWifi
$ pm2 delete HoymilesWifi
$ pm2 save
If desired, completely remove the old module:
$ cd ~/MagicMirror/modules/
$ rm -rf MMM-Hoymiles-Wifi
Install MMM-HoymilesPVMonitor:
$ cd ~/MagicMirror/modules
$ git clone https://github.com/CuddlyCow/MMM-HoymilesPVMonitor.git
$ cd MMM-HoymilesPVMonitor
$ git branch
* main
$ git remote -v
origin https://github.com/CuddlyCow/MMM-HoymilesPVMonitor.git (fetch)
origin https://github.com/CuddlyCow/MMM-HoymilesPVMonitor.git (push)
$ which hoymiles-wifi
/home/admin/.local/bin/hoymiles-wifi
$ echo $PATH
/home/admin/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
$ vi ~/MagicMirror/config/config.js
{
module: "MMM-HoymilesPVMonitor",
disabled: false,
header: "PV Monitor",
position: "top_left",
config: {
dtuIp: "192.168.178.50", // IP address of your Hoymiles DTU
maxPower: 800, // Maximum system power in watts
updateInterval: 5 * 60 * 1000 // Update interval in milliseconds (default: 5 minutes)
}
}
$ grep 'dtuIp' ~/MagicMirror/config/config.js
dtuIp: "192.168.178.50", // IP address of your Hoymiles DTU
$ ls -als public/history_daily.json
4 -rw-r--r-- 1 admin admin 115 Nov 6 08:47 public/history_daily.json
$ cat public/history_daily.json
[
{
"timestamp": "2025-11-06 08:47",
"power": 40,
"energy_daily": 0.03,
"energy_total": 0.8
}
$ pm2 flush
$ pm2 restart MagicMirror
$ pm2 status MagicMirror
ββββββ¬βββββββββββββββββ¬ββββββββββββββ¬ββββββββββ¬ββββββββββ¬βββββββββββ¬βββββββββ¬βββββββ¬ββββββββββββ¬βββββββββββ¬βββββββββββ¬βββββββββββ¬βββββββββββ
β id β name β namespace β version β mode β pid β uptime β βΊ β status β cpu β mem β user β watching β
ββββββΌβββββββββββββββββΌββββββββββββββΌββββββββββΌββββββββββΌβββββββββββΌβββββββββΌβββββββΌββββββββββββΌβββββββββββΌβββββββββββΌβββββββββββΌβββββββββββ€
β 0 β MagicMirror β default β 2.33.0 β fork β 26202 β 4m β 3 β online β 0% β 2.1mb β admin β enabled β
ββββββ΄βββββββββββββββββ΄ββββββββββββββ΄ββββββββββ΄ββββββββββ΄βββββββββββ΄βββββββββ΄βββββββ΄ββββββββββββ΄βββββββββββ΄βββββββββββ΄βββββββββββ΄βββββββββββ
$ pm2 logs MagicMirror --lines 100
0|MagicMir | [2025-11-06 08:47:43.474] [INFO] [MMM-HoymilesPVMonitor.js:17:9] MMM-HoymilesPVMonitor started with DTU-IP: 192.168.178.50
:
:
0|MagicMir | [2025-11-06 08:47:49.226] [LOG] [MMM-HoymilesPVMonitor] Running Python script: python3 /home/admin/MagicMirror/modules/MMM-HoymilesPVMonitor/dtu_data.py --ip 192.168.178.50 --max 800 --out /home/admin/MagicMirror/modules/MMM-HoymilesPVMonitor/public/history_daily.json
0|MagicMir | [2025-11-06 08:47:51.682] [LOG] [MMM-HoymilesPVMonitor] Python script output: [WARNING] Could not load history: Expecting value: line 2 column 1 (char 1)
0|MagicMir | [2025-11-06 08:47] [INFO] Live DTU data appended: {'timestamp': '2025-11-06 08:47', 'power': 40, 'energy_daily': 0.03, 'energy_total': 0.8}
:
:
0|MagicMir | [2025-11-06 08:52:42.141] [LOG] [MMM-HoymilesPVMonitor] Running Python script: python3 /home/admin/MagicMirror/modules/MMM-HoymilesPVMonitor/dtu_data.py --ip 192.168.178.50 --max 800 --out /home/admin/MagicMirror/modules/MMM-HoymilesPVMonitor/public/history_daily.json
0|MagicMir | [2025-11-06 08:52:43.287] [LOG] [MMM-HoymilesPVMonitor] Python script output: [2025-11-06 08:52] [INFO] Live DTU data appended: {'timestamp': '2025-11-06 08:52', 'power': 41, 'energy_daily': 0.03, 'energy_total': 0.8}
$ cat public/history_daily.json
[
{
"timestamp": "2025-11-06 08:47",
"power": 40,
"energy_daily": 0.03,
"energy_total": 0.8
},
{
"timestamp": "2025-11-06 08:52",
"power": 41,
"energy_daily": 0.03,
"energy_total": 0.8
}
Tested on:
$ cat /proc/device-tree/model; echo
Raspberry Pi 3 Model B Plus Rev 1.3
$ vcgencmd get_config total_mem
total_mem=1024
$ grep version ~/MagicMirror/package.json
"version": "2.33.0",
Yeah, stopped is not good.
I will need to get it working myself before I can give more useful information on what to check.
Will keep you posted.
>> You installed that already, so no need to install it again.
>>The schris88 requirements.txt contains the hoymiles-wifi package.
If you want to repeat it under the new module name, then you will need to copy the requirements.txt file from the previous module.
But again, since you already did this, no need to repeat.
You installed that already, so no need to install it again.
Probably using:
python -m pip install -r requirements.txt --break-system-packages
The schris88 requirements.txt contains the hoymiles-wifi package.
You also might try this module:
https://github.com/CuddlyCow/MMM-HoymilesPVMonitor
I may give it a try myself.
First of all, where I write
/home/admin/
please use
~/
(tilde sign)
And can you please send me:
cd ~/MagicMirror/modules/MMM-Hoymiles-Wifi
git branch
git remote -v
Every time you get that port in use error, run the long command to see what programs are using the port.
And of course do not use HoymilesWifi.sh when it is also active under pm2.
I am starting to wonder if the module works at all.
I finally got a picture, but it showed an error in it.
To be honest, for me the MM does not display anything.
Although it is dark, I still expected the graphic with 0 or so.
Or I have to wait a bit longer.
I used
https://github.com/schris88/MMM-Hoymiles-Wifi/
and all the above is correct and running.
A year ago I made a fork and made some changes, of which I think are present in the schris88 version as well.
https://github.com/evroom/MMM-Hoymiles-Wifi/
I will give this one a try when I have time.
PS: it seems that when the microinverter is off-line, you will not see anything. Need to wait for it to be active again.
First I would disable the module:
$ vi ~/MagicMirror/config/config.js
module: "MMM-Hoymiles-Wifi",
disabled: true,
$ pm2 restart MagicMirror
I build this command to try to get more info on port 5000:
$ for pid in `lsof -i :5000 | grep -v 'PID' | awk '{print $2}' | sort -u`; do echo $pid; ps -Flww -p $pid; done
Hopefully the Forum tool does not change it.
Furthermore please verify and supply the following data:
$ cd /home/admin/MagicMirror/modules/MMM-Hoymiles-Wifi
Check path:
$ which hoymiles-wifi
$ echo $PATH
Check if the path is in the PATH.
If not, do (using the path from βwhichβ):
$ export PATH=$PATH:/home/admin/.local/bin
Check config.js:
$ grep ':5000' ~/MagicMirror/config/config.js
Expected is:
{ src: 'http://127.0.0.1:5000' },
Check HoymilesWifi.sh:
$ grep 'dtu_ip_address' HoymilesWifi.sh
Expected is your DTU IP address, for example:
python hoymiles_data.py --dtu_ip_address 192.168.178.50 --max 800
Test run (hoymiles-wifi):
$ hoymiles-wifi --host 192.168.178.50 identify-inverters
Expected is a response.
Test run (HoymilesWifi.sh)
$ ./HoymilesWifi.sh
Expected is:
* Serving Flask app 'hoymiles_data'
* Debug mode: off
INFO:werkzeug:WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on http://127.0.0.1:5000
INFO:werkzeug:Press CTRL+C to quit
If you wait a bit some more output is shown.
If it works, then I would suggest to stop the ./HoymilesWifi.sh command and do:
$ cd /home/admin/MagicMirror/modules/MMM-Hoymiles-Wifi
$ pm2 start HoymilesWifi.sh
$ pm2 save
$ pm2 status HoymilesWifi
$ pm2 logs HoymilesWifi --lines 10
If everything is okay, the enable the module again:
$ vi ~/MagicMirror/config/config.js
module: "MMM-Hoymiles-Wifi",
disabled: false,
$ pm2 restart MagicMirror
Yes, so an instance is already running.
You added it to pm2 too?
pm2 status
If yes, then you do not need to run it manually.
If no, then kill the (p)pid.
sudo kill -9 [ppid]
This command should give more information on the PID found:
ps -Flww -p
E.g.
ps -Flww -p 64879
Perhaps there are easier ways, but this should do.
Try this to find out what is using port 5000:
sudo netstat -apln | grep -w 5000
And did you update the bash program?
https://github.com/schris88/MMM-Hoymiles-Wifi?tab=readme-ov-file#enter-dtu-ip-address-of-dtu