PowerFlow [animiertes SVG, dummy, javascript]

Begonnen von schwatter, 20 Oktober 2024, 21:56:34

Vorheriges Thema - Nächstes Thema

schwatter

Klick Mich. Vorschauanimation!


Hallo zusammen,


ich habe die Tage an einem animierten PowerFlow gebastelt. Optisch liebäugelt er mit der Powerflow Card Plus von HA.
Zusammengesetzt ist er aus einem modifizierten dummy. Dieser beherbergt die SVG-Grafik im stateFormat sowie alle Werte.
Ein Javascript liest die Werte aus und setzt sie im SVG.

Das alles ist nötig, um die Animationen in Fhem nicht zu unterbrechen. Zumindest, soweit mein Horizont bis jetzt reicht.
Vielleicht, wahrscheinlich gibt es einen eleganteren Weg.

Mit dem Baukasten können noch nicht alle, aber doch schon viele Situationen abgebildet
werden. Bzw. bis jetzt ist es mehr auf meine Bedürfnisse angepasst.

Anwendung
- Echte und fiktive Werte werden im powerGrid dummyNew gesetzt.
- Die animierten Linien folgen der Regel größer oder kleiner als 0.
- Der Batteriering ist die Ausnahme mit stop,gridLoad,gridUnload,solarLoad und houseUnload.
- Der Hausring zeigt prozentual die Leistung von Battery,Grid und Solar an.
- Zum setzen eines Wertes in dem jeweiligen Ring, muss eine Zahl angegeben werden. Zum Beispiel "300". Das Script ergänzt das "W".
- Um einen von den Customringen auszublenden, einfach den ReadingNamen auf n/a setzen.
- Von außen könnt ihr mit einem notify, DOIF oder dem Mittel eurer Wahl die Werte setzen.
- Um Low-Carbon, bzw jetzt FossilFree zu nutzen, bietet sich https://electricitymaps.com/ an. Siehe Punkt 6.

Um das SVG an euren Geschmack anzupassen, empfehle ich diesen SVG-Editor --> https://www.svgviewer.dev/

1. 98_dummyNew.pm Danke @Wzut, für den Hinweis, das nur eine 1 zu einer 0 geändert werden muss.
Als erstes wird ein neuer Dummy erstellt. Dazu von 98_dummy.pm den Code in 98_dummyNew.pm packen. Dann muss alles
im dummy auf dummyNew geändert.

Zum Abschluss diesen Code:

      readingsSingleUpdate($hash, $v, join(" ",@a), 1);

zu diesen ändern:

      readingsSingleUpdate($hash, $v, join(" ",@a), 0);


Dadurch kann jetzt das Aktualisieren des STATE unterdrückt werden.
Bedeutet, damit ist alles in einem dummy. Zum Abschluss den neuen dummy in das Verzeichnis zurück kopieren und Rechte nicht vergessen.

2. Das Javasript -> svg_update.js[Das liest die Werte aus powerGrid und setzt die Werte im SVG]
Das Javascript ist unten im Anhang. Es muss nach /opt/fhem/www/codemirror kopiert werden.
Rechte/Eigentümer : fhem/Gruppe:dialout

3. FHEMWEB (Javascript zuweisen + verbose 1)

Bei jedem FHEMWEB-Device muss der Pfad zum Javascript angegeben werden. Verbose auf 1. Bei 4 wird der Log vollgemüllt.

attr WEB JavaScripts codemirror/svg_update.js
attr WEB verbose 1

Damit das Script und der neue dummyNew korrekt eingebunden werden, müsst ihr Fhem mit "shutdown restart" neu starten.
Ist alles eingebunden und ändert ihr im Javascript etwas, müsst ihr nur euren Browsercache mit STRG + F5 leeren.

4. dummyNew[Hauptdevice zum anzeigen der Werte und Animationen]

Der Html_Svg-Code ist jetzt im Anhang in der Datei powerFlow_dummyNew.txt, da der Editor
vom Forum diesen nicht mehr akzeptiert.

5. Mein DOIF

defmod Powergrid_DOIF DOIF ## Grid + House\
([MQTT2_Smartmeter_2E1F50:"APOX_Power"])\
        ( set powerGrid grid_v {(ReadingsNum("MQTT2_Smartmeter_2E1F50","APOX_Power",0))} )\
        ( set powerGrid grid_in_v {(ReadingsNum("MQTT2_Smartmeter_2E1F50","APOX_E_in",0))} )\
        ( set powerGrid grid_out_v {(ReadingsNum("MQTT2_Smartmeter_2E1F50","APOX_E_out",0))} )\
        ( set powerGrid house_v {(ReadingsVal("MQTT2_Smartmeter_2E1F50","APOX_Power",0) + ReadingsVal("MQTT2_OpenDTU_585584","power",0))} )\
        ( set powerGrid lowcarbon_v {(ReadingsNum("electricitymap","fossilFreePercentage",0))} )\
\
## Airdryer\
DOELSEIF  ([Luftentfeuchter:"ENERGY_Power"])\
        ( set powerGrid cCircle1Power_v {(ReadingsNum("Luftentfeuchter","ENERGY_Power",0))} )\
\
## Dishwasher\
DOELSEIF  ([MQTT2_zigbee_Geschirrspueler:"power"])\
        ( set powerGrid cCircle4Power_v {(ReadingsNum("MQTT2_zigbee_Geschirrspueler","power",0))} )\
\
## Dryer\
DOELSEIF  ([MQTT2_zigbee_Trockner:"power"])\
        ( set powerGrid cCircle3Power_v {(ReadingsNum("MQTT2_zigbee_Trockner","power",0))} )\
\
## Fridge\
DOELSEIF  ([MQTT2_zigbee_Kuehlschrank:"^power:.*$"])\
        ( set powerGrid cCircle5Power_v {(ReadingsNum("MQTT2_zigbee_Kuehlschrank","power",0))} )\
\
## Solar\
DOELSEIF  ([MQTT2_OpenDTU_585584:"power"] )\
        ( set powerGrid solar_v {(ReadingsNum("MQTT2_OpenDTU_585584","power",0))} )\
\
## Washer\
DOELSEIF  ([MQTT2_zigbee_Waschmaschine:"power"])\
        ( set powerGrid cCircle2Power_v {(ReadingsNum("MQTT2_zigbee_Waschmaschine","power",0))} )\

6. Electricmap - Erzeugt das Reading für FossilFree

Laut Webseite wird ein Apikey benötigt. Es funktioniert aber auch ohne.
defmod electricitymap HTTPMOD none 60
attr electricitymap extractAllJSON 1
attr electricitymap get1Name carbon-intensity
attr electricitymap get1Poll 1
attr electricitymap get1URL https://api.electricitymap.org/v3/carbon-intensity/latest?lat=52.369800&lon=9.758686
attr electricitymap get2Name power-breakdown
attr electricitymap get2Poll 1
attr electricitymap get2URL https://api.electricitymap.org/v3/power-breakdown/latest?lat=52.369800&lon=9.758686
attr electricitymap room 14.PV

setstate electricitymap 2024-11-10 15:26:30 carbonIntensity 591
setstate electricitymap 2024-11-10 15:26:30 createdAt 2024-11-07T14:44:43.594Z
setstate electricitymap 2024-11-10 15:26:30 datetime 2024-11-10T14:00:00.000Z
setstate electricitymap 2024-11-10 15:26:30 emissionFactorType lifecycle
setstate electricitymap 2024-11-10 15:26:30 estimationMethod FORECASTS_HIERARCHY
setstate electricitymap 2024-11-10 15:26:30 fossilFreePercentage 37
setstate electricitymap 2024-11-10 15:26:30 isEstimated 1
setstate electricitymap 2024-11-10 15:26:30 powerConsumptionBreakdown_battery_discharge 0
setstate electricitymap 2024-11-10 15:26:30 powerConsumptionBreakdown_biomass 5809
setstate electricitymap 2024-11-10 15:26:30 powerConsumptionBreakdown_coal 18609
setstate electricitymap 2024-11-10 15:26:30 powerConsumptionBreakdown_gas 10921
setstate electricitymap 2024-11-10 15:26:30 powerConsumptionBreakdown_geothermal 34
setstate electricitymap 2024-11-10 15:26:30 powerConsumptionBreakdown_hydro 3370
setstate electricitymap 2024-11-10 15:26:30 powerConsumptionBreakdown_hydro_discharge 2000
setstate electricitymap 2024-11-10 15:26:30 powerConsumptionBreakdown_nuclear 526
setstate electricitymap 2024-11-10 15:26:30 powerConsumptionBreakdown_oil 346
setstate electricitymap 2024-11-10 15:26:30 powerConsumptionBreakdown_solar 3409
setstate electricitymap 2024-11-10 15:26:30 powerConsumptionBreakdown_unknown 358
setstate electricitymap 2024-11-10 15:26:30 powerConsumptionBreakdown_wind 2578
setstate electricitymap 2024-11-10 15:26:30 powerConsumptionTotal 47962
setstate electricitymap 2024-11-10 15:26:30 powerExportBreakdown_AT 0
setstate electricitymap 2024-11-10 15:26:30 powerExportBreakdown_BE 0
setstate electricitymap 2024-11-10 15:26:30 powerExportBreakdown_CH 0
setstate electricitymap 2024-11-10 14:59:30 powerExportBreakdown_CZ 0
setstate electricitymap 2024-11-10 15:26:30 powerExportBreakdown_DK-DK1 0
setstate electricitymap 2024-11-10 15:26:30 powerExportBreakdown_DK-DK2 0
setstate electricitymap 2024-11-10 15:26:30 powerExportBreakdown_LU 332
setstate electricitymap 2024-11-10 15:26:30 powerExportBreakdown_NL 0
setstate electricitymap 2024-11-10 15:26:30 powerExportBreakdown_NO-NO2 0
setstate electricitymap 2024-11-10 14:59:30 powerExportBreakdown_PL 0
setstate electricitymap 2024-11-10 15:26:30 powerExportTotal 332
setstate electricitymap 2024-11-10 15:26:30 powerImportBreakdown_AT 698
setstate electricitymap 2024-11-10 15:26:30 powerImportBreakdown_BE 931
setstate electricitymap 2024-11-10 15:26:30 powerImportBreakdown_CH 1629
setstate electricitymap 2024-11-10 14:59:30 powerImportBreakdown_CZ 47
setstate electricitymap 2024-11-10 15:26:30 powerImportBreakdown_DK-DK1 2355
setstate electricitymap 2024-11-10 15:26:30 powerImportBreakdown_DK-DK2 77
setstate electricitymap 2024-11-10 15:26:30 powerImportBreakdown_LU 0
setstate electricitymap 2024-11-10 15:26:30 powerImportBreakdown_NL 976
setstate electricitymap 2024-11-10 15:26:30 powerImportBreakdown_NO-NO2 1449
setstate electricitymap 2024-11-10 14:59:30 powerImportBreakdown_PL 472
setstate electricitymap 2024-11-10 15:26:30 powerImportTotal 8115
setstate electricitymap 2024-11-10 15:26:30 powerProductionBreakdown_battery_discharge
setstate electricitymap 2024-11-10 15:26:30 powerProductionBreakdown_biomass 4988
setstate electricitymap 2024-11-10 15:26:30 powerProductionBreakdown_coal 17147
setstate electricitymap 2024-11-10 15:26:30 powerProductionBreakdown_gas 9441
setstate electricitymap 2024-11-10 15:26:30 powerProductionBreakdown_geothermal 21
setstate electricitymap 2024-11-10 15:26:30 powerProductionBreakdown_hydro 1310
setstate electricitymap 2024-11-10 15:26:30 powerProductionBreakdown_hydro_discharge 1714
setstate electricitymap 2024-11-10 15:26:30 powerProductionBreakdown_nuclear
setstate electricitymap 2024-11-10 15:26:30 powerProductionBreakdown_oil 309
setstate electricitymap 2024-11-10 15:26:30 powerProductionBreakdown_solar 2996
setstate electricitymap 2024-11-10 15:26:30 powerProductionBreakdown_unknown 260
setstate electricitymap 2024-11-10 15:26:30 powerProductionBreakdown_wind 1994
setstate electricitymap 2024-11-10 15:26:30 powerProductionTotal 40179
setstate electricitymap 2024-11-10 15:26:30 renewablePercentage 36
setstate electricitymap 2024-11-10 15:26:30 updatedAt 2024-11-10T13:42:54.015Z
setstate electricitymap 2024-11-10 15:26:30 zone DE



