FHEM Forum

FHEM => Frontends => FLOORPLAN => Thema gestartet von: Michael am 12 Februar 2013, 17:52:02

Titel: Dummy Icon in Floorplans
Beitrag von: Michael am 12 Februar 2013, 17:52:02
Moin

Brauche schon wieder eure Hilfe.

Ich möchte gern die Schaltzustände (on/off) als Icon im Floorplans ausgeben.
Was bei FS20 und Weblink klappt.
Nur bei den Dummy's bekomme ich im Floorplans Platzhalter angezeigt.

(siehe Anhang / see attachement)

Im Web (8083) sind sie vorhanden.

(siehe Anhang / see attachement)


Bitte gebt mir einen Tip.
Was ich da schon wieder falsch mache.

Gruß, Michael
Titel: Aw: Dummy Icon in Floorplans
Beitrag von: Sturi2011 am 12 Februar 2013, 19:28:26
Hi,

wie hast du die Dummys definiert?

bei mir sieht das z.B. so aus:
#FLOORPLANDUMMYS
define AQDM dummy
attr AQDM fp_Erdgeschoss 285,495,0,
attr AQDM room hidden
attr AQDM setList on off
define AQDMOn notify AQDM.on {fhem ("set AQ K1on")}
attr AQDMOn room hidden
define AQDMOff notify AQDM.off {fhem ("set AQ K1off")}
attr AQDMOff room hidden


Gruß Andreas
Titel: Aw: Dummy Icon in Floorplans
Beitrag von: Michael am 13 Februar 2013, 18:29:16
Hi

Ich habe es so gemacht.

define 00_Chef_PC at +*00:01:00 trigger 0_DeviceChefPC
attr 00_Chef_PC room 03 Anwesend

define 0_DeviceChefPC notify 0_DeviceChefPC  {my $aa="";;\
  $aa=qx(/usr/bin/ctlmgr_ctl r landevice settings/landevice0/active );;\
  $aa=$aa * 1;;\
  fhem "set Chef_PC $aa";;}

define Chef_PC dummy
attr Chef_PC eventMap on:1 off:0
attr Chef_PC fp_Erdgeschoss 200,650
attr Chef_PC fp_image images/default/Chef_PC.{state}.png
attr Chef_PC room 03 Anwesend


So ganz sehe ich nicht wo du die Icon's her holst.

Gruß, Michael
Titel: Aw: Dummy Icon in Floorplans
Beitrag von: Sturi2011 am 13 Februar 2013, 19:41:04
Hi,

ersetze mal die eventmap durch Setlist

Gruß Andreas
Titel: Aw: Dummy Icon in Floorplans
Beitrag von: Michael am 13 Februar 2013, 20:27:38
Hi,

ne, leider kein Erfolg.

Dann bekomme ich weder im Fhemweb noch im Floorplan das Icon.
Es wird nur der Zustand (1 od. 0) angezeigt.

Gruß Michael
Titel: Aw: Dummy Icon in Floorplans
Beitrag von: Sturi2011 am 14 Februar 2013, 09:41:51
Hi,

logischer Weise da ->
define 0_DeviceChefPC notify 0_DeviceChefPC  {my $aa="";;\
  $aa=qx(/usr/bin/ctlmgr_ctl r landevice settings/landevice0/active );;\
  $aa=$aa * 1;;\
  fhem "set Chef_PC $aa";;}


nur einen nummerischen Wert ergeben kann.

define 0_DeviceChefPC notify 0_DeviceChefPC  {my $aa="";;\
  $aa=qx(/usr/bin/ctlmgr_ctl r landevice settings/landevice0/active );;\
  $aa=$aa * 1;;\
  if ($aa == 1) { \
        fhem("set Chef_PC on") \
    } \
    else { \
        fhem("set Chef_PC off") \
    } \


Gruß Andreas
Titel: Aw: Dummy Icon in Floorplans
Beitrag von: Michael am 15 Februar 2013, 07:14:03
Hi

Vielen Dank !!!

Da wäre ich nicht drauf gekommen.
Bin wohl doch zu Blond ;-)

Gruß, Michael
Titel: Aw: Dummy Icon in Floorplans
Beitrag von: Michael am 16 Februar 2013, 14:30:48
Hi

Zu früh gefreut!

Anzeige ist IO.
Aber im Logfile bekomme ich folgendes :
ZitatUnknown command if, try help
Unknown command $aa=, try help
Unknown command $aa=qx(/usr/bin/ctlmgr_ctl, try help
, try help
2013.02.16 14:23:31 3: DeviceChefPC return value: Unknown command {\

Das ist der Code dazu.
define DeviceChefPC notify DeviceChefPC  {\
  my $aa="";;\
     $aa=qx(/usr/bin/ctlmgr_ctl r landevice settings/landevice0/active );;\
     $aa= $aa * 1};;\
  if ($aa == 1){\
        fhem("set Chef_PC on")\
    }\
    else {\
        fhem("set Chef_PC off")\
    }\


Bin schon durcheinander.
Geändert {}, ;;, \,

Finde einfach den Fehler nicht.

Gruß, Michael