Moin,
Ich suche gerade etwas, um in webCMD "Klingel an Klingel aus Tür auf" stehen zu haben und jedes einzelne z. B. "Tür auf" soll klickbar sein und dann door:on bzw auf homeland/haushalt/doors/doormodule/frontdoor/door/set true setzen.
Ich habe es aktuell mit der EventMap versucht - ich glaub ich bin aber auf dem komplett falschen Schiff - da die Eventmap eher für state anzeige zu sein scheint oder umformung von einem State zu einem anderen.
:-D Ich habe das mal bei Anfänger eingebaut, da ich denke - das ist schon ziemlich easy was ich da nicht kenne.
List meines Devices:
Internals:
CFGFN
IODev MQTT_Broker
NAME doormodule
NR 169
STATE off
TYPE MQTT_DEVICE
qos *:2
retain bell:1
READINGS:
2018-12-01 21:05:32 bell false
2018-12-01 20:13:32 cmd
2018-12-01 21:05:40 door false
2018-12-01 21:05:40 transmission-state incoming publish received
message_ids:
publishSets:
bell:
topic homeland/haushalt/doors/doormodule/frontdoor/bell/set
values:
true
false
cmd:
topic homeland/haushalt/doors/doormodule/frontdoor/cmd/set
values:
ota-restart
reboot
restart
door:
topic homeland/haushalt/doors/doormodule/frontdoor/door/set
values:
true
false
sets:
bell true,false
cmd ota-restart,reboot,restart
door true,false
subscribe:
homeland/haushalt/doors/doormodule/frontdoor/bell
homeland/haushalt/doors/doormodule/frontdoor/door
homeland/haushalt/doors/doormodule/frontdoor/cmd
subscribeExpr:
^homeland\/haushalt\/doors\/doormodule\/frontdoor\/bell$
^homeland\/haushalt\/doors\/doormodule\/frontdoor\/door$
^homeland\/haushalt\/doors\/doormodule\/frontdoor\/cmd$
subscribeQos:
homeland/haushalt/doors/doormodule/frontdoor/bell 0
homeland/haushalt/doors/doormodule/frontdoor/cmd 0
homeland/haushalt/doors/doormodule/frontdoor/door 0
subscribeReadings:
homeland/haushalt/doors/doormodule/frontdoor/bell:
cmd
name bell
homeland/haushalt/doors/doormodule/frontdoor/cmd:
cmd
name cmd
homeland/haushalt/doors/doormodule/frontdoor/door:
cmd
name door
Attributes:
IODev MQTT_Broker
alias Türsprechanlage
eventMap { dev=>{ 'true'=>'on', 'false'=>'off' }, usr=>{ '^on$'=>'true', '^off$'=>'false' }, fw=>{ '^on$'=>'on', '^off$'=>'off' } }
group Kommunikation
publishSet_bell true false homeland/haushalt/doors/doormodule/frontdoor/bell/set
publishSet_cmd ota-restart reboot restart homeland/haushalt/doors/doormodule/frontdoor/cmd/set
publishSet_door true false homeland/haushalt/doors/doormodule/frontdoor/door/set
qos 2
retain bell:1
room Flur
subscribeReading_bell homeland/haushalt/doors/doormodule/frontdoor/bell
subscribeReading_cmd homeland/haushalt/doors/doormodule/frontdoor/cmd
subscribeReading_door homeland/haushalt/doors/doormodule/frontdoor/door
useSetExtensions 1
webCmd Klingel_an:Klingel_aus:Tür_auf
Ich hab es jetzt mal mit CMD Alias versucht.
Habe dort Klingel an erzeugt als Alias aber wenn ich das als WebCmd nutze sagt er dennoch - nöööö.
Unknown argument Klingel an, choose one
List vom cmdalias:
Internals:
ALIAS klingel an
CFGFN
DEF Klingel an AS set doormodule bell on
NAME doormodule_a1
NEWCMD set doormodule bell on
NR 3702
PARAM
STATE defined
TYPE cmdalias
Attributes:
group cmdAlias
room Technikraum
Versuch mal mit attr doormodule eventMap /Tür auf:door on/Klingen an:bell on/Klingen aus:bell off/
attr doormodule webCmd Tür auf:Klingen an:Klingen aus
Sorry, hab kein MQTT zu testen.
Moin - leider mag es damit auch nicht.
Weiterhin sagt er den Befehl kennt er nicht. ???
ZitatUnknown argument Klingel, choose one of bell:true,false cmd:ota-restart,reboot,restart door:true,false
Als würde er keine Leerzeichen akzeptieren.
Das Mappgin zwischen Tür auf oder Klingel an und dem eigentlichen Befehl scheint ihn nicht zu interessieren.
Internals:
CFGFN
IODev MQTT_Broker
NAME doormodule
NR 169
STATE off
TYPE MQTT_DEVICE
qos *:2
retain bell:1
READINGS:
2018-12-01 23:46:05 bell true
2018-12-01 20:13:32 cmd
2018-12-01 21:05:40 door false
2018-12-01 23:46:05 transmission-state incoming publish received
message_ids:
publishSets:
bell:
topic homeland/haushalt/doors/doormodule/frontdoor/bell/set
values:
true
false
cmd:
topic homeland/haushalt/doors/doormodule/frontdoor/cmd/set
values:
ota-restart
reboot
restart
door:
topic homeland/haushalt/doors/doormodule/frontdoor/door/set
values:
true
false
sets:
bell true,false
cmd ota-restart,reboot,restart
door true,false
subscribe:
homeland/haushalt/doors/doormodule/frontdoor/bell
homeland/haushalt/doors/doormodule/frontdoor/door
homeland/haushalt/doors/doormodule/frontdoor/cmd
subscribeExpr:
^homeland\/haushalt\/doors\/doormodule\/frontdoor\/bell$
^homeland\/haushalt\/doors\/doormodule\/frontdoor\/door$
^homeland\/haushalt\/doors\/doormodule\/frontdoor\/cmd$
subscribeQos:
homeland/haushalt/doors/doormodule/frontdoor/bell 0
homeland/haushalt/doors/doormodule/frontdoor/cmd 0
homeland/haushalt/doors/doormodule/frontdoor/door 0
subscribeReadings:
homeland/haushalt/doors/doormodule/frontdoor/bell:
cmd
name bell
homeland/haushalt/doors/doormodule/frontdoor/cmd:
cmd
name cmd
homeland/haushalt/doors/doormodule/frontdoor/door:
cmd
name door
Attributes:
IODev MQTT_Broker
alias Türsprechanlage
eventMap { dev=>{ 'true'=>'on', 'false'=>'off' }, usr=>{ '^on$'=>'true', '^off$'=>'false' }, fw=>{ '^on$'=>'on', '^off$'=>'off' } }
/Tür auf:door on/Klingel an:bell on/Klingel aus:bell off/
group Kommunikation
publishSet_bell true false homeland/haushalt/doors/doormodule/frontdoor/bell/set
publishSet_cmd ota-restart reboot restart homeland/haushalt/doors/doormodule/frontdoor/cmd/set
publishSet_door true false homeland/haushalt/doors/doormodule/frontdoor/door/set
qos 2
retain bell:1
room Flur
subscribeReading_bell homeland/haushalt/doors/doormodule/frontdoor/bell
subscribeReading_cmd homeland/haushalt/doors/doormodule/frontdoor/cmd
subscribeReading_door homeland/haushalt/doors/doormodule/frontdoor/door
useSetExtensions 1
webCmd Tür auf:Klingel an:Klingel aus
Sowas habe ich nicht geschrieben: eventMap { dev=>{ 'true'=>'on', 'false'=>'off' }, usr=>{ '^on$'=>'true', '^off$'=>'false' }, fw=>{ '^on$'=>'on', '^off$'=>'off' } }
/Tür auf:door on/Klingel an:bell on/Klingel aus:bell off/
sonderneventMap /Tür auf:door on/Klingen an:bell on/Klingen aus:bell off/
Aber wenn das echte Kommando "set doormodule bell true" ist, dann eher
eventMap /Tür auf:door true/Klingen an:bell true/Klingen aus:bell false/
:)
Das:
eventMap { dev=>{ 'true'=>'on', 'false'=>'off' }, usr=>{ '^on$'=>'true', '^off$'=>'false' }, fw=>{ '^on$'=>'on', '^off$'=>'off' } }
Ist halt für den MQTT Teil... :-) Weil die allesamt mit true false bei mir arbeiten und FHEM für Timer und co aber damit nicht klar kommt.
Kann man das nicht zeitgleich haben?
Auch nur mit der von dir vorgeschlagenen eventMap wirft er Fehler:
ZitatUnknown argument Klingel, choose one of bell:true,false cmd:ota-restart,reboot,restart door:true,false
List:
Internals:
CFGFN
IODev MQTT_Broker
NAME doormodule
NR 169
STATE off
TYPE MQTT_DEVICE
qos *:2
retain bell:1
READINGS:
2018-12-02 17:56:17 bell true
2018-12-01 20:13:32 cmd
2018-12-01 21:05:40 door false
2018-12-02 17:56:17 transmission-state incoming publish received
message_ids:
publishSets:
bell:
topic homeland/haushalt/doors/doormodule/frontdoor/bell/set
values:
true
false
cmd:
topic homeland/haushalt/doors/doormodule/frontdoor/cmd/set
values:
ota-restart
reboot
restart
door:
topic homeland/haushalt/doors/doormodule/frontdoor/door/set
values:
true
false
sets:
bell true,false
cmd ota-restart,reboot,restart
door true,false
subscribe:
homeland/haushalt/doors/doormodule/frontdoor/bell
homeland/haushalt/doors/doormodule/frontdoor/door
homeland/haushalt/doors/doormodule/frontdoor/cmd
subscribeExpr:
^homeland\/haushalt\/doors\/doormodule\/frontdoor\/bell$
^homeland\/haushalt\/doors\/doormodule\/frontdoor\/door$
^homeland\/haushalt\/doors\/doormodule\/frontdoor\/cmd$
subscribeQos:
homeland/haushalt/doors/doormodule/frontdoor/bell 0
homeland/haushalt/doors/doormodule/frontdoor/cmd 0
homeland/haushalt/doors/doormodule/frontdoor/door 0
subscribeReadings:
homeland/haushalt/doors/doormodule/frontdoor/bell:
cmd
name bell
homeland/haushalt/doors/doormodule/frontdoor/cmd:
cmd
name cmd
homeland/haushalt/doors/doormodule/frontdoor/door:
cmd
name door
Attributes:
IODev MQTT_Broker
alias Türsprechanlage
eventMap eventMap /Tür auf:door true/Klingel an:bell true/Klingel aus:bell false/
group Kommunikation
publishSet_bell true false homeland/haushalt/doors/doormodule/frontdoor/bell/set
publishSet_cmd ota-restart reboot restart homeland/haushalt/doors/doormodule/frontdoor/cmd/set
publishSet_door true false homeland/haushalt/doors/doormodule/frontdoor/door/set
qos 2
retain bell:1
room Flur
subscribeReading_bell homeland/haushalt/doors/doormodule/frontdoor/bell
subscribeReading_cmd homeland/haushalt/doors/doormodule/frontdoor/cmd
subscribeReading_door homeland/haushalt/doors/doormodule/frontdoor/door
useSetExtensions 1
webCmd Tür auf:Klingel an:Klingel aus
ZitateventMap eventMap /Tür auf:door true/Klingel an:bell true/Klingel aus:bell false/
Da ist ein eventMap zu viel
;D ;D ;D Ou man!