Gruß schwatter

Gisbert

Hallo schwatter,

das sieht sehr interessant aus. Ich versuche es bei mir zum Laufen zu bringen. Ich benötige aber nur Grid, Solar, House und Battery - kann ich alles aus der readingsList weglassen, was ich nicht benötige?
Wie bringe ich meine Readings für Grid, Solar, House und Battery in deine Definition am geschicktesten hinein?

Viele Grüße Gisbert
Aktuelles FHEM | PROXMOX | Fujitsu Futro S740 | Debian 12 | UniFi | Homematic, VCCU, HMUART | ESP8266 | ATtiny85 | Wasser-, Stromzähler | tuya local | Wlan-Kamera | SIGNALduino, Flamingo Rauchmelder FA21/22RF | RHASSPY | DEYE | JK-BMS | ESPHome

schwatter

Um zum Beispiel einen Wert mit einem notify im myDummy1 zu setzen

defmod MQTT2_Smartmeter_2E1F50_notify_4 notify MQTT2_Smartmeter_2E1F50:StatusSNS_APOX_Power:.* {fhem"setreading myDummy1 grid $EVTPART1"}

setstate MQTT2_Smartmeter_2E1F50_notify_4 2024-10-20 22:38:34
setstate MQTT2_Smartmeter_2E1F50_notify_4 2024-10-20 11:04:22 state active
setstate MQTT2_Smartmeter_2E1F50_notify_4 2024-10-20 22:38:34 triggeredByDev MQTT2_Smartmeter_2E1F50
setstate MQTT2_Smartmeter_2E1F50_notify_4 2024-10-20 22:38:34 triggeredByEvent StatusSNS_APOX_Power: 229

Für die Linien muss dann ein kleiner (<) oder größer (>) als Vergleich gemacht werden. Als Beispiel hier ein Auszug aus meinem anderen DOIF. Bis jetzt habe ich den dummy hier selber noch nicht in Betrieb. Nur fiktive Werte. Werde die Tage umstellen.
Die Werte hier aus dem DOIF nicht übernehmen. Da ja nur 0 und 1 gesetzt werden muss.

## Animierter Punkt von Haus zu Kühlschrank (an|aus)
   (IF ([MQTT2_zigbee_Kuehlschrank:power] > 0)
({CommandSetReading(undef,'svgDOIF style_fridge ')}  ) )
   (IF ([MQTT2_zigbee_Kuehlschrank:power] == 0)
(setreading svgDOIF style_fridge style="display: none;;") )

## Animierter Punkt von Haus zu Trockner (an|aus)
   (IF ([MQTT2_zigbee_Trockner:power] > 0)
({CommandSetReading(undef,'svgDOIF style_dryer ')}) )
   (IF ([MQTT2_zigbee_Trockner:power] == 0)
(setreading svgDOIF style_dryer style="display: none;;") )

## Animierter Punkt von Haus zu Luftentfeuchter (an|aus)
   (IF ([Luftentfeuchter:ENERGY_Power] > 0)
({CommandSetReading(undef,'svgDOIF style_airdryer ')}))
   (IF ([Luftentfeuchter:ENERGY_Power] == 0)
(setreading svgDOIF style_airdryer style="display: none;;") )

## Animierter Punkt von Haus zu Geschürrspüler (an|aus)
   (IF ([MQTT2_zigbee_Geschirrspueler:power] > 0)
({CommandSetReading(undef,'svgDOIF style_dishwascher ')})  )
   (IF ([MQTT2_zigbee_Geschirrspueler:power] == 0)
(setreading svgDOIF style_dishwasher style="display: none;;") )

## Animierter Punkt von Haus zu Waschmaschine (an|aus)
   (IF ([MQTT2_zigbee_Waschmaschine:power] > 0)
(setreading svgDOIF style_washer '') )
   (IF ([MQTT2_zigbee_Waschmaschine:power] == 0)
(setreading svgDOIF style_washer style="display: none;;") )

## Animierter Punkt von Solar zu Haus (an|aus)
   (IF ([MQTT2_OpenDTU_585584:power] > 0)
({CommandSetReading(undef,'svgDOIF style_solarToHouse ')}) )
   (IF ([MQTT2_OpenDTU_585584:power] == 0)
(setreading svgDOIF style_solarToHouse style="display: none;;") )

## Animierter Punkt von  Netz zu Haus (an|aus)
   (IF ([MQTT2_Smartmeter_2E1F50:APOX_Power] > 0 )
({CommandSetReading(undef,'svgDOIF style_gridToHouse ')}))
   (IF  ([MQTT2_Smartmeter_2E1F50:APOX_Power] <= 0 )
(setreading svgDOIF style_gridToHouse style="display: none;;") )

## Animierter Punkt von Solar zu Netz (an|aus)
   (IF ([MQTT2_Smartmeter_2E1F50:APOX_Power] < 0)
({CommandSetReading(undef,'svgDOIF style_solarToGrid ')}) )
   (IF ([MQTT2_Smartmeter_2E1F50:APOX_Power] > 0)
(setreading svgDOIF style_solarToGrid style="display: none;;") )

Und wegen dem anpassen, bzw verkleinern auf 4 Ringe. Einfach alles aus dem SVG und dem Javascript schmeißen,
was du nicht benötigst. Wenn du etwas gelöscht hast, was falsch war, dann siehst du es schon. Dann kommen keine Werte.

Gruß schwatter


schwatter

Bei 1.myDummy habe ich nochmal Einrückung und Groß/Kleinschreibung angepasst.

Gruß schwatter

schwatter

Update im ersten Post.

- der Ring vom Haus wird aus 3 Farben zusammengesetzt. Die verantwortlichen Readings sind Grid, Solar und Battery.
- Battery hat jetzt erstmal die Angabe Watt. Diese muss ich noch um eine 2te Wattangabe ergänzen.


Gruß schwatter

schwatter

Update im ersten Post

Alle 3 Dateien müssen ersetzt werden.

- Diverse Linien überarbeitet
- Animierten Batteriering eingefügt (batteryState). Dieser dreht vorwärts, rückwärts + stop. Idee, vorwärts laden und rückwärts entladen. Farben alle türkis. Könnt ihr euch selber einfärben im SVG. (laden grün, entladen rot?)
- Dadurch kann die Linie gridToBattery jetzt vorwärts, rückwärts + stop. Habe ich aber nicht gekoppelt. Sollte beim ansteuern beachtet werden.
- Hat der "batteryState" den Status "backward" und "stop" wird "battery" automatisch vom Housering abgezogen.
- Fix beim Housering. Vorher waren negative Zahlen nicht abgefangen. Das hat die prozentuale Aufteilung durcheinander gewürfelt.
- Setup in myDummy1 der Widgets geändert. Viel select für Linien mit on|off, ..., ... .


Gruß schwatter

schwatter

#6
Oh, das Wichtigste vergessen.
Damit überhaupt etwas funktioniert, muss im jeweiligen FHEMWEB Device noch der Javascriptpfad angegeben werden.

attr WEB JavaScripts pgm2/svg_update.js
Ich füge das oben unter Punkt 4 ein.


Gruß schwatter

carlos

Sieht gut aus, so etwas wollte ich schon lange.
Fragen:
1. Bei der Batterie würde ich gerne 2 Werte sehen: Füllstand in % und Ladung/Entladung.
2. Bei Grid evtl gleich 3 Werte:
   Momentaner Grid Export/import mit + oder -
   Heutiger Export
   Heutiger Import
3. Die Punkt Animation muss ich die von Hand setzen?
   Könnte man die auf Grund der Werte nicht berechnen?
4. Die Devices myDummy und myDummy1 könnte man doch auch zusammenfassen oder geht das nicht wegen dem .js?

Alles keine Kritik, nur Anregung zum weiteren optimieren.
Wie gesagt, ansonsten gefällt mir das sehr gut.

Gruß

Hubert
 
FHEM svn auf Intel NUC mit proxmox, 3 Raspberry Pi, signalduino, nanoCUL,  toom Baumarkt Funksteckdosen, einige sonoffs, hue, shelly

schwatter

#8
Nabend,
das freut mich.

Zu 1. Füge ich hinzu.

Zu.2 Muss ich mal schauen wie ich das einfüge. Der Platz ist etwas begrenzt. Die Ringgröße hätte ich gerne beibehalten. Vielleicht die Namen wie bei HA außerhalb vom Kreis.

Zu 3. Momentan ja. Mal sehen ob ich das noch ändere bzw. ich bin kein Dev. Ich lese sehr viel :) Daher kann es klappen oder auch nicht.

Zu 4. Jein. Das Problem ist, das ich verhindern muss, das irgendetwas dazu führt, das das Device refreshed wird.
Du kannst einfach das SVG in den myDummy1 in das stateFormat kopieren. Sobald in myDummy1 ein Reading aktualisiert wird,
wird das SVG kurz unterbrochen.

Nimmt man z.B setreading dann passiert es auch:
Der Befehl setzt das Reading <reading> auf den Wert <value> ohne Signale an das betroffene Gerät zu senden, generiert aber Ereignisse und die übliche eventMap und stateFormat Umwandlung wird auch durchgeführt.

Vielleicht hast du eine simple Lösung, die mir gerade nicht einfällt. An Fhem mach ich nur noch etwas, wenn ich was neues brauche. Das kommt selten vor, daher vergesse ich auch vieles wieder mit der Zeit.

Ich habe auch schon an ein Modul gedacht. War da auch schon am Gange. Aber mir fehlt als Laie noch die Idee, wie ich das
ohne trigger am Besten umsetzen kann.
Und ein Modul ist gut und schön, würde im Moment aber auch meinen Rahmen sprengen. Aber ganz weg ist der Gedanke noch nicht.
Ich hatte zum Beispiel schon ein Modul etwas zusammengeschustert. Das hat mir aus den einzelnen Ringen die per attr gesetzt waren, das fertige SVG gebaut.
So könnten Ringe dynamisch hinzugefügt oder deaktiviert werden.
Die internen Funktionen von Fhem gucke ich mir jetzt auch nach und nach an. Um zum Beispiel mal im Modul das Device anzugeben
und auf das das Reading triggert.

Aber die wichtigste Frage an dich oder jemand anderen. Funktioniert der Kram überhaupt so, wie ich ihn oben hochgeladen und
dokumentiert habe?


Gruß schwatter

carlos

Hallo Schwatter,
Danke für die Erläuterungen.
Meine Idee wäre das alles in ein doif (mit den entsprechenden DI Readings) zu packen z.b. so:
defmod myDummy1 DOIF ([myFronius:"^power:.*$"])\
    ( setreading $SELF solar {(ReadingsNum("myFronius","power",0))} )\
    ( setreading $SELF Zyklus solar  ) \
DOELSEIF  ( [mySenec:"^speicherleistung:.*$"] or [mySenec:"^netzleistung:.*$"] or [mySenec:"^stromverbrauch:.*$"] ) \
    ( setreading $SELF battery {(ReadingsNum("mySenec","speicherleistung",0))} ) \
    ( setreading $SELF grid {(ReadingsNum("mySenec","netzleistung",0))} ) \
    ( setreading $SELF house {(ReadingsNum("mySenec","stromverbrauch",0))} )\
( setreading $SELF Zyklus battery/grid/house )\
DOELSEIF  ( [Waschmaschine:"^ENERGY_Power:.*$"] or [Trockner:"^ENERGY_Power:.*$"] or [Spuelmaschine:"^ENERGY_Power:.*$"] ) \
    ( setreading $SELF washer {(ReadingsNum("Waschmaschine","ENERGY_Power",0))} ) \
    ( setreading $SELF dryer {(ReadingsNum("Trockner","ENERGY_Power",0))} ) \
    ( setreading $SELF dishwasher {(ReadingsNum("Spuelmaschine","ENERGY_Power",0))} )\
( setreading $SELF fridge {(fridge("Spuelmaschine","ENERGY_Power","N/A"))} )\
    ( setreading $SELF airdryer {(ReadingsNum("airdryer","ENERGY_Power","N/A"))} )\
