(gelöst) Im Plot einen Alarm bzw. Grenzwert eintragen?

Begonnen von Burny4600, 08 Oktober 2015, 20:39:08

Vorheriges Thema - Nächstes Thema

Burny4600

Ich möchte bei einem Plot eine Linie als Grenzwert eintragen, oder noch besser einen Alarmwert in einem Plot als Linie eintragen.

Wie kann ich einen Alarmwert generieren wenn der Messwert einen Grenzwert überschreitet?
LG Chris

Raspberry Pi 2-5, Bullseye Lite, Bookworm Lite
Schnittstellen: 1-Wire, FHEM2FEHEM, HM-MOD-UART, LAN, Modbus, MQTT, nanoCUL, RFXtrx433E, SIGNALduino, ser2net
Devices: APC, Eastron, FS20, IT, Homematic, MQTT, PV-(DEYE, EPEVER, FRONIUS), Resol-VBUS, S.USV, TEK603, WMR200, YouLess

justme1968

schau dir mal logProxy an. damit kannst du unter anderem beliebige zusätzliche linien in einen plot einzeichnen.

beispiele im wiki.

gruss
  andre
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968

Burny4600

Danke für die Info:

Blicke aber noch nicht ganz durch.

Habe einen Plot der lautet:
define FileLog_TEK603_RUL FileLog /media/hdd/fhem/log/TEK603_RUL-%Y-%m.log TEK603:RemainingUsableLevel:.*|TEK603_RUL
attr FileLog_TEK603_RUL room _LOG
define SVG_FileLog_TEK603_RUL SVG FileLog_TEK603_RUL:SVG_FileLog_TEK603_RUL:CURRENT
attr SVG_FileLog_TEK603_RUL label "TEK603_RUL Min $data{min1}, Max $data{max1}, Last $data{currval1}"
attr SVG_FileLog_TEK603_RUL room Wetterstation

Zu diesem möchte ich einen Grenzwert definieren.
define lp logProxy muß ich hier schon die Zuweisung zu TEK603_RUL machen?
define lp_TEK603_RUL logProxy

Nur hier stehe ich schon an weil ich das noch nicht behirnt habe, wie ich hier einen Bezug schaffe um einen Grenzwert als horzontale Linie definiere.
#logProxy DbLog:dbLog:s300ht:temperature::
#logProxy ConstY:0

plot "<IN>" using 1:2 axes x1y1 title 'temp' ls l1 lw 1 with steps,\
      "<IN>" using 1:2 axes x1y1 ls l5 lw 1 with lines,\
LG Chris

Raspberry Pi 2-5, Bullseye Lite, Bookworm Lite
Schnittstellen: 1-Wire, FHEM2FEHEM, HM-MOD-UART, LAN, Modbus, MQTT, nanoCUL, RFXtrx433E, SIGNALduino, ser2net
Devices: APC, Eastron, FS20, IT, Homematic, MQTT, PV-(DEYE, EPEVER, FRONIUS), Resol-VBUS, S.USV, TEK603, WMR200, YouLess

justme1968

nur define lp logProxy. es gibt keine zuordnung zum device.

du musst die #FileLog zeile in deinem plotfile so ändern wie im wiki beschrieben und dann kannst du mit #logProxy ConstY:... horizontale linien hinzufügen.

was genau ist nicht klar?

gruss
  andre
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968

Burny4600

Sorry.
Aber irgendwie steh ich auf dem Schlauch und es wird nichts angezeigt.

define lp logProxy wurde ausgeführt.

Wie muß ich das bei diesem Beispiel wirklich ausführen, dass ich eine horizontale Linie bei zb. 1650 einfüge.
Original Definition:
Zitatdefine FileLog_TEK603_RUL FileLog /media/hdd/fhem/log/TEK603_RUL-%Y-%m.log TEK603:RemainingUsableLevel:.*|TEK603_RUL
attr FileLog_TEK603_RUL room _LOG
define SVG_FileLog_TEK603_RUL SVG FileLog_TEK603_RUL:SVG_FileLog_TEK603_RUL:CURRENT
attr SVG_FileLog_TEK603_RUL label "TEK603_RUL Min $data{min1}, Max $data{max1}, Last $data{currval1}"
attr SVG_FileLog_TEK603_RUL room Wetterstation

