FHEM - Hausautomations-Systeme > MQTT

[GELÖST] Hilfe zu neuem Template dingtian Relayboard 8Chn+8Input

(1/5) > >>

rico5588:
Hallo,

ich benötige für o.g. Relay Board ein MQQT2 Template.
In diversen Beiträgen wurde schon diskutiert, aber noch keine Template zuende gebracht, womit man Relays schalten kann.
Oder ich hab es nicht gefunden 8)

Das hat es automatsich angelegt

--- Code: ---defmod MQTT2_dingtian_relay4974 MQTT2_DEVICE dingtian_relay4974
attr MQTT2_dingtian_relay4974 readingList dingtian_relay4974:/dingtian/relay4974/out/lwt_availability:.* lwt_availability\
dingtian_relay4974:/dingtian/relay4974/out/r1:.* r1\
dingtian_relay4974:/dingtian/relay4974/out/r2:.* r2\
dingtian_relay4974:/dingtian/relay4974/out/r3:.* r3\
dingtian_relay4974:/dingtian/relay4974/out/r4:.* r4\
dingtian_relay4974:/dingtian/relay4974/out/r5:.* r5\
dingtian_relay4974:/dingtian/relay4974/out/r6:.* r6\
dingtian_relay4974:/dingtian/relay4974/out/r7:.* r7\
dingtian_relay4974:/dingtian/relay4974/out/r8:.* r8\
dingtian_relay4974:/dingtian/relay4974/out/i1:.* i1\
dingtian_relay4974:/dingtian/relay4974/out/i2:.* i2\
dingtian_relay4974:/dingtian/relay4974/out/i3:.* i3\
dingtian_relay4974:/dingtian/relay4974/out/i4:.* i4\
dingtian_relay4974:/dingtian/relay4974/out/i5:.* i5\
dingtian_relay4974:/dingtian/relay4974/out/i6:.* i6\
dingtian_relay4974:/dingtian/relay4974/out/i7:.* i7\
dingtian_relay4974:/dingtian/relay4974/out/i8:.* i8\
dingtian_relay4974:/dingtian/relay4974/out/relay1:.* { json2nameValue($EVENT) }\
dingtian_relay4974:/dingtian/relay4974/out/relay2:.* { json2nameValue($EVENT) }\
dingtian_relay4974:/dingtian/relay4974/out/relay3:.* { json2nameValue($EVENT) }\
dingtian_relay4974:/dingtian/relay4974/out/relay4:.* { json2nameValue($EVENT) }\
dingtian_relay4974:/dingtian/relay4974/out/relay5:.* { json2nameValue($EVENT) }\
dingtian_relay4974:/dingtian/relay4974/out/relay6:.* { json2nameValue($EVENT) }\
dingtian_relay4974:/dingtian/relay4974/out/relay7:.* { json2nameValue($EVENT) }\
dingtian_relay4974:/dingtian/relay4974/out/relay8:.* { json2nameValue($EVENT) }\
dingtian_relay4974:/dingtian/relay4974/out/input1:.* { json2nameValue($EVENT) }\
dingtian_relay4974:/dingtian/relay4974/out/input2:.* { json2nameValue($EVENT) }\
dingtian_relay4974:/dingtian/relay4974/out/input3:.* { json2nameValue($EVENT) }\
dingtian_relay4974:/dingtian/relay4974/out/input4:.* { json2nameValue($EVENT) }\
dingtian_relay4974:/dingtian/relay4974/out/input5:.* { json2nameValue($EVENT) }\
dingtian_relay4974:/dingtian/relay4974/out/input6:.* { json2nameValue($EVENT) }\
dingtian_relay4974:/dingtian/relay4974/out/input7:.* { json2nameValue($EVENT) }\
dingtian_relay4974:/dingtian/relay4974/out/input8:.* { json2nameValue($EVENT) }\
dingtian_relay4974:/dingtian/relay4974/out/ip:.* ip\
dingtian_relay4974:/dingtian/relay4974/out/sn:.* sn\
dingtian_relay4974:/dingtian/relay4974/out/mac:.* mac\
dingtian_relay4974:/dingtian/relay4974/out/input_cnt:.* input_cnt\
dingtian_relay4974:/dingtian/relay4974/out/relay_cnt:.* relay_cnt
attr MQTT2_dingtian_relay4974 room MQTT2_DEVICE