( setreading $SELF Zyklus washer/dryer/dishwasher/fridge/airdryer )\
DOELSE\
( setreading $SELF Zyklus nothing  )
attr myDummy1 DOIF_Readings current_total:[myTibber:current_total],\
current_level:[myTibber:current_level],\
speicherfuellstand:[mySenec:speicherfuellstand],\
grid:[mySenec:netzleistung],\
solar:[mySenec:stromerzeugung_total],\
battery:[mySenec:speicherleistung],\
house:[mySenec:stromverbrauch],\
\
dishwasher:[Spuelmaschine:ENERGY_Power],\
washer:[Waschmaschine:ENERGY_Power],\
dryer:[Trockner:ENERGY_Power]\
\

attr myDummy1 room Energy
attr myDummy1 stateFormat <svg width='650' height='500' xmlns='http://www.w3.org/2000/svg' style='background-color: black;; width: auto;; height: auto;;'>\
 \
 <!-- Titel -->\
  <text x='20' y='30' font-family='Arial' font-size='24' fill='white'>Power Flow</text>\
\
  <!-- Kohlenstoffarm (Grün) -->\
  <circle id='lowCarbonCircle' cx='100' cy='100' r='45' fill='none' stroke='green' stroke-width='10' opacity='0.4'/>\
  <circle cx='100' cy='100' r='40' fill='none' stroke='green' stroke-width='5'/>\
  <text x='100' y='100' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Low-Carbon</text>\
  <text id='lowCarbonPower' x='100' y='115' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>0 %</text>\
\
  <!-- Solar (Orange) -->\
  <circle id='solarCircle' cx='250' cy='100' r='45' fill='none' stroke='orange' stroke-width='10' opacity='0.4'/>\
  <circle cx='250' cy='100' r='40' fill='none' stroke='orange' stroke-width='5'/>\
  <text x='250' y='100' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Solar</text>\
  <text id='solarPower' x='250' y='115' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Netz (Blau) -->\
  <circle id='gridCircle' cx='100' cy='250' r='45' fill='none' stroke='blue' stroke-width='10' opacity='0.4'/>\
  <circle cx='100' cy='250' r='40' fill='none' stroke='blue' stroke-width='5'/>\
  <text x='100' y='250' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Grid</text>\
  <text id='gridPower' x='100' y='265' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Batterie Label -->\
  <text x="250" y="400" font-family="Arial" font-size="12" fill="white" text-anchor="middle" alignment-baseline="middle">Battery</text>\
  <text id="batteryPower" x="250" y="415" font-family="Arial" font-size="12" fill="white" text-anchor="middle" alignment-baseline="middle"></text>\
\
  <!-- Batterie stop (Turkis) -->\
  <circle id='batteryCircle' cx='250' cy='400' r='45' fill='none' stroke='turquoise' stroke-width='10' opacity='0.4'/>\
  <circle id="batteryStatic" cx="250" cy="400" r="40" fill="none" stroke="turquoise" stroke-width="5"/>\
\
  <!-- Batterie dreht links -->\
  <circle id="batteryClockwise" cx="250" cy="400" r="40" fill="none" stroke="turquoise" stroke-width="5" stroke-dasharray="9 5" stroke-dashoffset="3" style="display:none;;">\
    <animateTransform attributeName="transform" type="rotate" from="0 250 400" to="360 250 400" dur="5s" repeatCount="indefinite" />\
  </circle>\
\
  <!-- Batteriering dreht rechts -->\
  <circle id="batteryCounterClockwise" cx="250" cy="400" r="40" fill="none" stroke="turquoise" stroke-width="5" stroke-dasharray="9 5" stroke-dashoffset="3" style="display:none;;">\
    <animateTransform attributeName="transform" type="rotate" from="0 250 400" to="-360 250 400" dur="5s" repeatCount="indefinite" />\
  </circle>\
\
  <!-- Haus + Ringsegmente -->\
  <circle id='houseCircle' cx='400' cy='250' r='45' fill='none' stroke='purple' stroke-width='10' opacity='0.4'/>\
  <circle id='solarSegment' cx='400' cy='250' r='40' fill='none' stroke='orange' stroke-width='5' stroke-dasharray='0 100' />\
  <circle id='gridSegment' cx='400' cy='250' r='40' fill='none' stroke='blue' stroke-width='5' stroke-dasharray='0 100' />\
  <circle id='batterySegment' cx='400' cy='250' r='40' fill='none' stroke='purple' stroke-width='5' stroke-dasharray='0 100' />\
  <text x='400' y='250' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>House</text>\
  <text id='housePower' x='400' y='265' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Lufttrockner (Blau) -->\
  <circle id='airDryerCircle' cx='400' cy='100' r='45' fill='none' stroke='blue' stroke-width='10' opacity='0.4'/>\
  <circle cx='400' cy='100' r='40' fill='none' stroke='blue' stroke-width='5'/>\
  <text x='400' y='100' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Airdryer</text>\
  <text id='airdryerPower' x='400' y='115' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Kühlschrank (Gelb) -->\
  <circle id='fridgeCircle' cx='400' cy='400' r='45' fill='none' stroke='yellow' stroke-width='10' opacity='0.4'/>\
  <circle cx='400' cy='400' r='40' fill='none' stroke='yellow' stroke-width='5'/>\
  <text x='400' y='400' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Fridge</text>\
  <text id='fridgePower' x='400' y='415' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Waschmaschine (Gelb) -->\
  <circle id='washerCircle' cx='550' cy='100' r='45' fill='none' stroke='yellow' stroke-width='10' opacity='0.4'/>\
  <circle cx='550' cy='100' r='40' fill='none' stroke='yellow' stroke-width='5'/>\
  <text x='550' y='100' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Washer</text>\
  <text id='washerPower' x='550' y='115' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Trockner (Grün) -->\
  <circle id='dryerCircle' cx='550' cy='250' r='45' fill='none' stroke='green' stroke-width='10' opacity='0.4'/>\
  <circle cx='550' cy='250' r='40' fill='none' stroke='green' stroke-width='5'/>\
  <text x='550' y='250' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Dryer</text>\
  <text id='dryerPower' x='550' y='265' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Geschirrspüler (Blau) -->\
  <circle id='dishwasherCircle' cx='550' cy='400' r='45' fill='none' stroke='blue' stroke-width='10' opacity='0.4'/>\
  <circle cx='550' cy='400' r='40' fill='none' stroke='blue' stroke-width='5'/>\
  <text x='550' y='400' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Dishwasher</text>\
  <text id='dishwasherPower' x='550' y='415' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Verbindungslinien -->\
\
  <!-- Verbindungslinie von Batterie zu Haus (Lila) --> \
  <path id='batteryToHousePath' d='M 260 354 A 110 100 0 0 1 357 260' stroke='purple' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='purple'>\
    <animateMotion id='batteryToHouse' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#batteryToHousePath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Solar zu Haus (Orange) -->\
  <path id='solarToHousePath' d='M 260 145 A 110 100 0 0 0 357 240' stroke='orange' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='orange'>\
    <animateMotion id='solarToHouse' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#solarToHousePath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Solar zu Batterie (Orange) -->\
  <path id='solarToBatteryPath' d='M 250 145 A 0 100 0 0 1 250 354' stroke='orange' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='orange'>\
    <animateMotion id='solarToBattery' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#solarToBatteryPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Haus zu Lufttrockner (Blau) -->\
  <path id='houseToAirdryerPath' d='M 400 203 A 0 67 0 0 1 400 145' stroke='blue' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='blue'>\
    <animateMotion id='houseToAirdryer' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#houseToAirdryerPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Haus zu Kühlschrank (Gelb) -->\
  <path id='houseToFridgePath' d='M 400 298 A 0 67 0 0 1 400 354' stroke='yellow' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='yellow'>\
    <animateMotion id='houseToFridge' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#houseToFridgePath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Netz zu Kohlenstoffarm (Grün) -->\
  <path id='gridToLowCarbonPath' d='M 100 208 A 0 68 0 0 1 100 145' stroke='green' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='green'>\
    <animateMotion id='gridToLowCarbon' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#gridToLowCarbonPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Netz zu Haus (Blau) -->\
  <path id='gridToHousePath' d='M 146 250 H 357' stroke='blue' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='blue'>\
    <animateMotion id='gridToHouse' dur='3s' repeatCount='indefinite'>\
      <mpath href='#gridToHousePath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Haus zu Trockner (Green) -->\
  <path id='houseToDryerPath' d='M 446 250 A 0 0 0 0 1 505 250' stroke='green' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='green'>\
    <animateMotion id='houseToDryer' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#houseToDryerPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Haus zu Geschirrspüler (Blue) -->\
  <path id='houseToDishwasherPath' d='M 446 260 A 110 110 0 0 1 550 354' stroke='blue' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='blue'>\
    <animateMotion id='houseToDishwasher' dur='3s' repeatCount='indefinite'>\
      <mpath href='#houseToDishwasherPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Solar zu Netz (Orange) -->\
  <path id='solarToGridPath' d='M 240 145 A 110 100 0 0 1 146 240' stroke='orange' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='orange'>\
    <animateMotion id='solarToGrid' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#solarToGridPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Netz zu Batterie (Turkis) -->\
  <path id='gridToBatteryPath' d='M 146 260 A 110 100 0 0 1 240 354' stroke='turquoise' stroke-width='2' fill='transparent'/>\
  <circle id="gridToBatteryStatic" r='5' fill='turquoise' style="display:none;;" />\
  <circle id="gridToBatteryForward" r='5' fill='turquoise' style="display:none;;">\
    <animateMotion id='gridToBatteryForwardAnim' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#gridToBatteryPath'/>\
    </animateMotion>\
  </circle>\
  <circle id="gridToBatteryBackward" r='5' fill='turquoise' style="display:none;;">\
    <animateMotion id='gridToBatteryBackwardAnim' dur='3s' repeatCount='indefinite' keyPoints='1;;0' keyTimes='0;;1'>\
      <mpath href='#gridToBatteryPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Haus zu Waschmaschine (Gelb) -->\
  <path id='houseToWasherPath' d='M 550 145 A 110 100 0 0 1 446 240' stroke='yellow' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='yellow'>\
    <animateMotion id='houseToWasher' dur='3s' repeatCount='indefinite' keyPoints='1;;0' keyTimes='0;;1'>\
      <mpath href='#houseToWasherPath'/>\
    </animateMotion>\
  </circle>\
\
</svg>\


setstate myDummy1 <svg width='650' height='500' xmlns='http://www.w3.org/2000/svg' style='background-color: black;; width: auto;; height: auto;;'>\
 \
 <!-- Titel -->\
  <text x='20' y='30' font-family='Arial' font-size='24' fill='white'>Power Flow</text>\
\
  <!-- Kohlenstoffarm (Grün) -->\
  <circle id='lowCarbonCircle' cx='100' cy='100' r='45' fill='none' stroke='green' stroke-width='10' opacity='0.4'/>\
  <circle cx='100' cy='100' r='40' fill='none' stroke='green' stroke-width='5'/>\
  <text x='100' y='100' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Low-Carbon</text>\
  <text id='lowCarbonPower' x='100' y='115' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>0 %</text>\
\
  <!-- Solar (Orange) -->\
  <circle id='solarCircle' cx='250' cy='100' r='45' fill='none' stroke='orange' stroke-width='10' opacity='0.4'/>\
  <circle cx='250' cy='100' r='40' fill='none' stroke='orange' stroke-width='5'/>\
  <text x='250' y='100' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Solar</text>\
  <text id='solarPower' x='250' y='115' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Netz (Blau) -->\
  <circle id='gridCircle' cx='100' cy='250' r='45' fill='none' stroke='blue' stroke-width='10' opacity='0.4'/>\
  <circle cx='100' cy='250' r='40' fill='none' stroke='blue' stroke-width='5'/>\
  <text x='100' y='250' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Grid</text>\
  <text id='gridPower' x='100' y='265' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Batterie Label -->\
  <text x="250" y="400" font-family="Arial" font-size="12" fill="white" text-anchor="middle" alignment-baseline="middle">Battery</text>\
  <text id="batteryPower" x="250" y="415" font-family="Arial" font-size="12" fill="white" text-anchor="middle" alignment-baseline="middle"></text>\
\
  <!-- Batterie stop (Turkis) -->\
  <circle id='batteryCircle' cx='250' cy='400' r='45' fill='none' stroke='turquoise' stroke-width='10' opacity='0.4'/>\
  <circle id="batteryStatic" cx="250" cy="400" r="40" fill="none" stroke="turquoise" stroke-width="5"/>\
