# Created by FHEM/98_SVG.pm, 2024-05-21 20:15:29
set terminal png transparent size <SIZE> crop
set output '<OUT>.png'
set xdata time
set timefmt "%Y-%m-%d_%H:%M:%S"
set xlabel " "
set title '<L1>'
set ytics
set y2tics
set grid
set ylabel "SummeSolar"
set y2label "Temperature"
#FileLog_shellyAlle 2:SolarSumme.*::
#FileLog_shellyAlle 2:SolarSumme.\x3a::
plot "<IN>" using 1:2 axes x1y2 title 'Line 1' ls l0 lw 1 with lines,\
"<IN>" using 1:2 axes x1y1 title 'lllll' ls l2 lw 1 with lines
und ja die ehrfachen Einträge kommen noch aus verschiedenen versuchen. Einmal ein notify ohne filter:define SummeNeu notify shellySolarCarport450Ost {\
my $SolarP1=ReadingsVal("shellySolarTerrasse","power","0");;\
my $SolarP2=ReadingsVal("shellySolarCarport450Ost","power_0","0");;\
my $SolarP3=ReadingsVal("shellySolarCarport600W ","power_0","0");;\
my $SolarP4=ReadingsVal("shellySolarCarport600W ","power_1","0");;\
my $SolarSumme=$SolarP1+$SolarP2+$SolarP3+$SolarP4;;\
Log 5, "Wert ist: $SolarSumme";;\
fhem("set SolarSumme $SolarSumme");;\
}
einmal in den userreadings eines filelog:attr FileLog_shellySolarCarport450Ost userReadings my $SolarP1=ReadingsVal("shellySolarTerrasse","power","0");;;;\\
my $SolarP2=ReadingsVal("shellySolarCarport450Ost","power_0","0");;;;\\
my $SolarP3=ReadingsVal("shellySolarCarport600W ","power_0","0");;;;\\
my $SolarP4=ReadingsVal("shellySolarCarport600W ","power_1","0");;;;\\
my $SolarSumme=$SolarP1+$SolarP2+$SolarP3+$SolarP4;;;;\\
Log 5, "Wert ist: $SolarSumme";;;;\\
fhem("set SolarSumme $SolarSumme");;;;\
Aber so lange nichts im SVG steht dachte ich ich lasse es noch drin, und schaue später was am besten ist.####################################
# provided as mqtt2_layzspa.template by Tueftler1983
#Use this for the WLAN Module RelaxAndSpa for Bestway Lay Z Spar Wirlpools. The Wlan module ist Selled and #Supportet from Michael Krenner https://www.mk-innovations.de/smartandrelax-modul/
name:LayZSpa
filter:TYPE=MQTT2_DEVICE
par:BASE_TOPIC;base topic set in SmarAndRelax MQTT Konfiguration;{ AttrVal('DEVICE','readingList','') =~ m,([^:]+)/Status:, ? $1 : undef }
desc:Use this for the WiFi Module RelaxAndSpa for Bestway Lay Z Spar Wirlpools. The WiFi module ist selled and supportet by Michael Krenner https://www.mk-innovations.de/smartandrelax-modul/. Note: in case Client-ID and Basic-Topic include SPACE letters, you will have to change that fist in the settings of the WiFi module!
defmod DEVICE MQTT2_DEVICE Lay_Z_Spa_Module
attr DEVICE devStateIcon 2.on:water-heat@orange:heater+off\
2.off:water-heat@red:heater+on\
3.off:water-heat@red:heater+on\
3.on:water-heat@green:heater+off\
1.on:sani_domestic_waterworks@green:pump+off\
1.off:sani_domestic_waterworks@red:pump+on\
4.off:vent_ventilation_level_0@red:air+on\
4.on:vent_ventilation_level_3@green:air+off
attr DEVICE jsonMap TGT:desired-temp TMP:temperature FLT:pump AIR:air RED:heater GRN:hot UNT:unit AMB:ambiant-temp
attr DEVICE readingList BASE_TOPIC/button:.* button\
BASE_TOPIC/message:.* { $EVENT =~ s/"(FLT|AIR|RED|GRN)":1/"$1":"on"/g; $EVENT =~ s/"(FLT|AIR|RED|GRN)":0/"$1":"off"/g; $EVENT =~ s/"(UNT)":1/"$1":"Celsius"/g; $EVENT =~ s/"(UNT)":0/"$1":"Fahrenheit"/g; json2nameValue($EVENT,'',$JSONMAP) }\
BASE_TOPIC/times:.* { json2nameValue($EVENT, 'times_', $JSONMAP) }\
BASE_TOPIC/other:.* { json2nameValue($EVENT, 'other_', $JSONMAP) }\
BASE_TOPIC/Status:.* { $EVENT eq 'Alive' ? {LWT=>'online'} : {LWT=>'offline'} }\
BASE_TOPIC/MAC_Address:.* MAC_Address\
BASE_TOPIC/MQTT_Connect_Count:.* MQTT_Connect_Count\
BASE_TOPIC/reboot_time:.* reboot_time\
BASE_TOPIC/reboot_reason:.* reboot_reason
attr DEVICE room MQTT2_DEVICE
attr DEVICE setList pump:on,off { my $on = $EVTPART1 eq 'on'?1:0; qq(BASE_TOPIC/command { "CMD":4, "VALUE":$on, "XTIME":0, "INTERVAL":0 }) }\
desired-temp:slider,20,1,40 BASE_TOPIC/command {CMD:0,VALUE:$EVTPART1,XTIME:0,INTERVAL:0}\
air:on,off { my $on = $EVTPART1 eq 'on'?1:0; qq(BASE_TOPIC/command { "CMD":2, "VALUE":$on, "XTIME":0, "INTERVAL":0 }) }\
unit:Celsius,Fahrenheit { my $Celsius = $EVTPART1 eq 'Celsius'?1:0; qq(BASE_TOPIC/command { "CMD":1, "VALUE":$Celsius, "XTIME":0, "INTERVAL":0 }) }\
heater:on,off { my $on = $EVTPART1 eq 'on'?1:0; qq(BASE_TOPIC/command { "CMD":3, "VALUE":$on, "XTIME":0, "INTERVAL":0 }) }\
reset_chlorid BASE_TOPIC/command {CMD:9,VALUE:,XTIME:0,INTERVAL:0}\
reset_filter BASE_TOPIC/command {CMD:10,VALUE:,XTIME:0,INTERVAL:0}
attr DEVICE stateFormat 1:pump\
2:heater\
3:hot\
4:air\
temperature Grad C\
<br>\
Letzter Filter Wechsel last_filter_change Tage\
<br>\
Letzte Chlorung last_add_chlorid Tage
attr DEVICE userReadings last_add_chlorid:times_CLTIME.* {return int((time()-ReadingsVal($name, 'times_CLTIME', 0))/DAYSECONDS);}, last_filter_change:times_FTIME.* {return int((time()-ReadingsVal($name, 'times_FTIME', 0))/DAYSECONDS);}
attr DEVICE webCmd desired-temp:reset_filter:reset_chlorid
Zitat von: ch.eick am 23 Mai 2024, 13:05:47Ist es denn nur die sub FUNC_batt(), oder war da noch mehr? Ich hatte da ja auch noch im uiTable etwas von Dir übernommen.
Edit: Mit Deiner Änderung ist jetzt jedoch die Überlagerung mit dem Hintergrund weg und die Batterie wird nur als Farbverlauf bis zum Ende angezeigt, obwohl sie noch nicht voll ist.
Das könnte an der berechneten Startposition liegen, die Du wohl auf 0px gesetzt hast.
<div style='border-width:2px;border-style:solid;border-color:gray;position:relative;width:90px;height:20px;padding:0px 0px;display:inline-block;background:transparent;'>".STY(" ",FUNC_batt([$SELF:SpeicherMaxSOC_Actual])).STY("geplant","font-size:12px;position:absolute;top:3px;left:25px")."</div><br>".widget([$SELF:SpeicherMaxSOC_Actual],"selectnumbers,5,1,100,0,lin")."%"
ZitatWie hast das gemacht die zwei \ (newline) da hinzubekommen ? Über den "Raw-Editor" ?Ok, alles klar; ich hatte von Hand im Editor des WebEnds die BackSlashes eingegeben. Jetzt habe ich sie mal weggemacht - und jetzt stimmt das Bild.
Zitat von: appi am 23 Mai 2024, 19:12:34nur für's Verständnis...ohne Doku-Verweise kann zumindest ich mir nichts darunter vorstellen, und ich bleibe auch dabei, dass der JSON eigentlich "kaputt" ist, der so erzeugt wird...
- Ich betreibe Fhem in meinem Wohnmobil auf einem Teltonika RUTX11
- auf dem Router RUTX11 läuft auch der MQTT Broker
- für die Aussen-Klima Werte nutze ich einen BLE Puk auch von Teltonika dessen Daten vom RUTX11 empfangen werden und via MQTT Brocker an Fhem weitergeben werden
- GPS Daten kommen auch vom RUTX11 und per MQTT an Fhem
- etc, etc
Zitat von: appi am 23 Mai 2024, 19:04:57top,hätte ich nie hingekriegt, besten DankDanke zurück für die Rückmeldung, aber sag niemals "nie"...
readingList Womo/Eye_1:.* { my $ret=json2nameValue($EVENT); for ( my $okey keys %{$ret} {if ($okey =~ m{_data}) { my $ret2=json2nameValue($ret->{$okey},"${okey}_data_"); delete $ret->{$okey}; for ( keys %{$ret2} ) { $ret->{$_}=$ret2->{$_};}}} return $ret }
Zitat von: Beta-User am 23 Mai 2024, 14:25:24Den Zusammenhang zwischen DOIF und MQTT_GENERIC_BRIDGE (MGB) verstehe ich nicht so ganz...Wenn ich die MQTT_GENERIC_BRIDGE richtig verstanden habe, dann kann ich jedes Device um MQTT erweitern. Mit einem doif kann man sehr gut Timer erstellen, die dann das Senden des Status übernehmen.
Zitat von: Beta-User am 23 Mai 2024, 14:25:24oder (per periodicCmd) auch direkt in einem MQTT2_DEVICEDas ist natürlich auch spannend. In meinem Fall würde das ja vermutlich ausreichen...allerdings könnte die Minute schon knapp werden. Dann sollte das auch alles mit einem MQTT2_Device machbar sein.
Zitat von: DS_Starter am 23 Mai 2024, 20:06:19Hallo Jörg,
setze die das Attr showStmInfoFull=1 ->
zusaätzliche Streaminformationen wie LiveStreamUrl, StmKeyUnicst, StmKeymjpegHttp werden ausgegeben
Grüße,
Heiko