setstate MQTT2_dingtian_relay4974 2021-10-27 18:06:27 IODev myBroker
setstate MQTT2_dingtian_relay4974 2021-10-27 18:10:40 i1 OFF
setstate MQTT2_dingtian_relay4974 2021-10-27 18:10:40 i2 OFF
setstate MQTT2_dingtian_relay4974 2021-10-27 18:10:40 i3 OFF
setstate MQTT2_dingtian_relay4974 2021-10-27 18:10:40 i4 OFF
setstate MQTT2_dingtian_relay4974 2021-10-27 18:10:40 i5 OFF
setstate MQTT2_dingtian_relay4974 2021-10-27 18:10:40 i6 OFF
setstate MQTT2_dingtian_relay4974 2021-10-27 18:10:40 i7 OFF
setstate MQTT2_dingtian_relay4974 2021-10-27 18:10:40 i8 OFF
setstate MQTT2_dingtian_relay4974 2021-10-27 18:10:40 idx 8
setstate MQTT2_dingtian_relay4974 2021-10-27 18:10:40 input_cnt 8
setstate MQTT2_dingtian_relay4974 2021-10-27 18:10:40 ip 192.168.9.240
setstate MQTT2_dingtian_relay4974 2021-10-27 18:06:27 lwt_availability online
setstate MQTT2_dingtian_relay4974 2021-10-27 18:10:40 mac bc:34:88:00:12:bf
setstate MQTT2_dingtian_relay4974 2021-10-27 18:10:40 r1 ON
setstate MQTT2_dingtian_relay4974 2021-10-27 18:10:40 r2 OFF
setstate MQTT2_dingtian_relay4974 2021-10-27 18:10:40 r3 OFF
setstate MQTT2_dingtian_relay4974 2021-10-27 18:10:40 r4 OFF
setstate MQTT2_dingtian_relay4974 2021-10-27 18:10:40 r5 OFF
setstate MQTT2_dingtian_relay4974 2021-10-27 18:10:40 r6 OFF
setstate MQTT2_dingtian_relay4974 2021-10-27 18:10:40 r7 ON
setstate MQTT2_dingtian_relay4974 2021-10-27 18:10:40 r8 OFF
setstate MQTT2_dingtian_relay4974 2021-10-27 18:10:40 relay_cnt 8
setstate MQTT2_dingtian_relay4974 2021-10-27 18:10:40 sn 4974
setstate MQTT2_dingtian_relay4974 2021-10-27 18:10:40 status HIGH


--- Ende Code ---
Ich habe auch gelesen das mit Hilfe des MQTT2 Broker nützliches zu Tage kommen kann. Bitte um Tips wie man das nutzten kann.

MFG Rico

rudolfkoenig:
Nach "attr m2s rawEvents" (ohne Anfuehrungszeichen) kann man alle MQTT publish Meldungen im Event-Monitor beobachten.
"list m2s" zeigt (auch) alle aktuellen Client-Verbindungen
"list <client-Verbindung>" zeigt die vom Client gesetzten Subscriptions (diese Daten werden an dem Client weitergeleitet) und weitere Infos wie Last-Will&Testament (lwt), ClientID (cid), Benutzer (usr), etc.

Beta-User:
Vorab: Vorbildliche Vorbereitung!

Ich schau's mir bei Gelegenheit an, meine aber, dass es bereits zwei "Relay-Board"-Typen geben müßte, die auch von der Struktur her teilweise ähnlich sind. Bitte diese beiden (oder mehreren) Templates mal raussuchen und auch die Threads dazu anschauen, die sollten nicht allzu lang sein.

Beta-User:
Mit dem morgigen update kommt ein erster Versuch als attrTemplate 8channel_relay_board_8di_split.

rico5588:
Hallo,

der erste Versuch sieht super aus...
Im 1. Device ist Relay 1 und die 8 Eingänge.
Wenn möglich bitte für das 1. Relay auch ein eigenes Device anlegen und aus dem 1. Device die Schaltfunktion von R1 raus nehemn.

Die 8 Eingänge funktionieren perfekt.
Kommt die Logic zum schalten der Relays durch die Eingänge vom Device/Template oder vom physischen Gerät?
Laut der WEB GUI des Gerätes ist immer der Eingang mit dem jeweiligen Relay verknüpft.
Eingang 1 off = Relay 1 off, Eingang 1 On = Relay 1 On....etc. siehe Foto.
Vermutlich gibt es noch ein paar Fehler im Device.

Eingang 1 schaltet R1+R7+R8
Eingang 2 ist i.o. -> Schaltet R2
Eingang 3 ist i.o. -> Schaltet R3
Eingang 4 ist i.o. -> Schaltet R4
Eingang 5 ist i.o.         "
Eingang 6 schaltet R6 aber ohne Statusänderung im Device
Eingang 7 schaltet R7 aber ohne Statusänderung im Device
Eingang 8 schaltet R6

die Device für R6, R7 und R8 schalten nicht richtig oder gar nicht.

anbei die RAW's der Device.
Relay1 + Eingänge

