Hauptmenü

notify mit PRESENCE

Begonnen von cornelius fillmore, 26 August 2014, 12:37:59

Vorheriges Thema - Nächstes Thema

cornelius fillmore

Hallo Forum,
ich möchte gerne mit 3 Presence-Teilnehmer einen vierten Schalten.

Bekomme es aber leider nicht hin.
Vieleicht kann ja mal einer drüberschauen.
Danke
## Linux Receiver ##
#Dreambox Wohnzimmer#
define Dream PRESENCE lan-ping 192.168.0.10
attr Dream eventMap present:on absent:off
attr Dream webCmd on:off
attr Dream devStateIcon absent:black_Steckdose.off present:black_Steckdose.on
attr Dream room Wohnzimmer
#attr Dream dummy 1

#Dreambox Schlafzimmer#
define Dream_2 PRESENCE lan-ping 192.168.0.14
attr Dream_2 eventMap present:on absent:off
attr Dream_2 webCmd on:off
attr Dream_2 devStateIcon off:black_Steckdose.off on:black_Steckdose.on
attr Dream_2 room Schlafzimmer
#attr Dream_2 dummy 1

#Kathrein#
define Kathi PRESENCE lan-ping 192.168.0.51
attr Kathi eventMap present:on absent:off
attr Kathi webCmd on:off
attr Kathi devStateIcon off:black_Steckdose.off on:black_Steckdose.on
attr Kathi room Moritz
#attr Kathi dummy 1

#Linux-Boxen schalten CS_Steckdosenleiste#

define Schalter1_on notify (Dream|Dream_2|Kathi)
if (Value("Dream") eq "off" && Value("Dream_2") eq "off" && Value("Kathi") eq "off") {
  fhem "set Leiste_HAS off"
} else {
  fhem "set Leiste_HAS on"
}
3 x Fhem 5.9 mit RPI

marvin78


(Dream|Dream_2|Kathi) {if (Value("Dream") eq "off" && Value("Dream_2") eq "off" && Value("Kathi") eq "off") {fhem ("set Leiste_HAS off")} else {fhem ("set Leiste_HAS on")}}


Du musst fhem sagen, dass PERL Code kommt. Das geht mit den {}.

Ich würde hier eine structure empfehlen um das ganze zu vereinfachen.

(Code für den DEF Bereich im Device im Frontend)

cornelius fillmore

3 x Fhem 5.9 mit RPI

Puschel74

Hallo,

im FHEM Logfile steht nichts drinnen  :o
Das wundert mich aber.

Grüße
Zotac BI323 als Server mit DBLog
CUNO für FHT80B, 3 HM-Lan per vCCU, RasPi mit CUL433 für Somfy-Rollo (F2F), RasPi mit I2C(LM75) (F2F), RasPi für Panstamp+Vegetronix +SONOS(F2F)
Ich beantworte keine Supportanfragen per PM! Bitte im Forum suchen oder einen Beitrag erstellen.