set Befehl funktioniert nicht im notify

Begonnen von Li0n, 14 März 2019, 21:51:46

Vorheriges Thema - Nächstes Thema

Li0n

Hi,

ich habe ein kleines Problem:
mein Befehl "set Wohnzimmer_Lampen_toggle toggle" funktioniert so, wenn ich ihn einfach so in der Kommandozeile aufrufe und die Lampen werden geschaltet.

Will ich den Befehl allerdings in einem notify benutzten dann steht im Log folgendes:
2019.03.14 21:47:31 5: Starting notify loop for Schalter2, 1 event(s), first is 1002
2019.03.14 21:47:31 5: Triggering light_toggle
2019.03.14 21:47:31 4: light_toggle exec set Wohnzimmer_Lampen_toggle toggle

2019.03.14 21:47:31 5: Cmd: >set Wohnzimmer_Lampen_toggle toggle
<
2019.03.14 21:47:31 5: Starting notify loop for Wohnzimmer_Lampen_toggle, 1 event(s), first is toggle\n
2019.03.14 21:47:31 5: End notify loop for Wohnzimmer_Lampen_toggle
2019.03.14 21:47:31 5: Cmd: >set Lampe_Ecke toggle
<
2019.03.14 21:47:31 5: Cmd: >set Lampe_TV toggle
<
2019.03.14 21:47:31 5: Cmd: >set Lampe_Tisch toggle
<
2019.03.14 21:47:31 5: SET: Unknown argument toggle
, bearword as argument or wrong parameter(s), choose one of on off toggle on-for-timer off-for-timer intervals bright dimup dimdown name default:noArg reopen:noArg statusrequest:noArg hsv hue sat rgb color ct start_cf stop_cf scene circlecolor:noArg blink
Unknown argument toggle
, bearword as argument or wrong parameter(s), choose one of on off toggle on-for-timer off-for-timer intervals bright dimup dimdown name default:noArg reopen:noArg statusrequest:noArg hsv hue sat rgb color ct start_cf stop_cf scene circlecolor:noArg blink
Unknown argument toggle
, bearword as argument or wrong parameter(s), choose one of on off toggle on-for-timer off-for-timer intervals bright dimup dimdown name default:noArg reopen:noArg statusrequest:noArg hsv hue sat rgb color ct start_cf stop_cf scene circlecolor:noArg blink
2019.03.14 21:47:31 3: light_toggle return value: Unknown argument toggle
, bearword as argument or wrong parameter(s), choose one of on off toggle on-for-timer off-for-timer intervals bright dimup dimdown name default:noArg reopen:noArg statusrequest:noArg hsv hue sat rgb color ct start_cf stop_cf scene circlecolor:noArg blink
Unknown argument toggle
, bearword as argument or wrong parameter(s), choose one of on off toggle on-for-timer off-for-timer intervals bright dimup dimdown name default:noArg reopen:noArg statusrequest:noArg hsv hue sat rgb color ct start_cf stop_cf scene circlecolor:noArg blink
Unknown argument toggle
, bearword as argument or wrong parameter(s), choose one of on off toggle on-for-timer off-for-timer intervals bright dimup dimdown name default:noArg reopen:noArg statusrequest:noArg hsv hue sat rgb color ct start_cf stop_cf scene circlecolor:noArg blink
2019.03.14 21:47:31 5: End notify loop for Schalter2


Ich hab leider keine Ahnung, was der Fehler sein soll, da das command eigentlich keine Probleme macht. Halt nur im notify geht es nicht.
Die Fehlermeldung selbst verstehe ich auch nicht. Ich will ein toggle machen und er sagt wähle eins von diesen: on off toggle... ja mach ich doch :P

CoolTux

Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

Li0n

Internals:
   DEF        Schalter1:1002|Schalter2:1002|Schalter1:1000|Schalter2:1000 set Wohnzimmer_Lampen_toggle toggle
   NAME       light_toggle
   NOTIFYDEV  Schalter2,Schalter1
   NR         81
   NTFY_ORDER 50-light_toggle
   REGEXP     Schalter1:1002|Schalter2:1002|Schalter1:1000|Schalter2:1000
   STATE      2019-03-14 21:57:19
   TRIGGERTIME 1552597039.05735
   TYPE       notify
   READINGS:
     2019-03-14 21:57:11   state           active
