[FHZ] 98_autocreate.pm

Begonnen von Guest, 04 Januar 2010, 21:10:05

Vorheriges Thema - Nächstes Thema

Guest

Originally posted by: <email address deleted>

WTF?

my %flogpar = (
   "CUL_EM:.*"      => { GPLOT => "cul_em:Power,", FILTER => "%NAME:CNT:.*" },
   "CUL_WS:.*"      => { GPLOT => "hms:Temp/Hum,",  FILTER => "%NAME" },
   "FHTTK:.*"       => { GPLOT => "fht80tf:Window,", FILTER => "%NAME" },
   "FHT:.*"         => { GPLOT => "fht:Temp/Act,", FILTER => "%NAME" },
   "HMS:HMS100TFK"  => { GPLOT => "fht80tf:Contact,", FILTER => "%NAME" },
   "HMS:HMS100T.*"  => { GPLOT => "hms:Temp/Hum,", FILTER => "%NAME:T:.*" },
   "KS300:.*"       => { GPLOT => "ks300:Temp/Rain,ks300_2:Wind/Hum,",
                                                  FILTER => "%NAME:T:.*" },
);

2010.01.04 20:57:21 1: CUL_WS UNDEFINED temp/hum sensor detected, code 7
2010.01.04 20:57:21 2: autocreate: define CUL_WS_7 CUL_WS 7
2010.01.04 20:57:21 2: autocreate: define FileLog_CUL_WS_7 FileLog /var/log/fhem/CUL_WS_7-%Y.log CUL_WS_7
2010.01.04 20:57:21 2: autocreate: define weblink_CUL_WS_7 weblink fileplot FileLog_CUL_WS_7:cul_ws:CURRENT

Wo hat das $CENSORED auf einmal "cul_ws" her?!

2010.01.04 20:57:40 3: FHT Unknown device 3202, please define it
2010.01.04 20:57:40 2: autocreate: define FHT_3202 FHT 3202
2010.01.04 20:57:40 2: autocreate: define FileLog_FHT_3202 FileLog /var/log/fhem/FHT_3202-%Y.log FHT_3202
2010.01.04 20:57:40 2: autocreate: define weblink_FHT_3202 weblink fileplot FileLog_FHT_3202:fht:CURRENT
2010.01.04 20:58:04 3: FHTTK Unknown device 124ab2, please define it
2010.01.04 20:58:04 2: autocreate: define CUL_FHTTK_124ab2 CUL_FHTTK 124ab2
2010.01.04 20:58:04 2: autocreate: define FileLog_CUL_FHTTK_124ab2 FileLog /var/log/fhem/CUL_FHTTK_124ab2-%Y.log CUL_FHTTK_124ab2

Warum wird für CUL_FHTTK_124ab2 kein weblink erzeugt?! (Ja, ich habe die
entspr. .gplot erzeugt.)

2010.01.04 21:03:09 3: Unknown HMS device 1004/3bc9, please define it
2010.01.04 21:03:09 2: autocreate: define HMS100TFK_3bc9 HMS 3bc9
2010.01.04 21:03:09 2: autocreate: define FileLog_HMS100TFK_3bc9 FileLog /var/log/fhem/HMS100TFK_3bc9-%Y.log HMS100TFK_3bc9:T:.*
2010.01.04 21:03:09 2: autocreate: define weblink_HMS100TFK_3bc9 weblink fileplot FileLog_HMS100TFK_3bc9:hms:CURRENT
2010.01.04 21:03:18 3: Unknown HMS device 1000/dbf6, please define it
2010.01.04 21:03:18 2: autocreate: define HMS100TF_dbf6 HMS dbf6
2010.01.04 21:03:18 2: autocreate: define FileLog_HMS100TF_dbf6 FileLog /var/log/fhem/HMS100TF_dbf6-%Y.log HMS100TF_dbf6:T:.*
2010.01.04 21:03:18 2: autocreate: define weblink_HMS100TF_dbf6 weblink fileplot FileLog_HMS100TF_dbf6:hms:CURRENT

Wie definiere ich das korrekt im Kontext der autocreate_Notify()-Logik? Mit
HMS100TF\$ wird HMS100TFK gar nicht beachtet; aber ein T (gibt's das über-
haupt) würde ebenso rausfallen?
         kai

--