Geändert:
Zitatdefine FileLog_TEK603_RUL FileLog /media/hdd/fhem/log/TEK603_RUL-%Y-%m.log TEK603:RemainingUsableLevel:.*|TEK603_RUL
attr FileLog_TEK603_RUL room _LOG
define SVG_FileLog_TEK603_RUL SVG lp:SVG_FileLog_TEK603_RUL:CURRENT
attr SVG_FileLog_TEK603_RUL label "TEK603_RUL Min $data{min1}, Max $data{max1}, Last $data{currval1}"
attr SVG_FileLog_TEK603_RUL room Wetterstation
#logProxy ConstY:SVG_FileLog_TEK603_RUL(1650)
LG Chris

Raspberry Pi 2-5, Bullseye Lite, Bookworm Lite
Schnittstellen: 1-Wire, FHEM2FEHEM, HM-MOD-UART, LAN, Modbus, MQTT, nanoCUL, RFXtrx433E, SIGNALduino, ser2net
Devices: APC, Eastron, FS20, IT, Homematic, MQTT, PV-(DEYE, EPEVER, FRONIUS), Resol-VBUS, S.USV, TEK603, WMR200, YouLess

justme1968

du musst noch das plotfile anpassen so wie im wiki beschrieben. die #logProxy ConstY:... zeile gehört auch ins plot file.

gruss
  andre
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968

Burny4600

LG Chris

Raspberry Pi 2-5, Bullseye Lite, Bookworm Lite
Schnittstellen: 1-Wire, FHEM2FEHEM, HM-MOD-UART, LAN, Modbus, MQTT, nanoCUL, RFXtrx433E, SIGNALduino, ser2net
Devices: APC, Eastron, FS20, IT, Homematic, MQTT, PV-(DEYE, EPEVER, FRONIUS), Resol-VBUS, S.USV, TEK603, WMR200, YouLess

justme1968

hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968

Burny4600

Was meinst du mit zeigen.
Habe doch oben schon die Definition der Plotfiles gemacht.
LG Chris

Raspberry Pi 2-5, Bullseye Lite, Bookworm Lite
Schnittstellen: 1-Wire, FHEM2FEHEM, HM-MOD-UART, LAN, Modbus, MQTT, nanoCUL, RFXtrx433E, SIGNALduino, ser2net
Devices: APC, Eastron, FS20, IT, Homematic, MQTT, PV-(DEYE, EPEVER, FRONIUS), Resol-VBUS, S.USV, TEK603, WMR200, YouLess

justme1968

du hast die definition des SVG device in FHEM gezeigt.

das ist nicht das plotfile das du z.b. mit dem ploteditor anlegen kannst.

die #logProxy zeile gehört nicht ins fhem.cfg file und du solltest dieses auch nicht von hand editieren.
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968

Burny4600

LG Chris

Raspberry Pi 2-5, Bullseye Lite, Bookworm Lite
Schnittstellen: 1-Wire, FHEM2FEHEM, HM-MOD-UART, LAN, Modbus, MQTT, nanoCUL, RFXtrx433E, SIGNALduino, ser2net
Devices: APC, Eastron, FS20, IT, Homematic, MQTT, PV-(DEYE, EPEVER, FRONIUS), Resol-VBUS, S.USV, TEK603, WMR200, YouLess


Burny4600

#12
Das funktioniert nicht wirklich.

Habe das bestehende GPlot angepasst.
Standart Plot
Zitat# Created by FHEM/98_SVG.pm, 2015-10-12 09:40:34
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 'Mühlbach Wasserstand'
set ytics
set y2tics
set grid ytics
set ylabel ""
set y2label ""
set yrange [1200:]

#FileLog_TEK603_TUC 4:TEK603.TotalUsableCapacity\x3a:50:
#FileLog_TEK603_RUL 4:TEK603.RemainingUsableLevel\x3a:50:

plot "<IN>" using 1:2 axes x1y2 title 'Mssbereich (cm)' ls l0 lw 1 with lines,\
     "<IN>" using 1:2 axes x1y2 title 'Niveau (cm)' ls l2fill lw 1 with lines
