Zitat von: Marko1976 am 02 April 2026, 13:00:57Frage: Wieviel Code hast du im Test String eingegeben? Den ganzen Seitenquelltext oder nur einen Ausschnitt?
<div class="col text-center gameentry">
<span class="teamshorts">SWW:KEC</span><br>
<a href="/statistik/spieldetails/29032026_schwenninger-wild-wings_gg_koelner-haie_4347">
2:4
</a>
<br>
</div>
text
text
<div class="col text-center gameentry">
<span class="teamshorts">KEC:SWW</span><br>
31.03.<br>
19:30</div>
Zitat von: Burny4600 am 02 April 2026, 12:24:10Image wird bei mir mit ssh Login auf SSD installiert.
Zugriffe für Installationsergänzungen werden über PuTTY Konsole mit sudo su gemacht.
Code Auswählen ErweiternDo not use these procedures for updates/upgrades!Dann fange ich schon komplett anders an.Darum kann ich mittels sudo apt install fhem FHEM nicht in dieser Form installieren.
Berechtigung des Verzeichnisses fehlte. chmod -R 0777 /usr/share/keyrings
FHEM Installation nach Vorgabe: https://debian.fhem.de/ => The easy way: Use apt to install FHEM and all dependencies
Jedenfalls gibt es nach diesen Schritten kein Verzechnis .ssh.
Zitat von: Burny4600 am 02 April 2026, 12:24:10FHEM wird ganz zum Schluss bei einer Neukonfiguration installiert. Zuletzt dann Alexa. Anschließend wird die gesicherte fhem.cfg und gewisse Datein auf das System kopiert. Die fhem.cfg besitzt die Verknüpfungen zu den Geräten und Programme die auf einer ausgelagerten Festplatte liegen.
Jeder Pi hat seine eigenen Schlüssel die gespeichert werden, und bei einer Neuinstallation wieder auf das neu errichtet System in das Verzeichnis /opt/fhem/cert zurück kopiert.
Zitat von: Burny4600 am 02 April 2026, 12:24:10ZitatOS aktualisiert und meine gewohnten Einstellungen...Wie machst die Aktualisierungen ohne update und upgrade?
defmod delspiele HTTPMOD https://www.penny-del.org/spiele 300
attr delspiele devStateIcon {\
my $counter = 1;;\
my $html = "<table border='1' style='border-collapse: collapse;;'>";;\
\
# header row\
$html .= "<tr><th>Home</th><th>Guest</th><th>Score</th></tr>";;\
\
while (1) {\
my $home = ReadingsVal($name, "homeTeam-$counter", "na");;\
my $guest = ReadingsVal($name, "guestTeam-$counter", "na");;\
my $score = ReadingsVal($name, "score-$counter", "na");;\
\
last if ($home eq "na" || $guest eq "na" || $score eq "na");;\
\
$html .= "<tr>";;\
$html .= "<td>$home</td>";;\
$html .= "<td>$guest</td>";;\
$html .= "<td>$score</td>";;\
$html .= "</tr>";;\
\
$counter++;;\
}\
\
$html .= "</table>";;\
"<div>$html</div>"\
}
attr delspiele reading01Name score
attr delspiele reading01RegOpt g
attr delspiele reading01Regex <div class="col-12">\s*<div class="row">[\s\S]*?<h3>\s*(\d+:\d+)\s*<\/h3>
attr delspiele reading02Name homeTeam
attr delspiele reading02RegOpt g
attr delspiele reading02Regex <div class="col-12">\s*<div class="row">\s*<div class="col-5[^"]*">[\s\S]*?<\/div>\s*([^<\n][^<]*)
attr delspiele reading03Name guestTeam
attr delspiele reading03RegOpt g
attr delspiele reading03Regex <div class="col-12">\s*<div class="row">[\s\S]*?<h3>[\s\S]*?<\/h3>\s*<\/div>\s*<div class="col-5[^"]*">[\s\S]*?<\/div>\s*([^<\n][^<]*)
Given the following html, I need three regexes that:
1. Match all scores (only those in col-12, not those in col-12 mt-3)
2. Match the "home" teams
3. Match the "visitor" teams
<html-code wie oben ausgeführt>You *can* do this with regex, but fair warning: this HTML is structured enough that a parser (BeautifulSoup, etc.) would be much more robust. That said, here are solid regexes tailored to your exact structure.
---
## 1) Scores (only in `col-12`, NOT `col-12 mt-3`)
These are inside:
```html
<div class="col-12">
...
<h3>4:0</h3>
```
### Regex:
```regex
<div class="col-12">\s*<div class="row">[\s\S]*?<h3>\s*(\d+:\d+)\s*</h3>
```
### Why it works:
* Anchors specifically to `div class="col-12"` (no `mt-3`)
* Lazily scans until `<h3>`
* Captures only scores like `4:0`, `3:1`, etc.
---
## 2) Home teams
These are always the **first `col-5` block** inside that same `col-12`.
### Regex:
```regex
<div class="col-12">\s*<div class="row">\s*<div class="col-5[^"]*">[\s\S]*?</div>\s*([^<\n][^<]*)
```
### Captured group:
* Group 1 = **home team name**
### Example match:
```
Kölner Haie
Adler Mannheim
```
---
## 3) Visitor teams
These are the **second `col-5` block** after the score.
### Regex:
```regex
<div class="col-12">\s*<div class="row">[\s\S]*?<h3>[\s\S]*?</h3>\s*</div>\s*<div class="col-5[^"]*">[\s\S]*?</div>\s*([^<\n][^<]*)
```
### Captured group:
* Group 1 = **visitor team name**
---
## Cleaner alternative (recommended)
If your regex engine supports it, a more structured approach:
### Extract each matchup block first:
```regex
<div class="col-12">\s*<div class="row">([\s\S]*?)</div>\s*</div>
```
Then run inside each block:
* **Home team:**
```regex
<div class="col-5[^"]*">[\s\S]*?</div>\s*([^<]+)
```
* **Score:**
```regex
<h3>\s*(\d+:\d+)\s*</h3>
```
* **Visitor team:**
```regex
<h3>[\s\S]*?</h3>\s*</div>\s*<div class="col-5[^"]*">[\s\S]*?</div>\s*([^<]+)
```
---
If you tell me your language (Python, JS, etc.), I can give you a **ready-to-run extraction snippet**, which is honestly the safer route here.
Now write some perl code that iteratively does something like
my $game = ReadingsVal($name,"homeTeam-$counter","na")." vs ".ReadingsVal($name,"guestTeam-$counter","na").": ".ReadingsVal($name,"score-$counter","na")
and loops over $counter until one value encounters na
then return everything formatted as a simple html table (or just a list, i guess? but also make a version where the three components are separated into a table)Here's a clean Perl approach that does exactly what you described: iterate over `$counter` until one of the readings returns `"na"`, then build output.
I'll give you **two versions**:
1. Simple list
2. Proper HTML table
---
# ✅ 1) Simple list version
```perl
my $counter = 1;
my @games;
while (1) {
my $home = ReadingsVal($name, "homeTeam-$counter", "na");
my $guest = ReadingsVal($name, "guestTeam-$counter", "na");
my $score = ReadingsVal($name, "score-$counter", "na");
# stop if any value is "na"
last if ($home eq "na" || $guest eq "na" || $score eq "na");
push @games, "$home vs $guest: $score";
$counter++;
}
# build HTML list
my $html = "<ul>";
$html .= "<li>$_</li>" for @games;
$html .= "</ul>";
return $html;
```
---
# ✅ 2) HTML table version (separate columns)
```perl
my $counter = 1;
my $html = "<table border='1' style='border-collapse: collapse;'>";
# header row
$html .= "<tr><th>Home</th><th>Guest</th><th>Score</th></tr>";
while (1) {
my $home = ReadingsVal($name, "homeTeam-$counter", "na");
my $guest = ReadingsVal($name, "guestTeam-$counter", "na");
my $score = ReadingsVal($name, "score-$counter", "na");
last if ($home eq "na" || $guest eq "na" || $score eq "na");
$html .= "<tr>";
$html .= "<td>$home</td>";
$html .= "<td>$guest</td>";
$html .= "<td>$score</td>";
$html .= "</tr>";
$counter++;
}
$html .= "</table>";
return $html;
```
---
# 💡 Optional improvements (worth considering)
### 1. Safer HTML (escaping)
If team names could contain special chars:
```perl
use HTML::Entities;
$home = encode_entities($home);
$guest = encode_entities($guest);
$score = encode_entities($score);
```
---
### 2. Skip incomplete entries instead of stopping
If your data might have gaps:
```perl
last if ($home eq "na" && $guest eq "na" && $score eq "na");
next if ($home eq "na" || $guest eq "na" || $score eq "na");
```
---
### 3. Limit loop (safety guard)
```perl
last if $counter > 100;
```
ZitatbeginTime dateTime Query start time, formatted as 'yyyy-MM-dd HH:mm:ss', in UTC timezone. The effective range refers to the query latitude column.z.B.
endTime dateTime Query end time, formatted as 'yyyy-MM-dd HH:mm:ss', in UTC timezone. The effective range refers to the query latitude column.
get Ecoflow_Ultra1 BatteryChargingDischargingPower 2026-04-02 07:00:00 2026-04-02 21:00:00 Sonst müssen wir auf Denis warten...Zitat von: diebels am 31 März 2026, 08:48:43Zitat von: 300P am 30 März 2026, 09:23:10Hier meine:attr Forecast setupBatteryDev01 SBS37 pin=-pout:kW pout=total_pac:kW pinmax=3600 poutmax=3600 intotal=bat_loadtotal:kWh outtotal=bat_unloadtotal:kWh cap=16000 charge=chargestatus show=3:top icon=@dyn:@dyn:@dyn:@dyn asynchron=0 label=beside
attr Forecast setupBatteryDev02 SBS25_2 pin=-pout:kW pout=total_pac:kW pinmax=2500 poutmax=2500 intotal=bat_loadtotal:kWh outtotal=bat_unloadtotal:kWh cap=bat_residual_cap:Wh charge=chargestatus show=3:top icon=@dyn:@dyn:@dyn:@dyn asynchron=0 label=below
Hallo,
hier ist meine Config (nicht so spannend):
attr Forecast setupBatteryDev01 BatteryDummy pin=-pout:W pout=total_pac:W intotal=bat_loadtotal:kWh outtotal=bat_unloadtotal:kWh charge=chargestatus cap=9000
attr Forecast setupBatteryDev02 BatteryDummy2 pin=-pout:W pout=total_pac:W intotal=bat_loadtotal:kWh outtotal=bat_unloadtotal:kWh charge=chargestatus cap=7800
Heute Nacht wieder der gleiche Fehler. Wie gesagt, war nur als Hinweis gedacht. Ich teste jetzt die 2.5.0 aus dem Trunk. Danke!
VG