logProxy modul zum manipulieren und ergänzen von SVG plots

Begonnen von justme1968, 26 August 2014, 22:47:55

Vorheriges Thema - Nächstes Thema

justme1968

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

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

daschauher

#121
servus andre,

ich würde gerne dein beispiel mit dem polar system bei mir übernehmen.
anstelle der max thermotate habe ich welche von homematic.
irgendwie stelle ich mich zu dumm an. bin schon am verzweifeln, hab auch schon vieles ausprobiert aber bekomme es einfach nicht hin. ich erhalte immer ein leeres plot fenster.
wäre über einen tip was ich alles anpassen muß sehr dankbar.

viele grüße markus

p.s.: hier noch meine config:

define MyLogProxy logProxy
define Klima_Log_Test SVG MyLogProxy:SVG_Klima_Log_Test:CURRENT
attr Klima_Log_Test plotsize 340,400
attr Klima_Log_Test room BAD,Plot,Obergeschoss,Erdgeschoss,Wetter



set xtics ()
set ytics ()
set y2tics ()

set xrange [-40:40]
set yrange [-40:40]

#logProxy Polar::{[map{ReadingsVal($_,"measured-temp",0)} devspec2array("BAD_Thermostat_Climate.*")]}
#logProxy Polar::{[map{ReadingsVal($_,"desired-temp",0)}devspec2array("BAD_Thermostat_Climate.*")]}
#logProxy Polar::{[map{ReadingsVal($_,"measured-temp",0)}devspec2array("BAD_Thermostat_Climate.*")]}
#logProxy Polar::{[devspec2array("BAD_Thermostat_Climate.*")]}

plot "<IN>" using 1:2 axes x1y1 title 'Ist' ls l0 lw 1 with lines,\
plot "<IN>" using 1:2 axes x1y1 title 'Soll' ls l1fill lw 1 with lines,\
plot "<IN>" using 1:2 axes x1y1 notitle ls l0 lw 1 with points,\
plot "<IN>" using 1:2 axes x1y1 notitle  ls l2 lw 1 with lines,\

justme1968

du musst jeweils die reading namen anpassen (desired-temp statt desiredTemperature und measured-temp statt temperature) und den devspec2array ausdruck so das alle deine thermostate gefunden werden (eventuell .*Climate statt MAX_0d.*).

letzteres kannst du einfach mit einen list in fhem testen.

je nach dem wie deine devices heissen z.b. list *.Climate

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

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

daschauher

soweit war ich auch schon mal. die anzeige sieht aber ganz anders aus als auf deinem screenshot. auch die beschriftung der geräte namen, sollte diese automatisch da sein?

justme1968

das ist doch schon mal mehr als nur ein weisser plot.

ich wollte gerade antworten da fehlt vermutlich vor allem die definition für die achsen skalieren und beschriftung im plot file:set xtics ()
set ytics ()
set y2tics ()

set xrange [-60:60]
set yrange [-60:60]


aber du hast ja inzwischen noch deine config angehängt.

welche version hat dein SVG und logProxy modul?

was bekommst du als ausgabe wenn du jeweils eine der folgenden zeilen im telnet fenster eingibst?
{Dumper [map{ReadingsVal($_,"measured-temp",0)} devspec2array("BAD_Thermostat_Climate.*")]}
{Dumper [map{ReadingsVal($_,"desired-temp",0)}devspec2array("BAD_Thermostat_Climate.*")]}
{Dumper [devspec2array("BAD_Thermostat_Climate.*")]}



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

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

daschauher

ich glaube die ausgabe könnte passen:
$VAR1 = [
          '20.5'
        ];


Zitatda fehlt vermutlich vor allem die definition für die achsen skalieren und beschriftung im plot file
dass vermute ich auch. dann fehlt es ja gar nicht so weit :)
und wie setze ich die definition und die beschriftung?

justme1968

#126
der wert ist zwar richtig aber da muss mehr als einer stehen. für ein device macht der plot keinen sinn. der ausdruck den du angibst muss alle devices erwischen. nicht nur eins. also so etwas: *.Climate

bitte poste die ausgabe für alle drei zeilen.