\
  <!-- Batterie dreht links -->\
  <circle id="batteryClockwise" cx="250" cy="400" r="40" fill="none" stroke="turquoise" stroke-width="5" stroke-dasharray="9 5" stroke-dashoffset="3" style="display:none;;">\
    <animateTransform attributeName="transform" type="rotate" from="0 250 400" to="360 250 400" dur="5s" repeatCount="indefinite" />\
  </circle>\
\
  <!-- Batteriering dreht rechts -->\
  <circle id="batteryCounterClockwise" cx="250" cy="400" r="40" fill="none" stroke="turquoise" stroke-width="5" stroke-dasharray="9 5" stroke-dashoffset="3" style="display:none;;">\
    <animateTransform attributeName="transform" type="rotate" from="0 250 400" to="-360 250 400" dur="5s" repeatCount="indefinite" />\
  </circle>\
\
  <!-- Haus + Ringsegmente -->\
  <circle id='houseCircle' cx='400' cy='250' r='45' fill='none' stroke='purple' stroke-width='10' opacity='0.4'/>\
  <circle id='solarSegment' cx='400' cy='250' r='40' fill='none' stroke='orange' stroke-width='5' stroke-dasharray='0 100' />\
  <circle id='gridSegment' cx='400' cy='250' r='40' fill='none' stroke='blue' stroke-width='5' stroke-dasharray='0 100' />\
  <circle id='batterySegment' cx='400' cy='250' r='40' fill='none' stroke='purple' stroke-width='5' stroke-dasharray='0 100' />\
  <text x='400' y='250' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>House</text>\
  <text id='housePower' x='400' y='265' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Lufttrockner (Blau) -->\
  <circle id='airDryerCircle' cx='400' cy='100' r='45' fill='none' stroke='blue' stroke-width='10' opacity='0.4'/>\
  <circle cx='400' cy='100' r='40' fill='none' stroke='blue' stroke-width='5'/>\
  <text x='400' y='100' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Airdryer</text>\
  <text id='airdryerPower' x='400' y='115' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Kühlschrank (Gelb) -->\
  <circle id='fridgeCircle' cx='400' cy='400' r='45' fill='none' stroke='yellow' stroke-width='10' opacity='0.4'/>\
  <circle cx='400' cy='400' r='40' fill='none' stroke='yellow' stroke-width='5'/>\
  <text x='400' y='400' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Fridge</text>\
  <text id='fridgePower' x='400' y='415' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Waschmaschine (Gelb) -->\
  <circle id='washerCircle' cx='550' cy='100' r='45' fill='none' stroke='yellow' stroke-width='10' opacity='0.4'/>\
  <circle cx='550' cy='100' r='40' fill='none' stroke='yellow' stroke-width='5'/>\
  <text x='550' y='100' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Washer</text>\
  <text id='washerPower' x='550' y='115' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Trockner (Grün) -->\
  <circle id='dryerCircle' cx='550' cy='250' r='45' fill='none' stroke='green' stroke-width='10' opacity='0.4'/>\
  <circle cx='550' cy='250' r='40' fill='none' stroke='green' stroke-width='5'/>\
  <text x='550' y='250' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Dryer</text>\
  <text id='dryerPower' x='550' y='265' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Geschirrspüler (Blau) -->\
  <circle id='dishwasherCircle' cx='550' cy='400' r='45' fill='none' stroke='blue' stroke-width='10' opacity='0.4'/>\
  <circle cx='550' cy='400' r='40' fill='none' stroke='blue' stroke-width='5'/>\
  <text x='550' y='400' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Dishwasher</text>\
  <text id='dishwasherPower' x='550' y='415' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Verbindungslinien -->\
\
  <!-- Verbindungslinie von Batterie zu Haus (Lila) --> \
  <path id='batteryToHousePath' d='M 260 354 A 110 100 0 0 1 357 260' stroke='purple' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='purple'>\
    <animateMotion id='batteryToHouse' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#batteryToHousePath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Solar zu Haus (Orange) -->\
  <path id='solarToHousePath' d='M 260 145 A 110 100 0 0 0 357 240' stroke='orange' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='orange'>\
    <animateMotion id='solarToHouse' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#solarToHousePath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Solar zu Batterie (Orange) -->\
  <path id='solarToBatteryPath' d='M 250 145 A 0 100 0 0 1 250 354' stroke='orange' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='orange'>\
    <animateMotion id='solarToBattery' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#solarToBatteryPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Haus zu Lufttrockner (Blau) -->\
  <path id='houseToAirdryerPath' d='M 400 203 A 0 67 0 0 1 400 145' stroke='blue' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='blue'>\
    <animateMotion id='houseToAirdryer' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#houseToAirdryerPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Haus zu Kühlschrank (Gelb) -->\
  <path id='houseToFridgePath' d='M 400 298 A 0 67 0 0 1 400 354' stroke='yellow' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='yellow'>\
    <animateMotion id='houseToFridge' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#houseToFridgePath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Netz zu Kohlenstoffarm (Grün) -->\
  <path id='gridToLowCarbonPath' d='M 100 208 A 0 68 0 0 1 100 145' stroke='green' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='green'>\
    <animateMotion id='gridToLowCarbon' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#gridToLowCarbonPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Netz zu Haus (Blau) -->\
  <path id='gridToHousePath' d='M 146 250 H 357' stroke='blue' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='blue'>\
    <animateMotion id='gridToHouse' dur='3s' repeatCount='indefinite'>\
      <mpath href='#gridToHousePath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Haus zu Trockner (Green) -->\
  <path id='houseToDryerPath' d='M 446 250 A 0 0 0 0 1 505 250' stroke='green' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='green'>\
    <animateMotion id='houseToDryer' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#houseToDryerPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Haus zu Geschirrspüler (Blue) -->\
  <path id='houseToDishwasherPath' d='M 446 260 A 110 110 0 0 1 550 354' stroke='blue' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='blue'>\
    <animateMotion id='houseToDishwasher' dur='3s' repeatCount='indefinite'>\
      <mpath href='#houseToDishwasherPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Solar zu Netz (Orange) -->\
  <path id='solarToGridPath' d='M 240 145 A 110 100 0 0 1 146 240' stroke='orange' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='orange'>\
    <animateMotion id='solarToGrid' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#solarToGridPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Netz zu Batterie (Turkis) -->\
  <path id='gridToBatteryPath' d='M 146 260 A 110 100 0 0 1 240 354' stroke='turquoise' stroke-width='2' fill='transparent'/>\
  <circle id="gridToBatteryStatic" r='5' fill='turquoise' style="display:none;;" />\
  <circle id="gridToBatteryForward" r='5' fill='turquoise' style="display:none;;">\
    <animateMotion id='gridToBatteryForwardAnim' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#gridToBatteryPath'/>\
    </animateMotion>\
  </circle>\
  <circle id="gridToBatteryBackward" r='5' fill='turquoise' style="display:none;;">\
    <animateMotion id='gridToBatteryBackwardAnim' dur='3s' repeatCount='indefinite' keyPoints='1;;0' keyTimes='0;;1'>\
      <mpath href='#gridToBatteryPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Haus zu Waschmaschine (Gelb) -->\
  <path id='houseToWasherPath' d='M 550 145 A 110 100 0 0 1 446 240' stroke='yellow' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='yellow'>\
    <animateMotion id='houseToWasher' dur='3s' repeatCount='indefinite' keyPoints='1;;0' keyTimes='0;;1'>\
      <mpath href='#houseToWasherPath'/>\
    </animateMotion>\
  </circle>\
\
</svg>\

setstate myDummy1 2024-10-25 09:45:37 Device mySenec
setstate myDummy1 2024-10-25 09:45:37 Zyklus nothing
setstate myDummy1 2024-10-25 09:44:50 airdryer N/A
setstate myDummy1 2024-10-25 09:45:37 battery 91.76
setstate myDummy1 2024-10-25 09:45:37 cmd 4
setstate myDummy1 2024-10-25 09:45:37 cmd_event mySenec
setstate myDummy1 2024-10-25 09:45:37 cmd_nr 4
setstate myDummy1 2024-10-25 09:39:26 current_level NORMAL
setstate myDummy1 2024-10-25 09:39:26 current_total 0.3388
setstate myDummy1 2024-10-25 09:44:50 dishwasher 0
setstate myDummy1 2024-10-25 09:44:50 dryer 0
setstate myDummy1 2024-10-25 09:45:01 e_Trockner_events ENERGY_Current: 0.026,ENERGY_ReactivePower: 6,ENERGY_Factor: 0.02,ENERGY_Voltage: 235,ENERGY_ApparentPower: 6
setstate myDummy1 2024-10-25 09:45:26 e_myFronius_events Inverter_System_YEAR_ENERGY_Values_1: 8129062,Inverter_System_YEAR_ENERGY_Unit: Wh,Inverter_System_DAY_ENERGY_Values_1: 580,Inverter_System_DAY_ENERGY_Unit: Wh,Inverter_System_TOTAL_ENERGY_Unit: Wh,Inverter_System_TOTAL_ENERGY_Values_1: 33899300,Inverter_System_PAC_Values_1: 771,Inverter_System_PAC_Unit: W,Einspeisung: 43.07,Bezug: 0,Einspeisung_curr: 0,power: 0.771
setstate myDummy1 2024-10-25 09:45:37 e_mySenec_events ERROR: none,lastUpdate: 2024-10-25 09:45:37,connected
setstate myDummy1 2024-10-25 09:45:37 grid -32.78
setstate myDummy1 2024-10-25 09:45:37 house 650.46
setstate myDummy1 2024-10-25 09:44:52 mode enabled
setstate myDummy1 2024-10-25 09:45:36 solar 8128.13
setstate myDummy1 2024-10-25 09:38:37 speicherfuellstand 0.00
setstate myDummy1 2024-10-25 09:45:37 state cmd_4
setstate myDummy1 2024-10-25 09:44:50 washer 0

Über das javascript attribut in WEB könnte man dann parameter übergeben für die Animation.
JavaScripts
Leerzeichen getrennte Liste von JavaScript Dateien, die geladen werden. Die Dateinamen sind relativ zum www Verzeichnis anzugeben. Für jede Datei wird ein zusätzliches Attribut angelegt, damit der Benutzer dem Skript Parameter weiterreichen kann. Bei diesem Attributnamen werden Verzeichnisname und fhem_ Präfix entfernt und Param als Suffix hinzugefügt. Beispiel:
attr WEB JavaScripts codemirror/fhem_codemirror.js
attr WEB codemirrorParam { "theme":"blackboard", "lineNumbers":true }

Aber da kenne ich mich zuwenig mit JS FHEM aus.

Ich habe das jetzt mal ausprobiert, habe aber wie bei deiner jetzigen Lösung das gleiche Problem, da nach einiger Zeit keine Werte mehr angezeigt werden.
Keina Ahnung an was das liegt, die Werte sind alle durch das di gesetzt.

Gruß

Hubert
FHEM svn auf Intel NUC mit proxmox, 3 Raspberry Pi, signalduino, nanoCUL,  toom Baumarkt Funksteckdosen, einige sonoffs, hue, shelly

schwatter

Dein Ansatz mit DOIF hatte ich ja mehr oder weniger schon versucht, siehe DOIF- Bereich. Problem ist immer, der Refresh vom STATE.
Das mit dem JavaCode übergeben im WEB Device, mal sehen ob das uns weiter bringt.

Das die Werte mit der Zeit ausbleiben, hatte ich bis jetzt noch nie. Entweder sie sind da, dann findet das Javascript
alle Readings. Fehlt eins, kommt kommentarlos einfach nichts. Da im Javascript bis jetzt keine Prüfung drinne ist.
Muss ich ergenzen.

Also nochmal ganz dumm gefragt, wenn du es alles so wie im ersten Post anlegst, dann bleiben auch dann irgendwann die Werte aus?
Wie schaut es bei deinem WEB-Device aus. Da habe ich, aber unbewusst von anderen Sachen, z.B das gesetzt:

attr WEB longpoll 1
attr WEB longpollSVG 1
attr WEB plotEmbed 2
attr WEB plotfork 1

Vielleicht liegt es an longpollSVG?

Gruß schwatter

carlos

Ja, die Werte waren gestern da und heute bleiben sie aus.
Ich kann einstellen was ich will.
Im DI myDummy1 sind die Werte da und werden aktualisiert.

Ich hatte bei longpoll auf websocket gestellt.
Ich denke aber, dass es eher am csrfToken attribute liegt.
Habe ich aber auch auch schon none, random ausprobiert.