You received this message because you are subscribed to the Google Groups "FHEM users" group.
To post to this group, send email to fhem-users@googlegroups.com.
To unsubscribe from this group, send email to fhem-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/fhem-users?hl=en.

Guest

Originally posted by: <email address deleted>

Hmm ...

> 2010.01.04 20:57:40 3: FHT Unknown device 3202, please define it
> 2010.01.04 20:57:40 2: autocreate: define FHT_3202 FHT 3202
> 2010.01.04 20:57:40 2: autocreate: define FileLog_FHT_3202 FileLog /var/log/fhem/FHT_3202-%Y.log FHT_3202
> 2010.01.04 20:57:40 2: autocreate: define weblink_FHT_3202 weblink fileplot FileLog_FHT_3202:fht:CURRENT
> 2010.01.04 20:58:04 3: FHTTK Unknown device 124ab2, please define it
> 2010.01.04 20:58:04 2: autocreate: define CUL_FHTTK_124ab2 CUL_FHTTK 124ab2
> 2010.01.04 20:58:04 2: autocreate: define FileLog_CUL_FHTTK_124ab2 FileLog /var/log/fhem/CUL_FHTTK_124ab2-%Y.log CUL_FHTTK_124ab2
>
> Warum wird für CUL_FHTTK_124ab2 kein weblink erzeugt?! (Ja, ich habe die
> entspr. .gplot erzeugt.)

Weil CUL_FHTTK != FHTTK, ok ... Details ;)

2010.01.04 21:46:43 3: FHTTK Unknown device 965ab0, please define it
2010.01.04 21:46:43 3: autocreate_Notify: type=CUL_FHTTK lctype=cul_fhttk
2010.01.04 21:46:43 2: autocreate: define CUL_FHTTK_965ab0 CUL_FHTTK 965ab0
2010.01.04 21:46:43 3: foreach loop: CUL_FHTTK:CUL_FHTTK_965ab0 and HMS:HMS100TFK_.* ...
2010.01.04 21:46:43 3: foreach loop: CUL_FHTTK:CUL_FHTTK_965ab0 and CUL_FHTTK:.* ...
2010.01.04 21:46:43 3: MATCH (CUL_FHTTK:.*): gplot=fht80tf:Window, filer=CUL_FHTTK_965ab0 ... input was %NAME
2010.01.04 21:46:43 3: foreach loop: CUL_FHTTK:CUL_FHTTK_965ab0 and HMS:HMS100T._.* ...
2010.01.04 21:46:43 3: foreach loop: CUL_FHTTK:CUL_FHTTK_965ab0 and CUL_EM:.* ...
2010.01.04 21:46:43 3: foreach loop: CUL_FHTTK:CUL_FHTTK_965ab0 and FHT:.* ...
2010.01.04 21:46:43 3: foreach loop: CUL_FHTTK:CUL_FHTTK_965ab0 and CUL_WS:.* ...
2010.01.04 21:46:43 3: foreach loop: CUL_FHTTK:CUL_FHTTK_965ab0 and KS300:.* ...
2010.01.04 21:46:43 2: autocreate: define FileLog_CUL_FHTTK_965ab0 FileLog /var/log/fhem/CUL_FHTTK_965ab0-%Y.log CUL_FHTTK_965ab0
2010.01.04 21:46:43 2: autocreate: define weblink_CUL_FHTTK_965ab0 weblink fileplot FileLog_CUL_FHTTK_965ab0:cul_fhttk:CURRENT

Und nun erklärt sich auch dies:

 > 2010.01.04 20:57:21 1: CUL_WS UNDEFINED temp/hum sensor detected, code 7
 > 2010.01.04 20:57:21 2: autocreate: define CUL_WS_7 CUL_WS 7
 > 2010.01.04 20:57:21 2: autocreate: define FileLog_CUL_WS_7 FileLog /var/log/fhem/CUL_WS_7-%Y.log CUL_WS_7
 > 2010.01.04 20:57:21 2: autocreate: define weblink_CUL_WS_7 weblink fileplot FileLog_CUL_WS_7:cul_ws:CURRENT
 >
 > Wo hat das $CENSORED auf einmal "cul_ws" her?!

Genauer spezifiziert laute die Frage also: wieso wird nicht GPLOT verwendet
bzw. welchen Sinn hat das GPLOT-Feld, wenn der Name des .gplot-Files vom
Devicenamen abgeleitet wird?!