was gibt ein list .*Climate?


du hast beides schon gesetzt. deshalb die frage nach den versionen.
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

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

daschauher

BAD_Thermostat_Climate.* habe ich bereits durch .*Climate ersetzt.

list *.Climate ergibt:
No device named *.Climate found
{Dumper [map{ReadingsVal($_,"measured-temp",0)} devspec2array(".*Climate")]}
$VAR1 = [
          '20.4',
          '18.8',
          '20.0',
          '19.4',
          '18.0',
          '20.2',
          '16.3',
          '20.0',
          '17.1',
          '18.1',
          '16.9',
          '18.3',
          '19.1'
        ];

{Dumper [map{ReadingsVal($_,"desired-temp",0)}devspec2array(".*Climate")]}
$VAR1 = [
          '20.0',
          '18.5',
          '20.0',
          '18.5',
          '18.0',
          '19.0',
          '14.5',
          '14.5',
          '17.0',
          '18.0',
          '17.0',
          '18.5',
          '19.0'
        ];

{Dumper [devspec2array(".*Climate")]}
$VAR1 = [
          'BAD_Thermostat_Climate',
          'EG_Thermostat_WC_Climate',
          'EG_Thermostat_Wohnzimmer_Climate',
          'FL_Thermostat_EG_Climate',
          'FL_Thermostat_KG_Climate',
          'FL_Thermostat_OG_Climate',
          'KG_Thermostat_Gefrierschrank_Climate',
          'KG_Thermostat_Heizung_Climate',
          'KG_Thermostat_Hobby_Climate',
          'KG_Thermostat_PC_Climate',
          'KG_Thermostat_Werkstatt_Climate',
          'SZ_Thermostat_Ki_Nord_Climate',
          'SZ_Thermostat_Ki_Sud_Climate'
        ];

justme1968

das schaut alles gut aus.

eigentlich sollte es gehen.

welche versionen haben das logProxy und das SVG modul ?
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

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

daschauher

fhem ist auf dem neuesten stand.

# $Id: 98_SVG.pm 7075 2014-11-27 20:59:58Z rudolfkoenig $
# $Id: 98_logProxy.pm 7063 2014-11-25 13:31:34Z justme1968 $

sind das die richtigen infos?

justme1968

ja. genau. eigentlich schaut alles gut aus.

bitte häng noch mal dein gplot file hier an.

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

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

daschauher

brauch ich vielleicht irgendwelche speziellen dateien?
ich benutze ein 64 bit ubuntu als fhem server. aber sonst läuft auch alles einwandfrei.

set xtics ()
set ytics ()
set y2tics ()
set xrange [-40:40]
set yrange [-40:40]

#logProxy Polar::{[map{ReadingsVal($_,"measured-temp",0)} devspec2array(".*Climate")]}
#logProxy Polar::{[map{ReadingsVal($_,"desired-temp",0)}devspec2array(".*Climate")]}
#logProxy Polar::{[map{ReadingsVal($_,"measured-temp",0)}devspec2array(".*Climate")]}
#logProxy Polar::{[devspec2array(".*Climate")]}

plot "<IN>" using 1:2 axes x1y1 title 'Ist' ls l0 lw 1 with lines,\
plot "<IN>" using 1:2 axes x1y1 title 'Soll' ls l1fill lw 1 with lines,\
plot "<IN>" using 1:2 axes x1y1 notitle ls l0 lw 1 with points,\
plot "<IN>" using 1:2 axes x1y1 notitle  ls l2 lw 1 with lines,\

justme1968

#132
bitte füge mal die folgende zeile noch am anfang des gplot files ein:

set terminal png transparent size <SIZE> crop

und häng mal wirklich das gplot file als file hier an.

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

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

daschauher

das anhängen von
set terminal png transparent size <SIZE> crop
hat nichts geändert, die datei liegt bei.

gruß
markus

justme1968

bitte nimm mal das angehängte plot file und diese definition:define wl_Klima SVG MyLogProxy:SVG_Klima_Log_Test:CURRENT
attr wl_Klima plotsize 440,400
attr wl_Klima room lp


wie schaut es damit bei dir aus?
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

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