Gruß

Hubert
FHEM svn auf Intel NUC mit proxmox, 3 Raspberry Pi, signalduino, nanoCUL,  toom Baumarkt Funksteckdosen, einige sonoffs, hue, shelly

schwatter

#12
Ok, hast du beide bzw alle Devices in einem Raum?
Dann wird das SVG nur bei dem ersten oberen Device aktualisiert.
Das 2te darunter bekommt dann keine Werte. Da die Readings die gleichen sind.

edit:
bzw ich meine gleiche ID's im SVG. Zum Beispiel  id='solarPower'.
Dann verschluckt sich das. Da müsste bei mehreren SVG eine eindeutige Zuordung pro SVG stattfinden.


Gruß schwatter

schwatter

Mahlzeit,


ich habe jetzt erst bemerkt, das ich nicht auf eindeutige, bzw abweichende Readings geachtet habe.
Das fiel mir jetzt bei der Suche, 98_dummy.pm so zu modifizieren, das er STATE nicht updatet, auf die Füße.

Bedeutet, der dummy darf kein Reading haben, welches als gridToHouse benannt ist, da das SVG <animateMotion id='gridToHouse'
auch verwendet. Das führt zwangsläufig zu Konflikten, da Fhem sich das Reading automatisch mit in den STATE zieht.
Bei den 2 dummys hat das irgendwie funktioniert. Das werde ich im .ersten Post nochmal umstellen.

Jetzt habe ich mir zum testen von 98_dummy.pm den Code in 98_dummyNew.pm gepackt. Dann alles im dummy auf dummyNew geändert.
Und diesen Teil:

  my @rl = split(" ", AttrVal($name, "readingList", ""));
  my $doRet;
  eval {
    if(@rl && grep /^$a[0]$/, @rl) {
      my $v = shift @a;
      readingsSingleUpdate($hash, $v, join(" ",@a), 1);
      $doRet = 1;
    }
  };
  return if($doRet);


zu diesen geändert:

  my @rl = split(" ", AttrVal($name, "readingList", ""));
  my $doRet;
  eval {
    if(@rl && grep /^$a[0]$/, @rl) {
      my $v = shift @a;
      readingsBeginUpdate($hash);
      readingsBulkUpdate($hash, $v, join(" ",@a), 1);
      readingsEndUpdate($hash, 0);  # Verhindert das Aktualisieren des STATE
      $doRet = 1;
    }
  };
  return if($doRet);


Dadurch kann ich jetzt das aktualisieren des STATE unterdrücken.
Bedeutet, damit ist alles in einem dummy.

98_dummyNew.pm hänge ich nicht an. Wenn würde ich rudolfkoenig fragen, ob er gewillt wäre, das in 98_dummy.pm so ähnlich einzubauen.

Hier meine Raw von meinem dummyNew und die passende svg_update.js

defmod powerGrid dummyNew
attr powerGrid readingList airdryer_v battery_v batteryState_v batteryToHouse_v dishwasher_v dryer_v fridge_v grid_v gridToBattery_v gridToBatteryState_v gridToLowCarbon_v gridToHouse_v house_v houseToAirdryer_v houseToDishwasher_v houseToDryer_v houseToFridge_v houseToWasher_v solar_v solarToBattery_v solarToGrid_v solarToHouse_v washer_v
attr powerGrid room Energy1
attr powerGrid setList airdryer_v:textField battery_v:textField batteryState_v:select,backward,stop,forward batteryToHouse_v:select,on,off dishwasher_v:textField dryer_v:textField fridge_v:textField grid_v:textField gridToBattery_v:select,backward,stop,forward gridToLowCarbon_v:select,on,off gridToHouse_v:select,on,off house_v:textField houseToAirdryer_v:select,on,off houseToDishwasher_v:select,on,off houseToDryer_v:select,on,off houseToFridge_v:select,on,off houseToWasher_v:select,on,off solar_v:textField solarToBattery_v:select,on,off solarToGrid_v:select,on,off solarToHouse_v:select,on,off washer_v:textField
attr powerGrid stateFormat <svg width='650' height='500' xmlns='http://www.w3.org/2000/svg' style='background-color: black;; width: auto;; height: auto;;'>\
 \
 <!-- Titel -->\
  <text x='20' y='30' font-family='Arial' font-size='24' fill='white'>Power Flow</text>\
\
  <!-- Kohlenstoffarm (Grün) -->\
  <circle id='lowCarbonCircle' cx='100' cy='100' r='45' fill='none' stroke='green' stroke-width='10' opacity='0.4'/>\
  <circle cx='100' cy='100' r='40' fill='none' stroke='green' stroke-width='5'/>\
  <text x='100' y='100' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Low-Carbon</text>\
  <text id='lowCarbonPower' x='100' y='115' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>0 %</text>\
\
  <!-- Solar (Orange) -->\
  <circle id='solarCircle' cx='250' cy='100' r='45' fill='none' stroke='orange' stroke-width='10' opacity='0.4'/>\
  <circle cx='250' cy='100' r='40' fill='none' stroke='orange' stroke-width='5'/>\
  <text x='250' y='100' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Solar</text>\
  <text id='solarPower' x='250' y='115' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Netz (Blau) -->\
  <circle id='gridCircle' cx='100' cy='250' r='45' fill='none' stroke='blue' stroke-width='10' opacity='0.4'/>\
  <circle cx='100' cy='250' r='40' fill='none' stroke='blue' stroke-width='5'/>\
  <text x='100' y='250' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Grid</text>\
  <text id='gridPower' x='100' y='265' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Batterie Label -->\
  <text x="250" y="400" font-family="Arial" font-size="12" fill="white" text-anchor="middle" alignment-baseline="middle">Battery</text>\
  <text id="batteryPower" x="250" y="415" font-family="Arial" font-size="12" fill="white" text-anchor="middle" alignment-baseline="middle"></text>\
\
  <!-- Batterie stop (Turkis) -->\
  <circle id='batteryCircle' cx='250' cy='400' r='45' fill='none' stroke='turquoise' stroke-width='10' opacity='0.4'/>\
  <circle id="batteryStatic" cx="250" cy="400" r="40" fill="none" stroke="turquoise" stroke-width="5"/>\
\
  <!-- Batterie dreht links -->\
  <circle id="batteryClockwise" cx="250" cy="400" r="40" fill="none" stroke="purple" stroke-width="5" stroke-dasharray="9 5" stroke-dashoffset="3" style="display:none;;">\
    <animateTransform attributeName="transform" type="rotate" from="0 250 400" to="360 250 400" dur="5s" repeatCount="indefinite" />\
  </circle>\
\
  <!-- Batteriering dreht rechts -->\
  <circle id="batteryCounterClockwise" cx="250" cy="400" r="40" fill="none" stroke="turquoise" stroke-width="5" stroke-dasharray="9 5" stroke-dashoffset="3" style="display:none;;">\
    <animateTransform attributeName="transform" type="rotate" from="0 250 400" to="-360 250 400" dur="5s" repeatCount="indefinite" />\
  </circle>\
\
  <!-- Haus + Ringsegmente -->\
  <circle id='houseCircle' cx='400' cy='250' r='45' fill='none' stroke='purple' stroke-width='10' opacity='0.4'/>\
  <circle id='solarSegment' cx='400' cy='250' r='40' fill='none' stroke='orange' stroke-width='5' stroke-dasharray='0 100' />\
  <circle id='gridSegment' cx='400' cy='250' r='40' fill='none' stroke='blue' stroke-width='5' stroke-dasharray='0 100' />\
  <circle id='batterySegment' cx='400' cy='250' r='40' fill='none' stroke='purple' stroke-width='5' stroke-dasharray='0 100' />\
  <text x='400' y='250' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>House</text>\
  <text id='housePower' x='400' y='265' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Lufttrockner (Blau) -->\
  <circle id='airDryerCircle' cx='400' cy='100' r='45' fill='none' stroke='blue' stroke-width='10' opacity='0.4'/>\
  <circle cx='400' cy='100' r='40' fill='none' stroke='blue' stroke-width='5'/>\
  <text x='400' y='100' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Airdryer</text>\
  <text id='airdryerPower' x='400' y='115' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Kühlschrank (Gelb) -->\
  <circle id='fridgeCircle' cx='400' cy='400' r='45' fill='none' stroke='yellow' stroke-width='10' opacity='0.4'/>\
  <circle cx='400' cy='400' r='40' fill='none' stroke='yellow' stroke-width='5'/>\
  <text x='400' y='400' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Fridge</text>\
  <text id='fridgePower' x='400' y='415' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Waschmaschine (Gelb) -->\
  <circle id='washerCircle' cx='550' cy='100' r='45' fill='none' stroke='yellow' stroke-width='10' opacity='0.4'/>\
  <circle cx='550' cy='100' r='40' fill='none' stroke='yellow' stroke-width='5'/>\
  <text x='550' y='100' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Washer</text>\
  <text id='washerPower' x='550' y='115' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Trockner (Grün) -->\
  <circle id='dryerCircle' cx='550' cy='250' r='45' fill='none' stroke='green' stroke-width='10' opacity='0.4'/>\
  <circle cx='550' cy='250' r='40' fill='none' stroke='green' stroke-width='5'/>\
  <text x='550' y='250' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Dryer</text>\
  <text id='dryerPower' x='550' y='265' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Geschirrspüler (Blau) -->\
  <circle id='dishwasherCircle' cx='550' cy='400' r='45' fill='none' stroke='blue' stroke-width='10' opacity='0.4'/>\
  <circle cx='550' cy='400' r='40' fill='none' stroke='blue' stroke-width='5'/>\
  <text x='550' y='400' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Dishwasher</text>\
  <text id='dishwasherPower' x='550' y='415' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Verbindungslinien -->\
\
  <!-- Verbindungslinie von Batterie zu Haus (Lila) --> \
  <path id='batteryToHousePath' d='M 260 354 A 110 100 0 0 1 357 260' stroke='purple' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='purple'>\
    <animateMotion id='batteryToHouse' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#batteryToHousePath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Solar zu Haus (Orange) -->\
  <path id='solarToHousePath' d='M 260 145 A 110 100 0 0 0 357 240' stroke='orange' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='orange'>\
    <animateMotion id='solarToHouse' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#solarToHousePath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Solar zu Batterie (Orange) -->\
  <path id='solarToBatteryPath' d='M 250 145 A 0 100 0 0 1 250 354' stroke='orange' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='orange'>\
    <animateMotion id='solarToBattery' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#solarToBatteryPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Haus zu Lufttrockner (Blau) -->\
  <path id='houseToAirdryerPath' d='M 400 203 A 0 67 0 0 1 400 145' stroke='blue' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='blue'>\
    <animateMotion id='houseToAirdryer' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#houseToAirdryerPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Haus zu Kühlschrank (Gelb) -->\
  <path id='houseToFridgePath' d='M 400 298 A 0 67 0 0 1 400 354' stroke='yellow' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='yellow'>\
    <animateMotion id='houseToFridge' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#houseToFridgePath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Netz zu Kohlenstoffarm (Grün) -->\
  <path id='gridToLowCarbonPath' d='M 100 208 A 0 68 0 0 1 100 145' stroke='green' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='green'>\
    <animateMotion id='gridToLowCarbon' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#gridToLowCarbonPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Netz zu Haus (Blau) -->\
  <path id='gridToHousePath' d='M 146 250 H 357' stroke='blue' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='blue'>\
    <animateMotion id='gridToHouse' dur='3s' repeatCount='indefinite'>\
      <mpath href='#gridToHousePath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Haus zu Trockner (Green) -->\
  <path id='houseToDryerPath' d='M 446 250 A 0 0 0 0 1 505 250' stroke='green' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='green'>\
    <animateMotion id='houseToDryer' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#houseToDryerPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Haus zu Geschirrspüler (Blue) -->\
  <path id='houseToDishwasherPath' d='M 446 260 A 110 110 0 0 1 550 354' stroke='blue' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='blue'>\
    <animateMotion id='houseToDishwasher' dur='3s' repeatCount='indefinite'>\
      <mpath href='#houseToDishwasherPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Solar zu Netz (Orange) -->\
  <path id='solarToGridPath' d='M 240 145 A 110 100 0 0 1 146 240' stroke='orange' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='orange'>\
    <animateMotion id='solarToGrid' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#solarToGridPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Netz zu Batterie (Turkis) -->\
  <path id='gridToBatteryPath' d='M 146 260 A 110 100 0 0 1 240 354' stroke='turquoise' stroke-width='2' fill='transparent'/>\
  <circle id="gridToBatteryStatic" r='5' fill='turquoise' style="display:none;;" />\
  <circle id="gridToBatteryForward" r='5' fill='turquoise' style="display:none;;">\
    <animateMotion id='gridToBatteryForwardAnim' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#gridToBatteryPath'/>\
    </animateMotion>\
  </circle>\
  <circle id="gridToBatteryBackward" r='5' fill='turquoise' style="display:none;;">\
    <animateMotion id='gridToBatteryBackwardAnim' dur='3s' repeatCount='indefinite' keyPoints='1;;0' keyTimes='0;;1'>\
      <mpath href='#gridToBatteryPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Haus zu Waschmaschine (Gelb) -->\
  <path id='houseToWasherPath' d='M 550 145 A 110 100 0 0 1 446 240' stroke='yellow' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='yellow'>\
    <animateMotion id='houseToWasher' dur='3s' repeatCount='indefinite' keyPoints='1;;0' keyTimes='0;;1'>\
      <mpath href='#houseToWasherPath'/>\
    </animateMotion>\
  </circle>\