Attributes:

CoolTux

Ist Wohnzimmer_Lampen_toggle eine structure?
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net


CoolTux

zeig mal bitte diene structure. also list
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

CoolTux

Also die gute Nachricht ist, das es mit Dummys geht. Und es sollte auch kein Unterschied machen ob notify oder FHEMWEB Kommandozeile
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

Li0n

Zitat von: CoolTux am 14 März 2019, 23:33:20
zeig mal bitte diene structure. also list

Internals:
   ATTR       lamptoggle
   CHANGEDCNT 134
   DEF        lamptoggle Lampe_Ecke Lampe_TV Lampe_Tisch
   NAME       Wohnzimmer_Lampen_toggle
   NR         86
   NTFY_ORDER 50-Wohnzimmer_Lampen_toggle
   STATE      opened
   TYPE       structure
   READINGS:
     2019-03-15 16:02:11   LastDevice      Lampe_Tisch
     2019-03-15 16:02:11   LastDevice_Abs  Lampe_Tisch
     2019-03-15 16:02:11   state           opened
Attributes:

CoolTux

Wieso zeigt Deine Struktur ein opened wenn Du Lampen drin hast?
Was sind das eigentlich für Device Typen bei den Lampen? HM oder IT?
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

Li0n

Das sind Yeelights über Wlan eingebunden

opened = verbunden

Ich verstehe immer noch nicht ganz warum ich den Befehl so ausführen kann, aber im notify erzeugt er Fehler

CoolTux

Ich leider auch (noch) nicht. Das bedeutet wir müssen tiefer gehen.

Bitte stelle das struktur Device einmal auf verbose 5. Dann schaltest Du bitte ein Toggle über die cmd und danach lässt Du ein Toggle über das Notify schalten.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

Li0n

#11
hatte nur verbose auf 5 gesetzt und nun scheint es zu funktionieren. Habe verbose dann wieder gelöscht und es funktioniert immer noch... :) also keine Ahnung woran es lag

2019.03.15 21:03:59 5: Starting notify loop for Schalter2, 1 event(s), first is 1000
2019.03.15 21:03:59 5: Triggering light_toggle
2019.03.15 21:03:59 4: light_toggle exec set Wohnzimmer_Lampen_toggle toggle
2019.03.15 21:03:59 5: Cmd: >set Wohnzimmer_Lampen_toggle toggle<
2019.03.15 21:03:59 5: Starting notify loop for Wohnzimmer_Lampen_toggle, 1 event(s), first is toggle
2019.03.15 21:03:59 5: End notify loop for Wohnzimmer_Lampen_toggle
2019.03.15 21:03:59 5: Cmd: >set Lampe_Ecke toggle<
2019.03.15 21:03:59 3: YeeLight Lampe_Ecke - set Lampe_Ecke toggle
2019.03.15 21:03:59 5: Lampe_Ecke: Kommando wird ausgeführt. (toggle).
2019.03.15 21:03:59 5: Lampe_Ecke: Kommando wird ausgeführt. (off).
2019.03.15 21:03:59 5: Lampe_Ecke: ein oder aus
2019.03.15 21:03:59 5: Lampe_Ecke SendQueue: added {"method":"set_power","id":105,"params":["off"]} with id:105
2019.03.15 21:03:59 5: SW: {"method":"set_power","id":105,"params":["off"]}

2019.03.15 21:03:59 4: Lampe_Ecke is sending: {"method":"set_power","id":105,"params":["off"]}
2019.03.15 21:03:59 5: Starting notify loop for Lampe_Ecke, 1 event(s), first is toggle
2019.03.15 21:03:59 5: End notify loop for Lampe_Ecke
2019.03.15 21:03:59 5: Cmd: >set Lampe_TV toggle<
2019.03.15 21:03:59 3: YeeLight Lampe_TV - set Lampe_TV toggle
2019.03.15 21:03:59 5: Lampe_TV: Kommando wird ausgeführt. (toggle).
2019.03.15 21:03:59 5: Lampe_TV: Kommando wird ausgeführt. (off).
2019.03.15 21:03:59 5: Lampe_TV: ein oder aus
2019.03.15 21:03:59 5: Lampe_TV SendQueue: added {"method":"set_power","id":106,"params":["off"]} with id:106
2019.03.15 21:03:59 5: SW: {"method":"set_power","id":106,"params":["off"]}