--- Code: ---defmod MQTT2_dingtian_relay4974 MQTT2_DEVICE dingtian_relay4974
attr MQTT2_dingtian_relay4974 comment Channel 1 for MQTT2_dingtian_relay4974, see also MQTT2_dingtian_relay4974_CH2, MQTT2_dingtian_relay4974_CH3, MQTT2_dingtian_relay4974_CH4, MQTT2_dingtian_relay4974_CH5, MQTT2_dingtian_relay4974_CH6, MQTT2_dingtian_relay4974_CH7 and MQTT2_dingtian_relay4974_CH8
attr MQTT2_dingtian_relay4974 devStateIcon offline:rc_STOP@red online:rc_STOP@green
attr MQTT2_dingtian_relay4974 icon on
attr MQTT2_dingtian_relay4974 model 8channel_relay_board_8di_split
attr MQTT2_dingtian_relay4974 readingList /dingtian/relay4974/out/lwt_availability:.* LWT\
  /dingtian/relay4974/out/(relay|input)[1-8]:.* {}\
  /dingtian/relay4974/out/r1:.* { my $state = lc $EVENT;; return if ReadingsVal($NAME,'state','unknown') eq $state;; {state=>$state} }\
  /dingtian/relay4974/out/i1:.* {my $state = lc $EVENT;; return if ReadingsVal($NAME,'di1','unknown') eq $state;; {di1=>$state}}\
  /dingtian/relay4974/out/i2:.* {my $state = lc $EVENT;; return if ReadingsVal($NAME,'di2','unknown') eq $state;; {di2=>$state}}\
  /dingtian/relay4974/out/i3:.* {my $state = lc $EVENT;; return if ReadingsVal($NAME,'di3','unknown') eq $state;; {di3=>$state}}\
  /dingtian/relay4974/out/i4:.* {my $state = lc $EVENT;; return if ReadingsVal($NAME,'di4','unknown') eq $state;; {di4=>$state}}\
  /dingtian/relay4974/out/i5:.* {my $state = lc $EVENT;; return if ReadingsVal($NAME,'di5','unknown') eq $state;; {di5=>$state}}\
  /dingtian/relay4974/out/i6:.* {my $state = lc $EVENT;; return if ReadingsVal($NAME,'di6','unknown') eq $state;; {di6=>$state}}\
  /dingtian/relay4974/out/i7:.* {my $state = lc $EVENT;; return if ReadingsVal($NAME,'di7','unknown') eq $state;; {di7=>$state}}\
  /dingtian/relay4974/out/i8:.* {my $state = lc $EVENT;; return if ReadingsVal($NAME,'di8','unknown') eq $state;; {di8=>$state}}\
  /dingtian/relay4974/out/ip:.* ip\
  /dingtian/relay4974/out/sn:.* sn\
  /dingtian/relay4974/out/mac:.* mac\
  /dingtian/relay4974/out/dicnt:.* dicnt\
  /dingtian/relay4974/out/relay_cnt:.* relay_cnt\
dingtian_relay4974:/dingtian/relay4974/out/r6:.* r6\
dingtian_relay4974:/dingtian/relay4974/out/r7:.* r7\
dingtian_relay4974:/dingtian/relay4974/out/input_cnt:.* input_cnt
attr MQTT2_dingtian_relay4974 room MQTT2_DEVICE
attr MQTT2_dingtian_relay4974 setExtensionsEvent 1
attr MQTT2_dingtian_relay4974 setList on:noArg /dingtian/relay4974/in/r1 ON\
  off:noArg /dingtian/relay4974/in/r1 OFF
attr MQTT2_dingtian_relay4974 stateFormat LWT\
state\
<br>\
DigiIn\
di1\
di2\
di3\
di4\
di5\
di6\
di7\
di8
attr MQTT2_dingtian_relay4974 webCmd :

setstate MQTT2_dingtian_relay4974 LWT\
off\
<br>\
DigiIn\
off\
off\
off\
off\
off\
off\
off\
off
setstate MQTT2_dingtian_relay4974 2021-10-29 09:48:46 IODev myBroker
setstate MQTT2_dingtian_relay4974 2021-10-29 09:51:55 associatedWith MQTT2_dingtian_relay4974_CH1,MQTT2_dingtian_relay4974_CH2,MQTT2_dingtian_relay4974_CH3,MQTT2_dingtian_relay4974_CH4,MQTT2_dingtian_relay4974_CH5,MQTT2_dingtian_relay4974_CH6,MQTT2_dingtian_relay4974_CH7,MQTT2_dingtian_relay4974_CH8
setstate MQTT2_dingtian_relay4974 2021-10-29 09:51:55 attrTemplateVersion 20211028
setstate MQTT2_dingtian_relay4974 2021-10-29 10:10:56 di1 off
setstate MQTT2_dingtian_relay4974 2021-10-29 10:04:21 di2 off
setstate MQTT2_dingtian_relay4974 2021-10-29 10:04:43 di3 off
setstate MQTT2_dingtian_relay4974 2021-10-29 10:04:58 di4 off
setstate MQTT2_dingtian_relay4974 2021-10-29 10:05:12 di5 off
setstate MQTT2_dingtian_relay4974 2021-10-29 10:09:16 di6 off
setstate MQTT2_dingtian_relay4974 2021-10-29 10:09:38 di7 off
setstate MQTT2_dingtian_relay4974 2021-10-29 10:11:19 di8 off
setstate MQTT2_dingtian_relay4974 2021-10-29 10:16:16 input_cnt 8
setstate MQTT2_dingtian_relay4974 2021-10-29 10:16:16 ip 192.168.9.240
setstate MQTT2_dingtian_relay4974 2021-10-29 10:16:16 mac bc:34:88:00:12:bf
setstate MQTT2_dingtian_relay4974 2021-10-29 10:16:16 r6 OFF
setstate MQTT2_dingtian_relay4974 2021-10-29 10:16:16 r7 ON
setstate MQTT2_dingtian_relay4974 2021-10-29 10:16:16 relay_cnt 8
setstate MQTT2_dingtian_relay4974 2021-10-29 10:16:16 sn 4974
setstate MQTT2_dingtian_relay4974 2021-10-29 10:14:30 state off


--- Ende Code ---
Relay 2