> 2010.01.04 21:03:09 3: Unknown HMS device 1004/3bc9, please define it
> 2010.01.04 21:03:09 2: autocreate: define HMS100TFK_3bc9 HMS 3bc9
> 2010.01.04 21:03:09 2: autocreate: define FileLog_HMS100TFK_3bc9 FileLog /var/log/fhem/HMS100TFK_3bc9-%Y.log HMS100TFK_3bc9:T:.*
> 2010.01.04 21:03:09 2: autocreate: define weblink_HMS100TFK_3bc9 weblink fileplot FileLog_HMS100TFK_3bc9:hms:CURRENT
> 2010.01.04 21:03:18 3: Unknown HMS device 1000/dbf6, please define it
> 2010.01.04 21:03:18 2: autocreate: define HMS100TF_dbf6 HMS dbf6
> 2010.01.04 21:03:18 2: autocreate: define FileLog_HMS100TF_dbf6 FileLog /var/log/fhem/HMS100TF_dbf6-%Y.log HMS100TF_dbf6:T:.*
> 2010.01.04 21:03:18 2: autocreate: define weblink_HMS100TF_dbf6 weblink fileplot FileLog_HMS100TF_dbf6:hms:CURRENT
>
> Wie definiere ich das korrekt im Kontext der autocreate_Notify()-Logik? Mit
> HMS100TF\$ wird HMS100TFK gar nicht beachtet; aber ein T (gibt's das über-
> haupt) würde ebenso rausfallen?

2010.01.04 21:45:18 3: Unknown HMS device 1004/3bc9, please define it
2010.01.04 21:45:18 3: autocreate_Notify: type=HMS lctype=hms
2010.01.04 21:45:18 2: autocreate: define HMS100TFK_3bc9 HMS 3bc9
2010.01.04 21:45:18 3: foreach loop: HMS:HMS100TFK_3bc9 and HMS:HMS100TFK_.* ...
2010.01.04 21:45:18 3: MATCH (HMS:HMS100TFK_.*): gplot=fht80tf:Contact, filer=HMS100TFK_3bc9 ... input was %NAME
2010.01.04 21:45:18 3: foreach loop: HMS:HMS100TFK_3bc9 and CUL_FHTTK:.* ...
2010.01.04 21:45:18 3: foreach loop: HMS:HMS100TFK_3bc9 and HMS:HMS100T._.* ...
2010.01.04 21:45:18 3: foreach loop: HMS:HMS100TFK_3bc9 and CUL_EM:.* ...
2010.01.04 21:45:18 3: foreach loop: HMS:HMS100TFK_3bc9 and FHT:.* ...
2010.01.04 21:45:18 3: foreach loop: HMS:HMS100TFK_3bc9 and CUL_WS:.* ...
2010.01.04 21:45:18 3: foreach loop: HMS:HMS100TFK_3bc9 and KS300:.* ...
2010.01.04 21:45:18 2: autocreate: define FileLog_HMS100TFK_3bc9 FileLog /var/log/fhem/HMS100TFK_3bc9-%Y.log HMS100TFK_3bc9
2010.01.04 21:45:18 2: autocreate: define weblink_HMS100TFK_3bc9 weblink fileplot FileLog_HMS100TFK_3bc9:hms:CURRENT

Close, but no cigar, wg. $lctype als Argument für gnuplot-file; hrmpft.
Klar, daß ich mir dann wirkungslos die schmutzigesten Schimpfworte in
%flogpar kleistern kann ;)

       $cmd = "$wlname weblink fileplot $flname:$lctype:CURRENT";

commandref.html:

define MyPlot weblink fileplot ::

Welche Sinn hat das per ":" getrennte Feld in %flogpars GPLOT-Wert,
für fileplot wird doch nur der Name des .gplot benötigt, alles andere
steht, wenn ich das richtig überreiße, dort?
         kai

--

You received this message because you are subscribed to the Google Groups "FHEM users" group.
To post to this group, send email to fhem-users@googlegroups.com.
To unsubscribe from this group, send email to fhem-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/fhem-users?hl=en.

Guest

Originally posted by: <email address deleted>

Um das abzuschließen:

