[FHZ] Lampe mit HMS100TFK einschalten

Begonnen von rudolfkoenig, 18 September 2008, 19:12:53

Vorheriges Thema - Nächstes Thema

rudolfkoenig

Originally posted by: <email address deleted>

hallo,
letzte Woche habe ich fhem und pgm3 auf einem nslu2 installiert
mitttels nslu2fhz, anschliessend updated auf die neusten Versionen.
Auch linux ist relativ neu für mich.

Vielleicht kann mir hier jemand helfen, Ich möchte eine Lampe mittels
einem HMS100TFK ein- und ausschalten.
Das Forum und Beispiele habe ich durchgelesen, doch scheint nichts zu
passen, irgendwie funktionierts nicht.


folgendes habe ich definiert:


define reedswitch HMS 7c7f   # reed schalter
define reedswitchlog FileLog /var/tmp/reedswitch.log
reedswitch:.*Switch.*
define lamp FS20 395c 00
define schalter notify reedswitch:.*Switch:.* set lamp %


reedswitch.log:
2008-09-18_10:37:18 reedswitch Switch Detect: off
2008-09-18_10:38:08 reedswitch Switch Detect: on


fhem.log:
History 2008.09.18 14:59:14 4: HMS Device 7c7f (HMS100TFK: Switch
Detect: off)
History 2008.09.18 14:59:14 5: Triggering reedswitch (3 changes)
History 2008.09.18 14:59:14 5: Cmd: >set lamp Switch Detect: off<


Gruss
Beat, Basel



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

Oskar

Originally posted by: <email address deleted>

sorry, da hat der automatische Zeilenumbruch am Ende der 2. define-
Zeile zugeschlagen, das sollte alles auf einer Zeile stehen.

define reedswitchlog FileLog /var/tmp/reedswitch.log
reedswitch:.*Switch.*

On 18 Sep., 19:12, Beat wrote:
> hallo,
> letzte Woche habe ich fhem und pgm3 auf einem nslu2 installiert
> mitttels nslu2fhz, anschliessend updated auf die neusten Versionen.
> Auch linux ist relativ neu für mich.
>
> Vielleicht kann mir hier jemand helfen, Ich möchte eine Lampe mittels
> einem HMS100TFK ein- und ausschalten.
> Das Forum und Beispiele habe ich durchgelesen, doch scheint nichts zu
> passen, irgendwie funktionierts nicht.
>
> folgendes habe ich definiert:
>
> define reedswitch HMS 7c7f   # reed schalter
> define reedswitchlog FileLog /var/tmp/reedswitch.log
> reedswitch:.*Switch.*
> define lamp FS20 395c 00
> define schalter notify reedswitch:.*Switch:.* set lamp %
>
> reedswitch.log:
> 2008-09-18_10:37:18 reedswitch Switch Detect: off
> 2008-09-18_10:38:08 reedswitch Switch Detect: on
>
> fhem.log:
> History 2008.09.18 14:59:14 4: HMS Device 7c7f (HMS100TFK: Switch
> Detect: off)
> History 2008.09.18 14:59:14 5: Triggering reedswitch (3 changes)
> History 2008.09.18 14:59:14 5: Cmd: >set lamp Switch Detect: off<
>
> Gruss
> Beat, Basel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "FHZ1000 users on Linux" group.
To post to this group, send email to FHZ1000-users-on-unix@googlegroups.com
To unsubscribe from this group, send email to FHZ1000-users-on-unix+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/FHZ1000-users-on-unix?hl=en
-~----------~----~----~----~------~----~------~--~-
--
fhem geht auch auf mac os x

rudolfkoenig

                                                   

Ich rate mal: Du willst lamp einschalten, falls die TFK on meldet, und
aus, falls es off meldet.

Erstens: Before man notify / filelog definiert, experimentiert man am
besten mit inform: Im telnet zu fhem "inform on" eingeben, warten, bis
was kommt, da sieht man naemlich, was dem notify bzw. FileLog alles
zugestellt wird. Inform gibt "TYP NAME STATUS" aus, notify/filelog
pruefen den Regexp gegen NAME bzw. gegen NAME:STATUS

Zweitens: Ob der notify dann auch tut, kann man mit "trigger NAME
STATUS" pruefen (also trigger reedswitch Switch Detect: on).

Drittens: In deinem Fall wird an notify folgendes geschickt (ohne
Gewaehr, ich hab kein TFK):
reedswitch:switch_detect on
reedswitch:battery off
reedswitch:Switch Detect: on

Du musst daraus "set lamp on" bauen.

Ich schlage folgendes vor:
define schalter_on notify reedswitch:Switch.*on set lamp on
define schalter_on notify reedswitch:Switch.*off set lamp off

Oder als "Einzeiler":
define schalter notify reedswitch:Switch.* { fhem("set lampe " . ("%"
=~ m/on/ ? "on" : "off")) }

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