--- Code: ---defmod MQTT2_dingtian_relay4974_CH2 MQTT2_DEVICE dingtian_relay4974
attr MQTT2_dingtian_relay4974_CH2 comment Channel 2 for MQTT2_dingtian_relay4974, see also MQTT2_dingtian_relay4974, MQTT2_dingtian_relay4974_CH3, MQTT2_dingtian_relay4974_CH4, MQTT2_dingtian_relay4974_CH5, MQTT2_dingtian_relay4974_CH6, MQTT2_dingtian_relay4974_CH7 and MQTT2_dingtian_relay4974_CH8
attr MQTT2_dingtian_relay4974_CH2 icon on
attr MQTT2_dingtian_relay4974_CH2 model 8channel_relay_board_8di_split
attr MQTT2_dingtian_relay4974_CH2 readingList /dingtian/relay4974/out/r2:.* { my $state = lc $EVENT;; return if ReadingsVal($NAME,'state','unknown') eq $state;; {state=>$state} }\
dingtian_relay4974:/dingtian/relay4974/out/r6:.* r6\
dingtian_relay4974:/dingtian/relay4974/out/r7:.* r7\
dingtian_relay4974:/dingtian/relay4974/out/input_cnt:.* input_cnt
attr MQTT2_dingtian_relay4974_CH2 room MQTT2_DEVICE
attr MQTT2_dingtian_relay4974_CH2 setExtensionsEvent 1
attr MQTT2_dingtian_relay4974_CH2 setList on:noArg /dingtian/relay4974/in/r2 ON\
  off:noArg /dingtian/relay4974/in/r2 OFF
attr MQTT2_dingtian_relay4974_CH2 webCmd :

setstate MQTT2_dingtian_relay4974_CH2 off
setstate MQTT2_dingtian_relay4974_CH2 2021-10-29 09:51:55 IODev myBroker
setstate MQTT2_dingtian_relay4974_CH2 2021-10-29 09:51:55 associatedWith MQTT2_dingtian_relay4974,MQTT2_dingtian_relay4974_CH1,MQTT2_dingtian_relay4974_CH3,MQTT2_dingtian_relay4974_CH4,MQTT2_dingtian_relay4974_CH5,MQTT2_dingtian_relay4974_CH6,MQTT2_dingtian_relay4974_CH7,MQTT2_dingtian_relay4974_CH8
setstate MQTT2_dingtian_relay4974_CH2 2021-10-29 09:51:55 attrTemplateVersion 20211028
setstate MQTT2_dingtian_relay4974_CH2 2021-10-29 10:16:46 input_cnt 8
setstate MQTT2_dingtian_relay4974_CH2 2021-10-29 10:16:46 r6 OFF
setstate MQTT2_dingtian_relay4974_CH2 2021-10-29 10:16:46 r7 ON
setstate MQTT2_dingtian_relay4974_CH2 2021-10-29 10:14:38 state off


--- Ende Code ---
Relay3

--- Code: ---defmod MQTT2_dingtian_relay4974_CH3 MQTT2_DEVICE dingtian_relay4974
attr MQTT2_dingtian_relay4974_CH3 comment Channel 3 for MQTT2_dingtian_relay4974, see also MQTT2_dingtian_relay4974, MQTT2_dingtian_relay4974_CH2, MQTT2_dingtian_relay4974_CH4, MQTT2_dingtian_relay4974_CH5, MQTT2_dingtian_relay4974_CH6, MQTT2_dingtian_relay4974_CH7 and MQTT2_dingtian_relay4974_CH8
attr MQTT2_dingtian_relay4974_CH3 icon on
attr MQTT2_dingtian_relay4974_CH3 model 8channel_relay_board_8di_split
attr MQTT2_dingtian_relay4974_CH3 readingList /dingtian/relay4974/out/r3:.* { my $state = lc $EVENT;; return if ReadingsVal($NAME,'state','unknown') eq $state;; {state=>$state} }\
dingtian_relay4974:/dingtian/relay4974/out/r6:.* r6\
dingtian_relay4974:/dingtian/relay4974/out/r7:.* r7\
dingtian_relay4974:/dingtian/relay4974/out/input_cnt:.* input_cnt
attr MQTT2_dingtian_relay4974_CH3 room MQTT2_DEVICE
attr MQTT2_dingtian_relay4974_CH3 setExtensionsEvent 1
attr MQTT2_dingtian_relay4974_CH3 setList on:noArg /dingtian/relay4974/in/r3 ON\
  off:noArg /dingtian/relay4974/in/r3 OFF
attr MQTT2_dingtian_relay4974_CH3 webCmd :

setstate MQTT2_dingtian_relay4974_CH3 off
setstate MQTT2_dingtian_relay4974_CH3 2021-10-29 09:51:55 IODev myBroker
setstate MQTT2_dingtian_relay4974_CH3 2021-10-29 09:51:55 associatedWith MQTT2_dingtian_relay4974,MQTT2_dingtian_relay4974_CH1,MQTT2_dingtian_relay4974_CH2,MQTT2_dingtian_relay4974_CH4,MQTT2_dingtian_relay4974_CH5,MQTT2_dingtian_relay4974_CH6,MQTT2_dingtian_relay4974_CH7,MQTT2_dingtian_relay4974_CH8
setstate MQTT2_dingtian_relay4974_CH3 2021-10-29 09:51:55 attrTemplateVersion 20211028
setstate MQTT2_dingtian_relay4974_CH3 2021-10-29 10:18:46 input_cnt 8
setstate MQTT2_dingtian_relay4974_CH3 2021-10-29 10:18:46 r6 OFF
setstate MQTT2_dingtian_relay4974_CH3 2021-10-29 10:18:46 r7 ON
setstate MQTT2_dingtian_relay4974_CH3 2021-10-29 10:14:40 state off