2019.03.15 21:03:59 4: Lampe_TV is sending: {"method":"set_power","id":106,"params":["off"]}
2019.03.15 21:03:59 5: Starting notify loop for Lampe_TV, 1 event(s), first is toggle
2019.03.15 21:03:59 5: End notify loop for Lampe_TV
2019.03.15 21:03:59 5: Cmd: >set Lampe_Tisch toggle<
2019.03.15 21:03:59 3: YeeLight Lampe_Tisch - set Lampe_Tisch toggle
2019.03.15 21:03:59 5: Lampe_Tisch: Kommando wird ausgeführt. (toggle).
2019.03.15 21:03:59 5: Lampe_Tisch: Kommando wird ausgeführt. (off).
2019.03.15 21:03:59 5: Lampe_Tisch: ein oder aus
2019.03.15 21:03:59 5: Lampe_Tisch SendQueue: added {"params":["off"],"method":"set_power","id":107} with id:107
2019.03.15 21:03:59 5: SW: {"params":["off"],"method":"set_power","id":107}

2019.03.15 21:03:59 4: Lampe_Tisch is sending: {"params":["off"],"method":"set_power","id":107}
2019.03.15 21:03:59 5: Starting notify loop for Lampe_Tisch, 1 event(s), first is toggle
2019.03.15 21:03:59 5: End notify loop for Lampe_Tisch
2019.03.15 21:03:59 5: End notify loop for Schalter2
2019.03.15 21:03:59 5: Lampe_Tisch: Reading raw: {"id":107, "result":["ok"]}
2019.03.15 21:03:59 4: reading from Lampe_Tisch: {"id":107, "result":["ok"]}
2019.03.15 21:03:59 5: Lampe_Tisch AnswerQueue: added {"id":107, "result":["ok"]}
2019.03.15 21:03:59 3: Lampe_Tisch success sending 107: {"params":["off"],"method":"set_power","id":107}
2019.03.15 21:03:59 5: Lampe_Tisch SendQueue: deleted {"params":["off"],"method":"set_power","id":107}
2019.03.15 21:03:59 5: Lampe_Tisch AnswerQueue: deleted {"id":107, "result":["ok"]}
2019.03.15 21:03:59 5: Lampe_TV: Reading raw: {"id":106, "result":["ok"]}
2019.03.15 21:03:59 4: reading from Lampe_TV: {"id":106, "result":["ok"]}
2019.03.15 21:03:59 5: Lampe_TV AnswerQueue: added {"id":106, "result":["ok"]}
2019.03.15 21:03:59 3: Lampe_TV success sending 106: {"method":"set_power","id":106,"params":["off"]}
2019.03.15 21:03:59 5: Lampe_TV SendQueue: deleted {"method":"set_power","id":106,"params":["off"]}
2019.03.15 21:03:59 5: Lampe_TV AnswerQueue: deleted {"id":106, "result":["ok"]}
2019.03.15 21:03:59 5: Lampe_Ecke: Reading raw: {"id":105, "result":["ok"]}
2019.03.15 21:03:59 4: reading from Lampe_Ecke: {"id":105, "result":["ok"]}
2019.03.15 21:03:59 5: Lampe_Ecke AnswerQueue: added {"id":105, "result":["ok"]}
2019.03.15 21:03:59 3: Lampe_Ecke success sending 105: {"method":"set_power","id":105,"params":["off"]}
2019.03.15 21:03:59 5: Lampe_Ecke SendQueue: deleted {"method":"set_power","id":105,"params":["off"]}
2019.03.15 21:03:59 5: Lampe_Ecke AnswerQueue: deleted {"id":105, "result":["ok"]}