Zitat von: Prof. Dr. Peter Henning am 22 Mai 2024, 17:27:56Und klar: @fichtennadel ==> Account beantragen, contrib-Ordner erstellen.
attr Wally_c set49Name pGrid_pPV_pAkku
attr Wally_c set49TextArg 1
attr Wally_c set49URL http://%goeIP%/api/set?ids=$val
attr Wally_c devStateIcon {\
my $state = ReadingsVal($name, "state", "disabled");;\
my $devStateIcon_ready = 'electric_car_charger';;\
my $devStateIcon_car = 'electric_car_icon';;\
my $devStateIcon = 'electric_car_charger';; \
\
if ($state eq "disabled") {\
$devStateIcon = "$devStateIcon_ready\@darkgrey";;\
} elsif ($state eq "not_allowed") {\
$devStateIcon = "$devStateIcon_ready\@white";;\
} elsif ($state eq "ready_no_car") {\
$devStateIcon = "$devStateIcon_ready\@blue";;\
} elsif ($state eq "charging") {\
$devStateIcon = "$devStateIcon_car\@darkorange";;\
} elsif ($state eq "waiting_for_car") {\
$devStateIcon = "$devStateIcon_car\@pink";;\
} elsif ($state eq "finished") {\
$devStateIcon = "$devStateIcon_car\@lime";;\
} elsif ($state eq "error") {\
$devStateIcon = "$devStateIcon_ready\@red";;\
} \
\
"<div>" . sprintf("%.1fkW ; ;", ReadingsVal($name,"power",0)/1000) \
. FW_makeImage($devStateIcon) . \
"</div>"\
}
defmod DI.Wallbox.PV DOIF (([$SELF:modus] eq "PV") and ([$SELF:state] ne "PV")) (\
(set Wally_c a_setAutoPvCharging)\
\
) DOELSEIF (([$SELF:modus] eq "NetzTarif") and ([$SELF:state] ne "NetzTarif")) (\
(set Wally_c a_setManualCharging)\
\
## direkt stoppen oder starten\
,{if ("[DI.SmartMeterTarif]" eq "Freizeittarif") {\
fhem("setreading $SELF Log start NetzTarif direkt");;\
fhem("set Wally_c forceState on")\
} else {\
fhem("setreading $SELF Log stop NetzTarif direkt");;\
fhem("set Wally_c forceState off")\
}\
}\
\
) DOELSEIF (([$SELF:modus] eq "PV") and ([+5]) and ([?Wally_c:car_num:d] > 1) and ([?wechselrichter:PowerFlow_Site_P_PV:d] > 0)) (\
{( fhem("set Wally_c pGrid_pPV_pAkku ".sprintf("{\"pGrid\":%.1f,\"pPv\":%.1f,\"pAkku\":0.0}"\
,[wechselrichter:PowerFlow_Site_P_Grid]\
,[wechselrichter:PowerFlow_Site_P_PV]\
) \
) \
)}\
\
) DOELSEIF (([$SELF:modus] eq "NetzTarif") and ([DI.SmartMeterTarif] eq "Freizeittarif")) (\
(set Wally_c forceState on)\
\
) DOELSEIF (([$SELF:modus] eq "NetzTarif") and ([DI.SmartMeterTarif] ne "Freizeittarif")) (\
(set Wally_c forceState off)\
\
) DOELSEIF (([$SELF:modus] eq "Laden")) (\
(set Wally_c a_setManualCharging)\
,(set Wally_c forceState on)\
\
) DOELSEIF (([$SELF:modus] eq "Idle")) (\
(set Wally_c a_setDefaultCharging)\
\
)
attr DI.Wallbox.PV alias Wallbox Steuerung
attr DI.Wallbox.PV checkall event
attr DI.Wallbox.PV cmdState initPV|initNetzTarif|PV|NetzTarif|NetzKeinTarif|Laden|Idle
attr DI.Wallbox.PV devStateIcon initPV:electric_car_charger@orange initNetzTarif:electric_car_charger@red PV:electric_car_charger@yellow NetzTarif:electric_car_charger@green NetzKeinTarif:electric_car_charger@greeen Laden:electric_car_charger@green Idle:electric_car_charger@gray
attr DI.Wallbox.PV do always
attr DI.Wallbox.PV event-on-change-reading .*
attr DI.Wallbox.PV readingList modus
attr DI.Wallbox.PV setList modus:uzsuSelectRadio,PV,NetzTarif,Laden,Idle
attr DI.Wallbox.PV webCmd modus
Zitat von: misux am 24 Mai 2024, 22:33:38Oha das wollte ich so eigentlich nicht hören... Verdammt! Das ist die irgendwie beste Methode die Anwesenheit zu erkennen...Bei dem Tonfall sicher nicht. Selbst ist der Mann...
Mist, gibt es denn keine Möglichkeit da mal nachzuschauen? Kann das einer? Hat da einer Lust und Zeit zu?
List of known contacts:
Number |Name |Blocked
+4917623xxxxxx |Protocol::DBus::Type::Array=ARRAY(0x698bd70)|no
...
Zitat von: RalfRog am 25 Mai 2024, 19:53:36Du hast ja nicht besonders viel Informationen mitgegeben.
Mehr Hilfe wäre ggfs. möglich wenn es ein list des statistics-Devices "haus.strom" und des MQTT-Devcices "haus.stromzaehler" bei dem die stat-Werte stehen sollen gäbe.
ZitatFür welches Device willst du denn die Werte haben? Für "haus.stromzaehler" oder "MQTT2_Stromkasten"?
ZitatZum zweiten Punkt:Für welches Device willst du denn die Werte haben? Für "haus.stromzaehler" oder "MQTT2_Stromkasten"?
Ja, das ist in der Tat aber wirklich so. Ich habe (meines Wissens nach) nichts weiter gemacht wie oben beschrieben.