--- Ende Code ---
Relay 4

--- Code: ---defmod MQTT2_dingtian_relay4974_CH4 MQTT2_DEVICE dingtian_relay4974
attr MQTT2_dingtian_relay4974_CH4 comment Channel 4 for MQTT2_dingtian_relay4974, see also MQTT2_dingtian_relay4974, MQTT2_dingtian_relay4974_CH2, MQTT2_dingtian_relay4974_CH3, MQTT2_dingtian_relay4974_CH5, MQTT2_dingtian_relay4974_CH6, MQTT2_dingtian_relay4974_CH7 and MQTT2_dingtian_relay4974_CH8
attr MQTT2_dingtian_relay4974_CH4 icon on
attr MQTT2_dingtian_relay4974_CH4 model 8channel_relay_board_8di_split
attr MQTT2_dingtian_relay4974_CH4 readingList /dingtian/relay4974/out/r4:.* { my $state = lc $EVENT;; return if ReadingsVal($NAME,'state','unknown') eq $state;; {state=>$state} }\
dingtian_relay4974:/dingtian/relay4974/out/r6:.* r6\
dingtian_relay4974:/dingtian/relay4974/out/r7:.* r7\
dingtian_relay4974:/dingtian/relay4974/out/input_cnt:.* input_cnt
attr MQTT2_dingtian_relay4974_CH4 room MQTT2_DEVICE
attr MQTT2_dingtian_relay4974_CH4 setExtensionsEvent 1
attr MQTT2_dingtian_relay4974_CH4 setList on:noArg /dingtian/relay4974/in/r4 ON\
  off:noArg /dingtian/relay4974/in/r4 OFF
attr MQTT2_dingtian_relay4974_CH4 webCmd :

setstate MQTT2_dingtian_relay4974_CH4 off
setstate MQTT2_dingtian_relay4974_CH4 2021-10-29 09:51:55 IODev myBroker
setstate MQTT2_dingtian_relay4974_CH4 2021-10-29 09:51:55 associatedWith MQTT2_dingtian_relay4974,MQTT2_dingtian_relay4974_CH1,MQTT2_dingtian_relay4974_CH2,MQTT2_dingtian_relay4974_CH3,MQTT2_dingtian_relay4974_CH5,MQTT2_dingtian_relay4974_CH6,MQTT2_dingtian_relay4974_CH7,MQTT2_dingtian_relay4974_CH8
setstate MQTT2_dingtian_relay4974_CH4 2021-10-29 09:51:55 attrTemplateVersion 20211028
setstate MQTT2_dingtian_relay4974_CH4 2021-10-29 10:19:16 input_cnt 8
setstate MQTT2_dingtian_relay4974_CH4 2021-10-29 10:19:16 r6 OFF
setstate MQTT2_dingtian_relay4974_CH4 2021-10-29 10:19:16 r7 ON
setstate MQTT2_dingtian_relay4974_CH4 2021-10-29 10:14:41 state off


--- Ende Code ---
Relay 5

--- Code: ---defmod MQTT2_dingtian_relay4974_CH5 MQTT2_DEVICE dingtian_relay4974
attr MQTT2_dingtian_relay4974_CH5 comment Channel 5 for MQTT2_dingtian_relay4974, see also MQTT2_dingtian_relay4974, MQTT2_dingtian_relay4974_CH2, MQTT2_dingtian_relay4974_CH3, MQTT2_dingtian_relay4974_CH4, MQTT2_dingtian_relay4974_CH6, MQTT2_dingtian_relay4974_CH7 and MQTT2_dingtian_relay4974_CH8
attr MQTT2_dingtian_relay4974_CH5 icon on
attr MQTT2_dingtian_relay4974_CH5 model 8channel_relay_board_8di_split
attr MQTT2_dingtian_relay4974_CH5 readingList /dingtian/relay4974/out/r5:.* { my $state = lc $EVENT;; return if ReadingsVal($NAME,'state','unknown') eq $state;; {state=>$state} }\
dingtian_relay4974:/dingtian/relay4974/out/r6:.* r6\
dingtian_relay4974:/dingtian/relay4974/out/r7:.* r7\
dingtian_relay4974:/dingtian/relay4974/out/input_cnt:.* input_cnt
attr MQTT2_dingtian_relay4974_CH5 room MQTT2_DEVICE
attr MQTT2_dingtian_relay4974_CH5 setExtensionsEvent 1
attr MQTT2_dingtian_relay4974_CH5 setList on:noArg /dingtian/relay4974/in/r5 ON\
  off:noArg /dingtian/relay4974/in/r5 OFF
attr MQTT2_dingtian_relay4974_CH5 webCmd :