> Genauer spezifiziert laute die Frage also: wieso wird nicht GPLOT verwendet
> bzw. welchen Sinn hat das GPLOT-Feld, wenn der Name des .gplot-Files vom
> Devicenamen abgeleitet wird?!
[...]
> Close, but no cigar, wg. $lctype als Argument für gnuplot-file; hrmpft.
> Klar, daß ich mir dann wirkungslos die schmutzigesten Schimpfworte in
> %flogpar kleistern kann ;)
>
>       $cmd = "$wlname weblink fileplot $flname:$lctype:CURRENT";
>
> commandref.html:
>
> define MyPlot weblink fileplot ::
>
> Welche Sinn hat das per ":" getrennte Feld in %flogpars GPLOT-Wert,
> für fileplot wird doch nur der Name des .gplot benötigt, alles andere
> steht, wenn ich das richtig überreiße, dort?

Ah, das scheint irgendwie in den Attributen des FileLog-Objektes zu
landen:

       $attr{$flname}{logtype} = "${gplot}text";

Allerdings ergibt der (nicht angefaßte) Link "Power", der auflöst auf

   http://plug-2.uu.org/fhem?cmd=logwrapper%20FileLog_CUL_EM_5%20cul_em%20CUL_EM_5-2010.log

bei mir:

| XML Parsing Error: mismatched tag. Expected: .
| Location: http://plug-2.uu.org/fhem?cmd=showlog%20undef%20FileLog_CUL_EM_5%20cul_em%20CUL_EM_5-2010.log
| Line Number 8, Column 50:        class="title" text-anchor="middle">
|                        -------------------------------------------------^

Der "text"-Link, http://plug-2.uu.org/fhem?cmd=logwrapper%20FileLog_CUL_EM_5%20text%20CUL_EM_5-2010.log,
funktioniert. Ist das ein Bug oder ein Feature?

Nachdem Martin grade den 3. Thread "98_autocreate.pm" gestartet hat ;), kommt das
Checkin in einem separaten ...
         kai

--

You received this message because you are subscribed to the Google Groups "FHEM users" group.
To post to this group, send email to fhem-users@googlegroups.com.
To unsubscribe from this group, send email to fhem-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/fhem-users?hl=en.

rudolfkoenig

                                                   

> Genauer spezifiziert laute die Frage also: wieso wird nicht GPLOT verwendet
> bzw. welchen Sinn hat das GPLOT-Feld, wenn der Name des .gplot-Files vom
> Devicenamen abgeleitet wird?!

Meine Faulheit bzw. nicht zu Ende - Definition.

Die GPLOT Erweiterung kam nach dem weblink dazu (am Anfang habe ich fuer die
gplot files $lctype == TYPE kleingeschrieben) verwendet. Aber dann wollte ich
die sprechende Namen fuer die Plots (Power statt cul_em, usw), und hab den
weblink vergessen... Ging ja auch gut bis der erste gnuplot file der nicht
gleich dem Typ heisst verwende wurde... Eigentlich muss man eine Schleife fuer
alle gplot files machen, siehe KS300.

Werde nachholen.

--

You received this message because you are subscribed to the Google Groups "FHEM users" group.
To post to this group, send email to fhem-users@googlegroups.com.
To unsubscribe from this group, send email to fhem-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/fhem-users?hl=en.

Guest

Originally posted by: <email address deleted>

Rudolf Koenig wrote:

>> Genauer spezifiziert laute die Frage also: wieso wird nicht GPLOT verwendet
>> bzw. welchen Sinn hat das GPLOT-Feld, wenn der Name des .gplot-Files vom
>> Devicenamen abgeleitet wird?!
>
> Meine Faulheit bzw. nicht zu Ende - Definition.

Dachte mir sowas ;) Gut, ich habe bislang mit dem gnuplot-Kram nix am Hut
gehabt (SVG ist aber recht lässig; nur mal wieder nicht Android-tauglich :()
und verstehe das wohl noch nicht richtig; guck' Dir bitte mal meinen commit
von eben an ...

> Werde nachholen.

... vielleicht kannst Du ja da ansetzen.
         kai

--

You received this message because you are subscribed to the Google Groups "FHEM users" group.
To post to this group, send email to fhem-users@googlegroups.com.
To unsubscribe from this group, send email to fhem-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/fhem-users?hl=en.