Änderung auf logProxy
Zitat# Created by FHEM/98_SVG.pm, 2015-10-12 09:40:34
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 'Mühlbach Wasserstand'
set ytics
set y2tics
set grid ytics
set ylabel ""
set y2label ""
set yrange [1200:]

#logProxy FileLog:FileLog_TEK603_TUC:4:TEK603.TotalUsableCapacity\x3a:50:
#logProxy FileLog:FileLog_TEK603_RUL:4:TEK603.RemainingUsableLevel\x3a:50:
#logProxy ConstY:1530

plot "<IN>" using 1:2 axes x1y2 title 'Messbereich (cm)' ls l0 lw 1 with lines,\
     "<IN>" using 1:2 axes x1y2 title 'Niveau (cm)' ls l2fill lw 1 with lines

Aber jetzt wird gar nichts mehr angezeigt.
Wo ist der Fehler?
LG Chris

Raspberry Pi 2-5, Bullseye Lite, Bookworm Lite
Schnittstellen: 1-Wire, FHEM2FEHEM, HM-MOD-UART, LAN, Modbus, MQTT, nanoCUL, RFXtrx433E, SIGNALduino, ser2net
Devices: APC, Eastron, FS20, IT, Homematic, MQTT, PV-(DEYE, EPEVER, FRONIUS), Resol-VBUS, S.USV, TEK603, WMR200, YouLess

Burny4600

Die Angaben im Wiki für LogProxy können so nicht stimmen.

Ich habe es in der Form zur Ansicht jetzt gebracht, stimmt aber mit den Vorgaben nicht zusammen.
Zitat
define lp logProxy
define FileLog_TEK603_RUL FileLog /media/hdd/fhem/log/TEK603_RUL-%Y-%m.log TEK603:RemainingUsableLevel:.*|TEK603_RUL
attr FileLog_TEK603_RUL room _LOG
define SVG_FileLog_TEK603_RUL SVG lp:SVG_FileLog_TEK603_RUL:CURRENT
attr SVG_FileLog_TEK603_RUL room Wetterstation

SVG_FileLog_TEK603_RUL.gplot
Zitat# Created by FHEM/98_SVG.pm, 2015-10-13 10:50:50
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 'Mühlbach Wasserstand'
set ytics
set y2tics
set grid ytics
set ylabel ""
set y2label ""
set yrange [1200:1600]
set y2range [1200:1600]

#lp ConstY:1530
#lp FileLog:FileLog_TEK603_RUL:4:TEK603.RemainingUsableLevel\x3a::
#lp ConstY:1390

plot "<IN>" using 1:2 axes x1y1 title 'Maximale Höhe (cm)' ls l0 lw 1 with lines,\
     "<IN>" using 1:2 axes x1y1 title 'Niveau (cm)' ls l2fill lw 1 with lines,\
     "<IN>" using 1:2 axes x1y1 title 'Normale Höhe (cm)' ls l1 lw 1 with lines

Und warum muß ich im gplot#lp eintragen anstatt #LogProxy das es funktioniert?

Irgendwo ist hier ein Fehler, entweder in der Beschreibung oder bei der Anlage.
LG Chris

Raspberry Pi 2-5, Bullseye Lite, Bookworm Lite
Schnittstellen: 1-Wire, FHEM2FEHEM, HM-MOD-UART, LAN, Modbus, MQTT, nanoCUL, RFXtrx433E, SIGNALduino, ser2net
Devices: APC, Eastron, FS20, IT, Homematic, MQTT, PV-(DEYE, EPEVER, FRONIUS), Resol-VBUS, S.USV, TEK603, WMR200, YouLess

justme1968

die einträge im wiki sind ziemlich sicher richtig. sie sind aus funktionieren plots raus kopiert und haben schon mehr als einem anwedenr als vorlage gedient.

wo stimmt etwas nicht zusammen ?

#logProxy nicht #LogProxy. inzwischen ist es möglich statt der #FileLog,#DbLog und #logProxy schlüsselworte auch den namen des fhem device anzugeben.

gruss
  andre
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968