setstate MQTT2_dingtian_relay4974_CH5 off
setstate MQTT2_dingtian_relay4974_CH5 2021-10-29 09:51:55 IODev myBroker
setstate MQTT2_dingtian_relay4974_CH5 2021-10-29 09:51:55 associatedWith MQTT2_dingtian_relay4974,MQTT2_dingtian_relay4974_CH1,MQTT2_dingtian_relay4974_CH2,MQTT2_dingtian_relay4974_CH3,MQTT2_dingtian_relay4974_CH4,MQTT2_dingtian_relay4974_CH6,MQTT2_dingtian_relay4974_CH7,MQTT2_dingtian_relay4974_CH8
setstate MQTT2_dingtian_relay4974_CH5 2021-10-29 09:51:55 attrTemplateVersion 20211028
setstate MQTT2_dingtian_relay4974_CH5 2021-10-29 10:19:46 input_cnt 8
setstate MQTT2_dingtian_relay4974_CH5 2021-10-29 10:19:46 r6 OFF
setstate MQTT2_dingtian_relay4974_CH5 2021-10-29 10:19:46 r7 ON
setstate MQTT2_dingtian_relay4974_CH5 2021-10-29 10:14:42 state off


--- Ende Code ---
Relay 6

--- Code: ---defmod MQTT2_dingtian_relay4974_CH6 MQTT2_DEVICE dingtian_relay4974
attr MQTT2_dingtian_relay4974_CH6 comment Channel 6 for MQTT2_dingtian_relay4974, see also MQTT2_dingtian_relay4974, MQTT2_dingtian_relay4974_CH2, MQTT2_dingtian_relay4974_CH3, MQTT2_dingtian_relay4974_CH4, MQTT2_dingtian_relay4974_CH5, MQTT2_dingtian_relay4974_CH7 and MQTT2_dingtian_relay4974_CH8
attr MQTT2_dingtian_relay4974_CH6 icon on
attr MQTT2_dingtian_relay4974_CH6 model 8channel_relay_board_8di_split
attr MQTT2_dingtian_relay4974_CH6 readingList /dingtian/relay4974/out/r8:.* { my $state = lc $EVENT;; return if ReadingsVal($NAME,'state','unknown') eq $state;; {state=>$state} }\
dingtian_relay4974:/dingtian/relay4974/out/r6:.* r6\
dingtian_relay4974:/dingtian/relay4974/out/r7:.* r7\
dingtian_relay4974:/dingtian/relay4974/out/input_cnt:.* input_cnt
attr MQTT2_dingtian_relay4974_CH6 room MQTT2_DEVICE
attr MQTT2_dingtian_relay4974_CH6 setExtensionsEvent 1
attr MQTT2_dingtian_relay4974_CH6 setList on:noArg /dingtian/relay4974/in/r6 ON\
  off:noArg /dingtian/relay4974/in/r6 OFF
attr MQTT2_dingtian_relay4974_CH6 webCmd :

setstate MQTT2_dingtian_relay4974_CH6 off
setstate MQTT2_dingtian_relay4974_CH6 2021-10-29 09:51:55 IODev myBroker
setstate MQTT2_dingtian_relay4974_CH6 2021-10-29 09:51:55 associatedWith MQTT2_dingtian_relay4974,MQTT2_dingtian_relay4974_CH1,MQTT2_dingtian_relay4974_CH2,MQTT2_dingtian_relay4974_CH3,MQTT2_dingtian_relay4974_CH4,MQTT2_dingtian_relay4974_CH5,MQTT2_dingtian_relay4974_CH7,MQTT2_dingtian_relay4974_CH8
setstate MQTT2_dingtian_relay4974_CH6 2021-10-29 09:51:55 attrTemplateVersion 20211028
setstate MQTT2_dingtian_relay4974_CH6 2021-10-29 10:20:16 input_cnt 8
setstate MQTT2_dingtian_relay4974_CH6 2021-10-29 10:20:16 r6 OFF
setstate MQTT2_dingtian_relay4974_CH6 2021-10-29 10:20:16 r7 ON
setstate MQTT2_dingtian_relay4974_CH6 2021-10-29 10:14:50 state off


--- Ende Code ---
Relay 7

--- Code: ---defmod MQTT2_dingtian_relay4974_CH7 MQTT2_DEVICE dingtian_relay4974
attr MQTT2_dingtian_relay4974_CH7 comment Channel 7 for MQTT2_dingtian_relay4974, see also MQTT2_dingtian_relay4974, MQTT2_dingtian_relay4974_CH2, MQTT2_dingtian_relay4974_CH3, MQTT2_dingtian_relay4974_CH4, MQTT2_dingtian_relay4974_CH5, MQTT2_dingtian_relay4974_CH6, and MQTT2_dingtian_relay4974_CH8
attr MQTT2_dingtian_relay4974_CH7 icon on
attr MQTT2_dingtian_relay4974_CH7 model 8channel_relay_board_8di_split
attr MQTT2_dingtian_relay4974_CH7 readingList /dingtian/relay4974/out/lwt_availability:.* LWT\
  /dingtian/relay4974/out/(relay|input)[1-8]:.* {}\
  /dingtian/relay4974/out/r1:.* { my $state = lc $EVENT;; return if ReadingsVal($NAME,'state','unknown') eq $state;; {state=>$state} }\
  /dingtian/relay4974/out/i1:.* {my $state = lc $EVENT;; return if ReadingsVal($NAME,'di1','unknown') eq $state;; {di1=>$state}}\
  /dingtian/relay4974/out/i2:.* {my $state = lc $EVENT;; return if ReadingsVal($NAME,'di2','unknown') eq $state;; {di2=>$state}}\
  /dingtian/relay4974/out/i3:.* {my $state = lc $EVENT;; return if ReadingsVal($NAME,'di3','unknown') eq $state;; {di3=>$state}}\
  /dingtian/relay4974/out/i4:.* {my $state = lc $EVENT;; return if ReadingsVal($NAME,'di4','unknown') eq $state;; {di4=>$state}}\
  /dingtian/relay4974/out/i5:.* {my $state = lc $EVENT;; return if ReadingsVal($NAME,'di5','unknown') eq $state;; {di5=>$state}}\
  /dingtian/relay4974/out/i6:.* {my $state = lc $EVENT;; return if ReadingsVal($NAME,'di6','unknown') eq $state;; {di6=>$state}}\
  /dingtian/relay4974/out/i7:.* {my $state = lc $EVENT;; return if ReadingsVal($NAME,'di7','unknown') eq $state;; {di7=>$state}}\
  /dingtian/relay4974/out/i8:.* {my $state = lc $EVENT;; return if ReadingsVal($NAME,'di8','unknown') eq $state;; {di8=>$state}}\
  /dingtian/relay4974/out/ip:.* ip\
  /dingtian/relay4974/out/sn:.* sn\
  /dingtian/relay4974/out/mac:.* mac\
  /dingtian/relay4974/out/dicnt:.* dicnt\
  /dingtian/relay4974/out/relay_cnt:.* relay_cnt\