\
</svg>\


setstate powerGrid <svg width='650' height='500' xmlns='http://www.w3.org/2000/svg' style='background-color: black;; width: auto;; height: auto;;'>\
 \
 <!-- Titel -->\
  <text x='20' y='30' font-family='Arial' font-size='24' fill='white'>Power Flow</text>\
\
  <!-- Kohlenstoffarm (Grün) -->\
  <circle id='lowCarbonCircle' cx='100' cy='100' r='45' fill='none' stroke='green' stroke-width='10' opacity='0.4'/>\
  <circle cx='100' cy='100' r='40' fill='none' stroke='green' stroke-width='5'/>\
  <text x='100' y='100' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Low-Carbon</text>\
  <text id='lowCarbonPower' x='100' y='115' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>0 %</text>\
\
  <!-- Solar (Orange) -->\
  <circle id='solarCircle' cx='250' cy='100' r='45' fill='none' stroke='orange' stroke-width='10' opacity='0.4'/>\
  <circle cx='250' cy='100' r='40' fill='none' stroke='orange' stroke-width='5'/>\
  <text x='250' y='100' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Solar</text>\
  <text id='solarPower' x='250' y='115' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Netz (Blau) -->\
  <circle id='gridCircle' cx='100' cy='250' r='45' fill='none' stroke='blue' stroke-width='10' opacity='0.4'/>\
  <circle cx='100' cy='250' r='40' fill='none' stroke='blue' stroke-width='5'/>\
  <text x='100' y='250' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Grid</text>\
  <text id='gridPower' x='100' y='265' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Batterie Label -->\
  <text x="250" y="400" font-family="Arial" font-size="12" fill="white" text-anchor="middle" alignment-baseline="middle">Battery</text>\
  <text id="batteryPower" x="250" y="415" font-family="Arial" font-size="12" fill="white" text-anchor="middle" alignment-baseline="middle"></text>\
\
  <!-- Batterie stop (Turkis) -->\
  <circle id='batteryCircle' cx='250' cy='400' r='45' fill='none' stroke='turquoise' stroke-width='10' opacity='0.4'/>\
  <circle id="batteryStatic" cx="250" cy="400" r="40" fill="none" stroke="turquoise" stroke-width="5"/>\
\
  <!-- Batterie dreht links -->\
  <circle id="batteryClockwise" cx="250" cy="400" r="40" fill="none" stroke="purple" stroke-width="5" stroke-dasharray="9 5" stroke-dashoffset="3" style="display:none;;">\
    <animateTransform attributeName="transform" type="rotate" from="0 250 400" to="360 250 400" dur="5s" repeatCount="indefinite" />\
  </circle>\
\
  <!-- Batteriering dreht rechts -->\
  <circle id="batteryCounterClockwise" cx="250" cy="400" r="40" fill="none" stroke="turquoise" stroke-width="5" stroke-dasharray="9 5" stroke-dashoffset="3" style="display:none;;">\
    <animateTransform attributeName="transform" type="rotate" from="0 250 400" to="-360 250 400" dur="5s" repeatCount="indefinite" />\
  </circle>\
\
  <!-- Haus + Ringsegmente -->\
  <circle id='houseCircle' cx='400' cy='250' r='45' fill='none' stroke='purple' stroke-width='10' opacity='0.4'/>\
  <circle id='solarSegment' cx='400' cy='250' r='40' fill='none' stroke='orange' stroke-width='5' stroke-dasharray='0 100' />\
  <circle id='gridSegment' cx='400' cy='250' r='40' fill='none' stroke='blue' stroke-width='5' stroke-dasharray='0 100' />\
  <circle id='batterySegment' cx='400' cy='250' r='40' fill='none' stroke='purple' stroke-width='5' stroke-dasharray='0 100' />\
  <text x='400' y='250' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>House</text>\
  <text id='housePower' x='400' y='265' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Lufttrockner (Blau) -->\
  <circle id='airDryerCircle' cx='400' cy='100' r='45' fill='none' stroke='blue' stroke-width='10' opacity='0.4'/>\
  <circle cx='400' cy='100' r='40' fill='none' stroke='blue' stroke-width='5'/>\
  <text x='400' y='100' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Airdryer</text>\
  <text id='airdryerPower' x='400' y='115' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Kühlschrank (Gelb) -->\
  <circle id='fridgeCircle' cx='400' cy='400' r='45' fill='none' stroke='yellow' stroke-width='10' opacity='0.4'/>\
  <circle cx='400' cy='400' r='40' fill='none' stroke='yellow' stroke-width='5'/>\
  <text x='400' y='400' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Fridge</text>\
  <text id='fridgePower' x='400' y='415' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Waschmaschine (Gelb) -->\
  <circle id='washerCircle' cx='550' cy='100' r='45' fill='none' stroke='yellow' stroke-width='10' opacity='0.4'/>\
  <circle cx='550' cy='100' r='40' fill='none' stroke='yellow' stroke-width='5'/>\
  <text x='550' y='100' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Washer</text>\
  <text id='washerPower' x='550' y='115' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Trockner (Grün) -->\
  <circle id='dryerCircle' cx='550' cy='250' r='45' fill='none' stroke='green' stroke-width='10' opacity='0.4'/>\
  <circle cx='550' cy='250' r='40' fill='none' stroke='green' stroke-width='5'/>\
  <text x='550' y='250' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Dryer</text>\
  <text id='dryerPower' x='550' y='265' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Geschirrspüler (Blau) -->\
  <circle id='dishwasherCircle' cx='550' cy='400' r='45' fill='none' stroke='blue' stroke-width='10' opacity='0.4'/>\
  <circle cx='550' cy='400' r='40' fill='none' stroke='blue' stroke-width='5'/>\
  <text x='550' y='400' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Dishwasher</text>\
  <text id='dishwasherPower' x='550' y='415' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Verbindungslinien -->\
\
  <!-- Verbindungslinie von Batterie zu Haus (Lila) --> \
  <path id='batteryToHousePath' d='M 260 354 A 110 100 0 0 1 357 260' stroke='purple' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='purple'>\
    <animateMotion id='batteryToHouse' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#batteryToHousePath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Solar zu Haus (Orange) -->\
  <path id='solarToHousePath' d='M 260 145 A 110 100 0 0 0 357 240' stroke='orange' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='orange'>\
    <animateMotion id='solarToHouse' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#solarToHousePath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Solar zu Batterie (Orange) -->\
  <path id='solarToBatteryPath' d='M 250 145 A 0 100 0 0 1 250 354' stroke='orange' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='orange'>\
    <animateMotion id='solarToBattery' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#solarToBatteryPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Haus zu Lufttrockner (Blau) -->\
  <path id='houseToAirdryerPath' d='M 400 203 A 0 67 0 0 1 400 145' stroke='blue' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='blue'>\
    <animateMotion id='houseToAirdryer' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#houseToAirdryerPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Haus zu Kühlschrank (Gelb) -->\
  <path id='houseToFridgePath' d='M 400 298 A 0 67 0 0 1 400 354' stroke='yellow' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='yellow'>\
    <animateMotion id='houseToFridge' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#houseToFridgePath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Netz zu Kohlenstoffarm (Grün) -->\
  <path id='gridToLowCarbonPath' d='M 100 208 A 0 68 0 0 1 100 145' stroke='green' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='green'>\
    <animateMotion id='gridToLowCarbon' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#gridToLowCarbonPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Netz zu Haus (Blau) -->\
  <path id='gridToHousePath' d='M 146 250 H 357' stroke='blue' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='blue'>\
    <animateMotion id='gridToHouse' dur='3s' repeatCount='indefinite'>\
      <mpath href='#gridToHousePath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Haus zu Trockner (Green) -->\
  <path id='houseToDryerPath' d='M 446 250 A 0 0 0 0 1 505 250' stroke='green' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='green'>\
    <animateMotion id='houseToDryer' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#houseToDryerPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Haus zu Geschirrspüler (Blue) -->\
  <path id='houseToDishwasherPath' d='M 446 260 A 110 110 0 0 1 550 354' stroke='blue' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='blue'>\
    <animateMotion id='houseToDishwasher' dur='3s' repeatCount='indefinite'>\
      <mpath href='#houseToDishwasherPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Solar zu Netz (Orange) -->\
  <path id='solarToGridPath' d='M 240 145 A 110 100 0 0 1 146 240' stroke='orange' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='orange'>\
    <animateMotion id='solarToGrid' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#solarToGridPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Netz zu Batterie (Turkis) -->\
  <path id='gridToBatteryPath' d='M 146 260 A 110 100 0 0 1 240 354' stroke='turquoise' stroke-width='2' fill='transparent'/>\
  <circle id="gridToBatteryStatic" r='5' fill='turquoise' style="display:none;;" />\
  <circle id="gridToBatteryForward" r='5' fill='turquoise' style="display:none;;">\
    <animateMotion id='gridToBatteryForwardAnim' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#gridToBatteryPath'/>\
    </animateMotion>\
  </circle>\
  <circle id="gridToBatteryBackward" r='5' fill='turquoise' style="display:none;;">\
    <animateMotion id='gridToBatteryBackwardAnim' dur='3s' repeatCount='indefinite' keyPoints='1;;0' keyTimes='0;;1'>\
      <mpath href='#gridToBatteryPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Haus zu Waschmaschine (Gelb) -->\
  <path id='houseToWasherPath' d='M 550 145 A 110 100 0 0 1 446 240' stroke='yellow' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='yellow'>\
    <animateMotion id='houseToWasher' dur='3s' repeatCount='indefinite' keyPoints='1;;0' keyTimes='0;;1'>\
      <mpath href='#houseToWasherPath'/>\
    </animateMotion>\
  </circle>\
\
</svg>\

setstate powerGrid 2024-10-27 12:18:18 airdryer_v 799
setstate powerGrid 2024-10-27 12:17:49 batteryState_v backward
setstate powerGrid 2024-10-27 12:09:51 batteryToHouse_v off
setstate powerGrid 2024-10-27 12:09:55 battery_v 50
setstate powerGrid 2024-10-27 12:10:01 dishwasher_v 50
setstate powerGrid 2024-10-27 12:10:05 dryer_v 50
setstate powerGrid 2024-10-27 12:10:08 fridge_v 50
setstate powerGrid 2024-10-27 12:18:38 gridToBattery_v forward
setstate powerGrid 2024-10-27 12:10:28 gridToHouse_v off
setstate powerGrid 2024-10-27 12:17:28 gridToLowCarbon_v off
setstate powerGrid 2024-10-27 12:10:42 grid_v 50
setstate powerGrid 2024-10-27 12:10:44 houseToAirdryer_v off
setstate powerGrid 2024-10-27 12:10:47 houseToDishwasher_v off
setstate powerGrid 2024-10-27 12:10:50 houseToDryer_v off
setstate powerGrid 2024-10-27 12:10:53 houseToFridge_v off
setstate powerGrid 2024-10-27 12:10:55 houseToWasher_v off
setstate powerGrid 2024-10-27 12:10:58 house_v 50
setstate powerGrid 2024-10-27 12:11:01 solarToBattery_v off
setstate powerGrid 2024-10-27 12:11:03 solarToGrid_v off
setstate powerGrid 2024-10-27 12:33:53 solarToHouse_v on
setstate powerGrid 2024-10-27 12:11:09 solar_v 50
setstate powerGrid 2024-10-27 12:12:04 state gridToLowCarbon_v off
setstate powerGrid 2024-10-27 12:11:12 washer_v 50