dingtian_relay4974:/dingtian/relay4974/out/r6:.* r6\
dingtian_relay4974:/dingtian/relay4974/out/r7:.* r7\
dingtian_relay4974:/dingtian/relay4974/out/input_cnt:.* input_cnt
attr MQTT2_dingtian_relay4974_CH7 room MQTT2_DEVICE
attr MQTT2_dingtian_relay4974_CH7 setExtensionsEvent 1
attr MQTT2_dingtian_relay4974_CH7 setList on:noArg /dingtian/relay4974/in/r7 ON\
  off:noArg /dingtian/relay4974/in/r7 OFF
attr MQTT2_dingtian_relay4974_CH7 webCmd :

setstate MQTT2_dingtian_relay4974_CH7 off
setstate MQTT2_dingtian_relay4974_CH7 2021-10-29 09:51:55 IODev myBroker
setstate MQTT2_dingtian_relay4974_CH7 2021-10-29 09:51:55 associatedWith MQTT2_dingtian_relay4974,MQTT2_dingtian_relay4974_CH1,MQTT2_dingtian_relay4974_CH2,MQTT2_dingtian_relay4974_CH3,MQTT2_dingtian_relay4974_CH4,MQTT2_dingtian_relay4974_CH5,MQTT2_dingtian_relay4974_CH6,MQTT2_dingtian_relay4974_CH8
setstate MQTT2_dingtian_relay4974_CH7 2021-10-29 09:51:55 attrTemplateVersion 20211028
setstate MQTT2_dingtian_relay4974_CH7 2021-10-29 10:10:56 di1 off
setstate MQTT2_dingtian_relay4974_CH7 2021-10-29 10:04:21 di2 off
setstate MQTT2_dingtian_relay4974_CH7 2021-10-29 10:04:43 di3 off
setstate MQTT2_dingtian_relay4974_CH7 2021-10-29 10:04:58 di4 off
setstate MQTT2_dingtian_relay4974_CH7 2021-10-29 10:05:12 di5 off
setstate MQTT2_dingtian_relay4974_CH7 2021-10-29 10:09:16 di6 off
setstate MQTT2_dingtian_relay4974_CH7 2021-10-29 10:09:38 di7 off
setstate MQTT2_dingtian_relay4974_CH7 2021-10-29 10:11:19 di8 off
setstate MQTT2_dingtian_relay4974_CH7 2021-10-29 10:20:16 input_cnt 8
setstate MQTT2_dingtian_relay4974_CH7 2021-10-29 10:20:16 ip 192.168.9.240
setstate MQTT2_dingtian_relay4974_CH7 2021-10-29 10:20:16 mac bc:34:88:00:12:bf
setstate MQTT2_dingtian_relay4974_CH7 2021-10-29 10:20:16 r6 OFF
setstate MQTT2_dingtian_relay4974_CH7 2021-10-29 10:20:16 r7 ON
setstate MQTT2_dingtian_relay4974_CH7 2021-10-29 10:20:16 relay_cnt 8
setstate MQTT2_dingtian_relay4974_CH7 2021-10-29 10:20:16 sn 4974
setstate MQTT2_dingtian_relay4974_CH7 2021-10-29 10:14:46 state off


--- Ende Code ---
Relay8