Gruß schwatter
 

schwatter

#14
Nabend,

hier ein Update auf Basis des dummyNew.pm, ein Post höher.


1. das SVG steckt in etwas HTML. Dadurch ist eine automatische Skalierung möglich.
2. das JS erweitert
   - Linien die jetzt bei einem Wert > 0 automatisch gestartet werden: solarToHouse,houseToAirdryer,houseToWasher,houseToDryer,houseToDishwasher,houseToFridge.
   - Linien die jetzt bei einem Wert < 0 automatisch gestartet werden: solarToGrid.
   - Linien die noch keine Logik haben: solarToBattery,gridToBattery,batteryToHouse.
   - Batteryringanimation muss auch manuell gesetzt werden.
3. Low-Carbon ist weiterhin ein dummy

Durch die Anpassung im JS, wird jetzt weniger Logik auf Basis eines notify, DOIF's,..., benötigt.
Verbrauchs- oder Erzeugungswerte müssen auch weiterhin gesetzt werden.

defmod powerGrid dummyNew
attr powerGrid readingList airdryer_v battery_v batteryState_v batteryToHouse_v dishwasher_v dryer_v fridge_v grid_v gridToBattery_v gridToBatteryState_v gridToLowCarbon_v gridToHouse_v house_v houseToAirdryer_v houseToDishwasher_v houseToDryer_v houseToFridge_v houseToWasher_v solar_v solarToBattery_v solarToGrid_v solarToHouse_v washer_v
attr powerGrid room Energy1
attr powerGrid setList airdryer_v:textField battery_v:textField batteryState_v:select,backward,stop,forward batteryToHouse_v:select,on,off dishwasher_v:textField dryer_v:textField fridge_v:textField grid_v:textField gridToBattery_v:select,backward,stop,forward gridToLowCarbon_v:select,on,off gridToHouse_v:select,on,off house_v:textField houseToAirdryer_v:select,on,off houseToDishwasher_v:select,on,off houseToDryer_v:select,on,off houseToFridge_v:select,on,off houseToWasher_v:select,on,off solar_v:textField solarToBattery_v:select,on,off solarToGrid_v:select,on,off solarToHouse_v:select,on,off washer_v:textField
attr powerGrid stateFormat <!DOCTYPE html>\
<html>\
<head>\
<title>powerGrid</title>\
<style>\
#wrapper {\
    background: black;;\
}\
svg {\
    width: 100%;;\
    height: auto;;\
}\
</style>\
</head>\
<body>\
\
<div id="wrapper">\
<svg viewBox='0 0 650 500' xmlns='http://www.w3.org/2000/svg' style='background-color: black;; width: 90%;; height: auto;;'>\
 \
 <!-- Titel -->\
  <text x='20' y='30' font-family='Arial' font-size='24' fill='white'>Power Flow</text>\
\
  <!-- Kohlenstoffarm (Grün) -->\
  <circle id='lowCarbonCircle' cx='100' cy='100' r='45' fill='none' stroke='green' stroke-width='10' opacity='0.4'/>\
  <circle cx='100' cy='100' r='40' fill='none' stroke='green' stroke-width='5'/>\
  <text x='100' y='100' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Low-Carbon</text>\
  <text id='lowCarbonPower' x='100' y='115' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>0 %</text>\
\
  <!-- Solar (Orange) -->\
  <circle id='solarCircle' cx='250' cy='100' r='45' fill='none' stroke='orange' stroke-width='10' opacity='0.4'/>\
  <circle cx='250' cy='100' r='40' fill='none' stroke='orange' stroke-width='5'/>\
  <text x='250' y='100' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Solar</text>\
  <text id='solarPower' x='250' y='115' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Netz (Blau) -->\
  <circle id='gridCircle' cx='100' cy='250' r='45' fill='none' stroke='blue' stroke-width='10' opacity='0.4'/>\
  <circle cx='100' cy='250' r='40' fill='none' stroke='blue' stroke-width='5'/>\
  <text x='100' y='250' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Grid</text>\
  <text id='gridPower' x='100' y='265' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Batterie Label -->\
  <text x="250" y="400" font-family="Arial" font-size="12" fill="white" text-anchor="middle" alignment-baseline="middle">Battery</text>\
  <text id="batteryPower" x="250" y="415" font-family="Arial" font-size="12" fill="white" text-anchor="middle" alignment-baseline="middle"></text>\
\
  <!-- Batterie stop (Turkis) -->\
  <circle id='batteryCircle' cx='250' cy='400' r='45' fill='none' stroke='turquoise' stroke-width='10' opacity='0.4'/>\
  <circle id="batteryStatic" cx="250" cy="400" r="40" fill="none" stroke="turquoise" stroke-width="5"/>\
\
  <!-- Batterie dreht links -->\
  <circle id="batteryClockwise" cx="250" cy="400" r="40" fill="none" stroke="purple" stroke-width="5" stroke-dasharray="9 5" stroke-dashoffset="3" style="display:none;;">\
    <animateTransform attributeName="transform" type="rotate" from="0 250 400" to="360 250 400" dur="5s" repeatCount="indefinite" />\
  </circle>\
\
  <!-- Batteriering dreht rechts -->\
  <circle id="batteryCounterClockwise" cx="250" cy="400" r="40" fill="none" stroke="turquoise" stroke-width="5" stroke-dasharray="9 5" stroke-dashoffset="3" style="display:none;;">\
    <animateTransform attributeName="transform" type="rotate" from="0 250 400" to="-360 250 400" dur="5s" repeatCount="indefinite" />\
  </circle>\
\
  <!-- Haus + Ringsegmente -->\
  <circle id='houseCircle' cx='400' cy='250' r='45' fill='none' stroke='purple' stroke-width='10' opacity='0.4'/>\
  <circle id='solarSegment' cx='400' cy='250' r='40' fill='none' stroke='orange' stroke-width='5' stroke-dasharray='0 100' />\
  <circle id='gridSegment' cx='400' cy='250' r='40' fill='none' stroke='blue' stroke-width='5' stroke-dasharray='0 100' />\
  <circle id='batterySegment' cx='400' cy='250' r='40' fill='none' stroke='purple' stroke-width='5' stroke-dasharray='0 100' />\
  <text x='400' y='250' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>House</text>\
  <text id='housePower' x='400' y='265' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Lufttrockner (Blau) -->\
  <circle id='airDryerCircle' cx='400' cy='100' r='45' fill='none' stroke='blue' stroke-width='10' opacity='0.4'/>\
  <circle cx='400' cy='100' r='40' fill='none' stroke='blue' stroke-width='5'/>\
  <text x='400' y='100' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Airdryer</text>\
  <text id='airdryerPower' x='400' y='115' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Kühlschrank (Gelb) -->\
  <circle id='fridgeCircle' cx='400' cy='400' r='45' fill='none' stroke='yellow' stroke-width='10' opacity='0.4'/>\
  <circle cx='400' cy='400' r='40' fill='none' stroke='yellow' stroke-width='5'/>\
  <text x='400' y='400' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Fridge</text>\
  <text id='fridgePower' x='400' y='415' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Waschmaschine (Gelb) -->\
  <circle id='washerCircle' cx='550' cy='100' r='45' fill='none' stroke='yellow' stroke-width='10' opacity='0.4'/>\
  <circle cx='550' cy='100' r='40' fill='none' stroke='yellow' stroke-width='5'/>\
  <text x='550' y='100' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Washer</text>\
  <text id='washerPower' x='550' y='115' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Trockner (Grün) -->\
  <circle id='dryerCircle' cx='550' cy='250' r='45' fill='none' stroke='green' stroke-width='10' opacity='0.4'/>\
  <circle cx='550' cy='250' r='40' fill='none' stroke='green' stroke-width='5'/>\
  <text x='550' y='250' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Dryer</text>\
  <text id='dryerPower' x='550' y='265' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Geschirrspüler (Blau) -->\
  <circle id='dishwasherCircle' cx='550' cy='400' r='45' fill='none' stroke='blue' stroke-width='10' opacity='0.4'/>\
  <circle cx='550' cy='400' r='40' fill='none' stroke='blue' stroke-width='5'/>\
  <text x='550' y='400' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Dishwasher</text>\
  <text id='dishwasherPower' x='550' y='415' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Verbindungslinien -->\
\
  <!-- Verbindungslinie von Batterie zu Haus (Lila) --> \
  <path id='batteryToHousePath' d='M 260 354 A 110 100 0 0 1 357 260' stroke='purple' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='purple'>\
    <animateMotion id='batteryToHouse' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#batteryToHousePath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Solar zu Haus (Orange) -->\
  <path id='solarToHousePath' d='M 260 145 A 110 100 0 0 0 357 240' stroke='orange' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='orange'>\
    <animateMotion id='solarToHouse' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#solarToHousePath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Solar zu Batterie (Orange) -->\
  <path id='solarToBatteryPath' d='M 250 145 A 0 100 0 0 1 250 354' stroke='orange' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='orange'>\
    <animateMotion id='solarToBattery' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#solarToBatteryPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Haus zu Lufttrockner (Blau) -->\
  <path id='houseToAirdryerPath' d='M 400 203 A 0 67 0 0 1 400 145' stroke='blue' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='blue'>\
    <animateMotion id='houseToAirdryer' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#houseToAirdryerPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Haus zu Kühlschrank (Gelb) -->\
  <path id='houseToFridgePath' d='M 400 298 A 0 67 0 0 1 400 354' stroke='yellow' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='yellow'>\
    <animateMotion id='houseToFridge' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#houseToFridgePath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Netz zu Kohlenstoffarm (Grün) -->\
  <path id='gridToLowCarbonPath' d='M 100 208 A 0 68 0 0 1 100 145' stroke='green' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='green'>\
    <animateMotion id='gridToLowCarbon' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#gridToLowCarbonPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Netz zu Haus (Blau) -->\
  <path id='gridToHousePath' d='M 146 250 H 357' stroke='blue' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='blue'>\
    <animateMotion id='gridToHouse' dur='3s' repeatCount='indefinite'>\
      <mpath href='#gridToHousePath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Haus zu Trockner (Green) -->\
  <path id='houseToDryerPath' d='M 446 250 A 0 0 0 0 1 505 250' stroke='green' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='green'>\
    <animateMotion id='houseToDryer' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#houseToDryerPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Haus zu Geschirrspüler (Blue) -->\
  <path id='houseToDishwasherPath' d='M 446 260 A 110 110 0 0 1 550 354' stroke='blue' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='blue'>\
    <animateMotion id='houseToDishwasher' dur='3s' repeatCount='indefinite'>\
      <mpath href='#houseToDishwasherPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Solar zu Netz (Orange) -->\
  <path id='solarToGridPath' d='M 240 145 A 110 100 0 0 1 146 240' stroke='orange' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='orange'>\
    <animateMotion id='solarToGrid' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#solarToGridPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Netz zu Batterie (Turkis) -->\
  <path id='gridToBatteryPath' d='M 146 260 A 110 100 0 0 1 240 354' stroke='turquoise' stroke-width='2' fill='transparent'/>\
  <circle id="gridToBatteryStatic" r='5' fill='turquoise' style="display:none;;" />\
  <circle id="gridToBatteryForward" r='5' fill='turquoise' style="display:none;;">\
    <animateMotion id='gridToBatteryForwardAnim' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#gridToBatteryPath'/>\
    </animateMotion>\
  </circle>\
  <circle id="gridToBatteryBackward" r='5' fill='turquoise' style="display:none;;">\
    <animateMotion id='gridToBatteryBackwardAnim' dur='3s' repeatCount='indefinite' keyPoints='1;;0' keyTimes='0;;1'>\
      <mpath href='#gridToBatteryPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Haus zu Waschmaschine (Gelb) -->\
  <path id='houseToWasherPath' d='M 550 145 A 110 100 0 0 1 446 240' stroke='yellow' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='yellow'>\
    <animateMotion id='houseToWasher' dur='3s' repeatCount='indefinite' keyPoints='1;;0' keyTimes='0;;1'>\
      <mpath href='#houseToWasherPath'/>\
    </animateMotion>\
  </circle>\
\
</svg>\
</div>\
</body>\
</html>\


setstate powerGrid <!DOCTYPE html>\
<html>\
<head>\
<title>powerGrid</title>\
<style>\
#wrapper {\
    background: black;;\
}\
svg {\
    width: 100%;;\
    height: auto;;\
}\
</style>\
</head>\
<body>\
\
<div id="wrapper">\
<svg viewBox='0 0 650 500' xmlns='http://www.w3.org/2000/svg' style='background-color: black;; width: 90%;; height: auto;;'>\
 \
 <!-- Titel -->\
  <text x='20' y='30' font-family='Arial' font-size='24' fill='white'>Power Flow</text>\
\
  <!-- Kohlenstoffarm (Grün) -->\
  <circle id='lowCarbonCircle' cx='100' cy='100' r='45' fill='none' stroke='green' stroke-width='10' opacity='0.4'/>\
  <circle cx='100' cy='100' r='40' fill='none' stroke='green' stroke-width='5'/>\
  <text x='100' y='100' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Low-Carbon</text>\
  <text id='lowCarbonPower' x='100' y='115' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>0 %</text>\
\
  <!-- Solar (Orange) -->\
  <circle id='solarCircle' cx='250' cy='100' r='45' fill='none' stroke='orange' stroke-width='10' opacity='0.4'/>\
  <circle cx='250' cy='100' r='40' fill='none' stroke='orange' stroke-width='5'/>\
  <text x='250' y='100' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Solar</text>\
  <text id='solarPower' x='250' y='115' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Netz (Blau) -->\
  <circle id='gridCircle' cx='100' cy='250' r='45' fill='none' stroke='blue' stroke-width='10' opacity='0.4'/>\
  <circle cx='100' cy='250' r='40' fill='none' stroke='blue' stroke-width='5'/>\
  <text x='100' y='250' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Grid</text>\
  <text id='gridPower' x='100' y='265' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Batterie Label -->\
  <text x="250" y="400" font-family="Arial" font-size="12" fill="white" text-anchor="middle" alignment-baseline="middle">Battery</text>\
  <text id="batteryPower" x="250" y="415" font-family="Arial" font-size="12" fill="white" text-anchor="middle" alignment-baseline="middle"></text>\
\
  <!-- Batterie stop (Turkis) -->\
  <circle id='batteryCircle' cx='250' cy='400' r='45' fill='none' stroke='turquoise' stroke-width='10' opacity='0.4'/>\
  <circle id="batteryStatic" cx="250" cy="400" r="40" fill="none" stroke="turquoise" stroke-width="5"/>\
\
  <!-- Batterie dreht links -->\
  <circle id="batteryClockwise" cx="250" cy="400" r="40" fill="none" stroke="purple" stroke-width="5" stroke-dasharray="9 5" stroke-dashoffset="3" style="display:none;;">\
    <animateTransform attributeName="transform" type="rotate" from="0 250 400" to="360 250 400" dur="5s" repeatCount="indefinite" />\
  </circle>\
\
  <!-- Batteriering dreht rechts -->\
  <circle id="batteryCounterClockwise" cx="250" cy="400" r="40" fill="none" stroke="turquoise" stroke-width="5" stroke-dasharray="9 5" stroke-dashoffset="3" style="display:none;;">\
    <animateTransform attributeName="transform" type="rotate" from="0 250 400" to="-360 250 400" dur="5s" repeatCount="indefinite" />\
  </circle>\
\
  <!-- Haus + Ringsegmente -->\
  <circle id='houseCircle' cx='400' cy='250' r='45' fill='none' stroke='purple' stroke-width='10' opacity='0.4'/>\
  <circle id='solarSegment' cx='400' cy='250' r='40' fill='none' stroke='orange' stroke-width='5' stroke-dasharray='0 100' />\
  <circle id='gridSegment' cx='400' cy='250' r='40' fill='none' stroke='blue' stroke-width='5' stroke-dasharray='0 100' />\
  <circle id='batterySegment' cx='400' cy='250' r='40' fill='none' stroke='purple' stroke-width='5' stroke-dasharray='0 100' />\
  <text x='400' y='250' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>House</text>\
  <text id='housePower' x='400' y='265' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Lufttrockner (Blau) -->\
  <circle id='airDryerCircle' cx='400' cy='100' r='45' fill='none' stroke='blue' stroke-width='10' opacity='0.4'/>\
  <circle cx='400' cy='100' r='40' fill='none' stroke='blue' stroke-width='5'/>\
  <text x='400' y='100' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Airdryer</text>\
  <text id='airdryerPower' x='400' y='115' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Kühlschrank (Gelb) -->\
  <circle id='fridgeCircle' cx='400' cy='400' r='45' fill='none' stroke='yellow' stroke-width='10' opacity='0.4'/>\
  <circle cx='400' cy='400' r='40' fill='none' stroke='yellow' stroke-width='5'/>\
  <text x='400' y='400' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Fridge</text>\
  <text id='fridgePower' x='400' y='415' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Waschmaschine (Gelb) -->\
  <circle id='washerCircle' cx='550' cy='100' r='45' fill='none' stroke='yellow' stroke-width='10' opacity='0.4'/>\
  <circle cx='550' cy='100' r='40' fill='none' stroke='yellow' stroke-width='5'/>\
  <text x='550' y='100' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Washer</text>\
  <text id='washerPower' x='550' y='115' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Trockner (Grün) -->\
  <circle id='dryerCircle' cx='550' cy='250' r='45' fill='none' stroke='green' stroke-width='10' opacity='0.4'/>\
  <circle cx='550' cy='250' r='40' fill='none' stroke='green' stroke-width='5'/>\
  <text x='550' y='250' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Dryer</text>\
  <text id='dryerPower' x='550' y='265' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Geschirrspüler (Blau) -->\
  <circle id='dishwasherCircle' cx='550' cy='400' r='45' fill='none' stroke='blue' stroke-width='10' opacity='0.4'/>\
  <circle cx='550' cy='400' r='40' fill='none' stroke='blue' stroke-width='5'/>\
  <text x='550' y='400' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'>Dishwasher</text>\
  <text id='dishwasherPower' x='550' y='415' font-family='Arial' font-size='12' fill='white' text-anchor='middle' alignment-baseline='middle'></text>\
\
  <!-- Verbindungslinien -->\
\
  <!-- Verbindungslinie von Batterie zu Haus (Lila) --> \
  <path id='batteryToHousePath' d='M 260 354 A 110 100 0 0 1 357 260' stroke='purple' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='purple'>\
    <animateMotion id='batteryToHouse' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#batteryToHousePath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Solar zu Haus (Orange) -->\
  <path id='solarToHousePath' d='M 260 145 A 110 100 0 0 0 357 240' stroke='orange' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='orange'>\
    <animateMotion id='solarToHouse' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#solarToHousePath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Solar zu Batterie (Orange) -->\
  <path id='solarToBatteryPath' d='M 250 145 A 0 100 0 0 1 250 354' stroke='orange' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='orange'>\
    <animateMotion id='solarToBattery' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#solarToBatteryPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Haus zu Lufttrockner (Blau) -->\
  <path id='houseToAirdryerPath' d='M 400 203 A 0 67 0 0 1 400 145' stroke='blue' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='blue'>\
    <animateMotion id='houseToAirdryer' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#houseToAirdryerPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Haus zu Kühlschrank (Gelb) -->\
  <path id='houseToFridgePath' d='M 400 298 A 0 67 0 0 1 400 354' stroke='yellow' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='yellow'>\
    <animateMotion id='houseToFridge' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#houseToFridgePath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Netz zu Kohlenstoffarm (Grün) -->\
  <path id='gridToLowCarbonPath' d='M 100 208 A 0 68 0 0 1 100 145' stroke='green' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='green'>\
    <animateMotion id='gridToLowCarbon' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#gridToLowCarbonPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Netz zu Haus (Blau) -->\
  <path id='gridToHousePath' d='M 146 250 H 357' stroke='blue' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='blue'>\
    <animateMotion id='gridToHouse' dur='3s' repeatCount='indefinite'>\
      <mpath href='#gridToHousePath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Haus zu Trockner (Green) -->\
  <path id='houseToDryerPath' d='M 446 250 A 0 0 0 0 1 505 250' stroke='green' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='green'>\
    <animateMotion id='houseToDryer' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#houseToDryerPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Haus zu Geschirrspüler (Blue) -->\
  <path id='houseToDishwasherPath' d='M 446 260 A 110 110 0 0 1 550 354' stroke='blue' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='blue'>\
    <animateMotion id='houseToDishwasher' dur='3s' repeatCount='indefinite'>\
      <mpath href='#houseToDishwasherPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Solar zu Netz (Orange) -->\
  <path id='solarToGridPath' d='M 240 145 A 110 100 0 0 1 146 240' stroke='orange' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='orange'>\
    <animateMotion id='solarToGrid' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#solarToGridPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Netz zu Batterie (Turkis) -->\
  <path id='gridToBatteryPath' d='M 146 260 A 110 100 0 0 1 240 354' stroke='turquoise' stroke-width='2' fill='transparent'/>\
  <circle id="gridToBatteryStatic" r='5' fill='turquoise' style="display:none;;" />\
  <circle id="gridToBatteryForward" r='5' fill='turquoise' style="display:none;;">\
    <animateMotion id='gridToBatteryForwardAnim' dur='3s' repeatCount='indefinite' keyPoints='0;;1' keyTimes='0;;1'>\
      <mpath href='#gridToBatteryPath'/>\
    </animateMotion>\
  </circle>\
  <circle id="gridToBatteryBackward" r='5' fill='turquoise' style="display:none;;">\
    <animateMotion id='gridToBatteryBackwardAnim' dur='3s' repeatCount='indefinite' keyPoints='1;;0' keyTimes='0;;1'>\
      <mpath href='#gridToBatteryPath'/>\
    </animateMotion>\
  </circle>\
\
  <!-- Verbindungslinie von Haus zu Waschmaschine (Gelb) -->\
  <path id='houseToWasherPath' d='M 550 145 A 110 100 0 0 1 446 240' stroke='yellow' stroke-width='2' fill='transparent'/>\
  <circle r='5' fill='yellow'>\
    <animateMotion id='houseToWasher' dur='3s' repeatCount='indefinite' keyPoints='1;;0' keyTimes='0;;1'>\
      <mpath href='#houseToWasherPath'/>\
    </animateMotion>\
  </circle>\
\
</svg>\
</div>\
</body>\
</html>\

setstate powerGrid 2024-10-29 20:57:56 airdryer_v 0
setstate powerGrid 2024-10-27 12:48:04 battery 235
setstate powerGrid 2024-10-29 21:05:59 batteryState_v stop
setstate powerGrid 2024-10-29 21:05:41 batteryToHouse_v off
setstate powerGrid 2024-10-29 17:35:22 battery_v 0
setstate powerGrid 2024-10-29 20:59:20 dishwasher_v 0
setstate powerGrid 2024-10-29 20:58:35 dryer_v 0
setstate powerGrid 2024-10-29 20:58:41 fridge_v 0
setstate powerGrid 2024-10-29 17:35:32 gridToBattery_v stop
setstate powerGrid 2024-10-29 18:13:45 gridToHouse_v on
setstate powerGrid 2024-10-29 17:25:37 gridToLowCarbon_v off
setstate powerGrid 2024-10-29 21:19:34 grid_v 2385
setstate powerGrid 2024-10-29 18:13:45 houseToAirdryer_v off
setstate powerGrid 2024-10-29 18:13:45 houseToDishwasher_v off
setstate powerGrid 2024-10-29 18:13:45 houseToDryer_v off
setstate powerGrid 2024-10-29 18:13:45 houseToFridge_v off
setstate powerGrid 2024-10-29 18:13:45 houseToWasher_v off
setstate powerGrid 2024-10-29 17:59:27 house_v 539
setstate powerGrid 2024-10-29 17:25:59 solarToBattery_v off
setstate powerGrid 2024-10-29 18:13:45 solarToGrid_v on
setstate powerGrid 2024-10-29 18:13:45 solarToHouse_v off
setstate powerGrid 2024-10-29 21:00:10 solar_v 1
setstate powerGrid 2024-10-29 20:58:18 washer_v 0



Tip: Prüfungen im JS, um allen Mist abzufangen sind noch nicht komplett umgesetzt. Bleiben Werte aus, einmal im powerGrid Dummy alle "set" durchschalten. Fehlt ein Reading, kommen keine Werte.


Gruß schwatter