--- Code: ---defmod MQTT2_dingtian_relay4974_CH8 MQTT2_DEVICE dingtian_relay4974
attr MQTT2_dingtian_relay4974_CH8 comment Channel 8 for MQTT2_dingtian_relay4974, see also MQTT2_dingtian_relay4974, MQTT2_dingtian_relay4974_CH2, MQTT2_dingtian_relay4974_CH3, MQTT2_dingtian_relay4974_CH4, MQTT2_dingtian_relay4974_CH5, MQTT2_dingtian_relay4974_CH6 and MQTT2_dingtian_relay4974_CH7
attr MQTT2_dingtian_relay4974_CH8 icon on
attr MQTT2_dingtian_relay4974_CH8 model 8channel_relay_board_8di_split
attr MQTT2_dingtian_relay4974_CH8 readingList /dingtian/relay4974/out/lwt_availability:.* LWT\
  /dingtian/relay4974/out/(relay|input)[1-8]:.* {}\
  /dingtian/relay4974/out/r1:.* { my $state = lc $EVENT;; return if ReadingsVal($NAME,'state','unknown') eq $state;; {state=>$state} }\
  /dingtian/relay4974/out/i1:.* {my $state = lc $EVENT;; return if ReadingsVal($NAME,'di1','unknown') eq $state;; {di1=>$state}}\
  /dingtian/relay4974/out/i2:.* {my $state = lc $EVENT;; return if ReadingsVal($NAME,'di2','unknown') eq $state;; {di2=>$state}}\
  /dingtian/relay4974/out/i3:.* {my $state = lc $EVENT;; return if ReadingsVal($NAME,'di3','unknown') eq $state;; {di3=>$state}}\
  /dingtian/relay4974/out/i4:.* {my $state = lc $EVENT;; return if ReadingsVal($NAME,'di4','unknown') eq $state;; {di4=>$state}}\
  /dingtian/relay4974/out/i5:.* {my $state = lc $EVENT;; return if ReadingsVal($NAME,'di5','unknown') eq $state;; {di5=>$state}}\
  /dingtian/relay4974/out/i6:.* {my $state = lc $EVENT;; return if ReadingsVal($NAME,'di6','unknown') eq $state;; {di6=>$state}}\
  /dingtian/relay4974/out/i7:.* {my $state = lc $EVENT;; return if ReadingsVal($NAME,'di7','unknown') eq $state;; {di7=>$state}}\
  /dingtian/relay4974/out/i8:.* {my $state = lc $EVENT;; return if ReadingsVal($NAME,'di8','unknown') eq $state;; {di8=>$state}}\
  /dingtian/relay4974/out/ip:.* ip\
  /dingtian/relay4974/out/sn:.* sn\
  /dingtian/relay4974/out/mac:.* mac\
  /dingtian/relay4974/out/dicnt:.* dicnt\
  /dingtian/relay4974/out/relay_cnt:.* relay_cnt\
dingtian_relay4974:/dingtian/relay4974/out/r6:.* r6\
dingtian_relay4974:/dingtian/relay4974/out/r7:.* r7\
dingtian_relay4974:/dingtian/relay4974/out/input_cnt:.* input_cnt
attr MQTT2_dingtian_relay4974_CH8 room MQTT2_DEVICE
attr MQTT2_dingtian_relay4974_CH8 setExtensionsEvent 1
attr MQTT2_dingtian_relay4974_CH8 setList on:noArg /dingtian/relay4974/in/r8 ON\
  off:noArg /dingtian/relay4974/in/r8 OFF
attr MQTT2_dingtian_relay4974_CH8 webCmd :

setstate MQTT2_dingtian_relay4974_CH8 off
setstate MQTT2_dingtian_relay4974_CH8 2021-10-29 09:51:55 IODev myBroker
setstate MQTT2_dingtian_relay4974_CH8 2021-10-29 09:51:55 associatedWith MQTT2_dingtian_relay4974,MQTT2_dingtian_relay4974_CH1,MQTT2_dingtian_relay4974_CH2,MQTT2_dingtian_relay4974_CH3,MQTT2_dingtian_relay4974_CH4,MQTT2_dingtian_relay4974_CH5,MQTT2_dingtian_relay4974_CH6,MQTT2_dingtian_relay4974_CH7
setstate MQTT2_dingtian_relay4974_CH8 2021-10-29 09:51:55 attrTemplateVersion 20211028
setstate MQTT2_dingtian_relay4974_CH8 2021-10-29 10:10:56 di1 off
setstate MQTT2_dingtian_relay4974_CH8 2021-10-29 10:04:21 di2 off
setstate MQTT2_dingtian_relay4974_CH8 2021-10-29 10:04:43 di3 off
setstate MQTT2_dingtian_relay4974_CH8 2021-10-29 10:04:58 di4 off
setstate MQTT2_dingtian_relay4974_CH8 2021-10-29 10:05:12 di5 off
setstate MQTT2_dingtian_relay4974_CH8 2021-10-29 10:09:16 di6 off
setstate MQTT2_dingtian_relay4974_CH8 2021-10-29 10:09:38 di7 off
setstate MQTT2_dingtian_relay4974_CH8 2021-10-29 10:11:19 di8 off
setstate MQTT2_dingtian_relay4974_CH8 2021-10-29 10:20:46 input_cnt 8
setstate MQTT2_dingtian_relay4974_CH8 2021-10-29 10:20:46 ip 192.168.9.240
setstate MQTT2_dingtian_relay4974_CH8 2021-10-29 10:20:46 mac bc:34:88:00:12:bf
setstate MQTT2_dingtian_relay4974_CH8 2021-10-29 10:20:46 r6 OFF
setstate MQTT2_dingtian_relay4974_CH8 2021-10-29 10:20:46 r7 ON
setstate MQTT2_dingtian_relay4974_CH8 2021-10-29 10:20:46 relay_cnt 8
setstate MQTT2_dingtian_relay4974_CH8 2021-10-29 10:20:46 sn 4974
setstate MQTT2_dingtian_relay4974_CH8 2021-10-29 10:14:50 state off


--- Ende Code ---

Danke vorab schonmal für das Template. Rico

Navigation

[0] Themen-Index

[#] Nächste Seite

Zur normalen Ansicht wechseln