-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmqtt2.template
5856 lines (5587 loc) · 407 KB
/
mqtt2.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
###########################################
# $Id: mqtt2.template 27278 2023-02-27 19:53:24Z Beta-User $
#
# Comments start with #. Empty lines are ignored.
# Syntax of one entry: name: line, one optional filter: line, zero or more par: lines, FHEM-Commands
# filter:INTERNAL=VALUE (optional)
# par: name of the parameter; comment; perl_code (optional)
# perl_code returns a value for the parameter, or undef.
# If undef, the user has to specify them (the comment is shown to the user)
###########################################
name:General_Info
filter:TYPE=MQTT2_DEVICE
desc: <a href="https://forum.fhem.de/index.php/topic,94495.0.html">Forum Thread</a> for <br>- suggesting new templates <br>- bug reports on mqtt2.template<br>NOTE: Some templates are only visible in case the existing device configuration meets some minimum requirements, e.g. the CID starting with "zigbee"! <br>Have a look in the mqtt2.template file itself to get more info
order:000000
###############
#MQTT2_CLIENT_Bridge
#
name:MQTT2_CLIENT_general_bridge
filter:TYPE=MQTT2_DEVICE
desc:recommended to use this as general bridgeing device when using MQTT2_CLIENT as IO to get around missing CID info for distinguishing different popular devices<br>NOTE:<br>This might create a new MQTT2-device or change existing ones, especially destroy readingList attributes!
order:000001
farewell:As you are using MQTT2_CLIENT, you should consider also setting an appropriate ignoreRegexp attribute to the MQTT2_CLIENT device! See attrTemplate MQTT2_IO_ignoreRegexp_basic for details.
#par:DEVCID;CID of the device as written in the DEF; { InternalVal(AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',undef)->{NAME}),'clientId','mosquitto') eq InternalVal('DEVICE','DEF','mosquitto') ? 'MQTT2_GeneralBridge'" : InternalVal('DEVICE','DEF','mosquitto')}
par:ICON;ICON as set, defaults to mqtt_bridge_2;{ AttrVal("DEVICE","icon","mqtt_bridge_2") }
attr DEVICE icon ICON
attr DEVICE bridgeRegexp \
(tele|stat|shellies|valetudo|Advantech)/([^/]+)/.*:.* "$2"\
(shellyp(lus|ro4pm)[^/:_]{4,}+)/.*:.* "$1"\
zigbee2mqtt/bridge/.*:.* "zigbee2mqtt"\
sonos/connected.* "sonos"\
tvheadend/[^/:]+.* "tvheadend"\
milight/LWT:.* "milight"\
(ESPClient_[^/]+)/.*:.* "$1"\
(ebusd[^/]*)/global/.*:.* "$1"\
[^/]+/(ems-esp[^/]+)/start:.* "$1"\
(mygateway[\d]+)-(in|out)/.* "$1"\
(wallpanel|wled)/([^/]+)/.*:.* "$1_$2"\
go-eCharger/([^/]+)/.*:.* "go_eCharger_$1"\
owntracks/[^/]+/([^/:]+).* "owntracks_$1"\
home/(O[^/]*M[^/]*G[^/]*)/LWT:.* "$1"\
instar/([^/]+)/.*:.* "instar_$1"\
homeassistant/.*/config:.* ""\
tasmota/discovery/[^/:]+/(config|sensors):.* ""
attr DEVICE setList clear_all:noArg {fhem("deleteattr $NAME readingList; deletereading -q $NAME (?!associatedWith|IODev).*");return undef}
attr DEVICE autocreate 1
attr DEVICE comment Do not use very open bridgeRegexp expressions! This might lead to irritating results... Especially make sure to not have two regexpes that may both match!
attr DEVICE setStateList on off
farewell:template has been applied successfully. Be carefull when extending the brigeRegexp!
attr DEVICE model MQTT2_CLIENT_general_bridge
setreading DEVICE attrTemplateVersion 20220110
###############
#MQTT2 IO ignoreRegexp
#
name:MQTT2_IO_ignoreRegexp_basic
desc:Adds a new ignoreRegexp to the courrent IO device of device it is applied to. This will prevent evaluation of incoming messages typically meant to go towards the hardware including branches with "cmnd" tasmota and "command" for shelly. <br>Additionally homeassistat discovery branch will be deactivated. <br>NOTE: early experimental version...
filter:TYPE=MQTT2_DEVICE
order:000002
par:IODEVNAME;Name of the IO-Device; { InternalVal('DEVICE','LASTInputDev',AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',undef)->{NAME})) }
set DEVICE attrTemplate MQTT2_IO_ignoreRegexp_shelly \IODEVNAME=IODEVNAME
set DEVICE attrTemplate MQTT2_IO_ignoreRegexp_tasmota \IODEVNAME=IODEVNAME
set DEVICE attrTemplate MQTT2_IO_ignoreRegexp_homeassistant \IODEVNAME=IODEVNAME
setreading IODEVNAME attrTemplateVersion 20210528
name:MQTT2_IO_ignoreRegexp_tasmota
filter:TYPE=MQTT2_DEVICE
desc:Adds a new ignoreRegexp to the courrent IO device of device it is applied to. This will prevent evaluation of incoming messages typically meant to go towards the hardware including branches with "cmnd" tasmota. <br>NOTE: early experimental version...
order:0000021
par:IODEVNAME;Name of the IO-Device; { InternalVal('DEVICE','LASTInputDev',AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',undef)->{NAME})) }
par:NEWIGNOREREGEXP;NEWIGNOREREGEXP as set if expression is already included, otherwise it will be added;{ my $old = AttrVal(InternalVal('DEVICE','LASTInputDev',AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',undef)->{NAME})),'ignoreRegexp','cmnd/[^:"]+:'); 'cmnd/[^:"]+:' =~ m/$old/ ? $old : $old.'|cmnd/[^:"]+:' }
attr IODEVNAME ignoreRegexp NEWIGNOREREGEXP
name:MQTT2_IO_ignoreRegexp_shelly
filter:TYPE=MQTT2_DEVICE
desc:Adds a new ignoreRegexp to the courrent IO device of device it is applied to. This will prevent evaluation of incoming messages typically meant to go towards the hardware including branches with "command" for shelly. <br>NOTE: early experimental version!!! <b>This is known for some strange effects, so make sure to have a copy of the existing one, of it's already sophisticated...</b>
order:0000022
par:IODEVNAME;Name of the IO-Device; { InternalVal('DEVICE','LASTInputDev',AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',undef)->{NAME})) }
par:NEWIGNOREREGEXP;NEWIGNOREREGEXP as set if shelly is included, otherwise it will be added;{ my $old = AttrVal(InternalVal('DEVICE','LASTInputDev',AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',undef)->{NAME})),'ignoreRegexp','shellies/[^:"]+/command'); 'shellies/[^:"]+/command' =~ m{$old} ? $old : $old.'|shellies/[^:"]+/command' }
option:{return 1 if 'NEWIGNOREREGEXP' ne AttrVal(InternalVal('DEVICE','LASTInputDev',AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',undef)->{NAME})),'ignoreRegexp','not_set');return 0}
attr IODEVNAME ignoreRegexp NEWIGNOREREGEXP
name:MQTT2_IO_ignoreRegexp_homeassistant
filter:TYPE=MQTT2_DEVICE
desc:Expands existing or adds a ignoreRegexp to the courrent IO device of device it is applied to. This will prevent evaluation of incoming messages meant for homeassistant for auto-discovery of devices. You are strongly encouraged to not use homeassistant autodiscovery at all, but in case you need it for some reason, adding this ignoreRegexp-expression might help to avoid confusion!<br>NOTE: early experimental version...
order:000002a
farewell:template has been applied successfully. If you will not be redirected to IODev detail page, no changes have been made. Check further extending the ignoreRegexp by yourself!
par:IODEVNAME;Name of the IO-Device; { InternalVal('DEVICE','LASTInputDev',AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',undef)->{NAME})) }
par:NEWIGNOREREGEXP;NEWIGNOREREGEXP as set if homeassistant is included, otherwise it will be added;{ my $old = AttrVal(InternalVal('DEVICE','LASTInputDev',AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',undef)->{NAME})),'ignoreRegexp','homeassistant/[^:"]+/config'); 'homeassistant/[^:"]+/config' =~ m/$old/ ? $old : $old.'|homeassistant/[^:"]+/config' }
option:{return 1 if 'NEWIGNOREREGEXP' ne AttrVal(InternalVal('DEVICE','LASTInputDev',AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',undef)->{NAME})),'ignoreRegexp','not_set');return 0}
attr IODEVNAME ignoreRegexp NEWIGNOREREGEXP
{ fhem "trigger $FW_wname JS:location.href='$FW_ME?detail=IODEVNAME'" if($cl && $cl->{TYPE} eq 'FHEMWEB') }
name:do_general_mqtt_cleanup
filter:NAME=speechrecognTesting
order:000002b
desc:template to do some cleanup especially to a MQTT2_CLIENT_general_bridge device (if existant)...
#and set ignoreRegexp that may help in case MQTT commands may be issued from not within this FHEM server; call e.g. with ADD_TO_IO_IGNOREREGEXP=milight/0x[0-9a-fA-F]{1,4}[/].*/[0-8].
par:IODEVNAME;Name of the IO-Device; { InternalVal('DEVICE','LASTInputDev',AttrVal('DEVICE','IODev',InternalVal('DEVICE','IODev',undef)->{NAME})) }
par:ADD_TO_IO_IGNOREREGEXP;add ignoreRegexp to be attached to the current one, defaults to "";{ '' }
deletereading -q TYPE=MQTT2_\DEVICE:FILTER=model=MQTT2_CLIENT_general_bridge (?!associatedWith|IODev).*
deleteattr TYPE=MQTT2_\DEVICE:FILTER=model=MQTT2_CLIENT_general_bridge readingList
#par:IODEVNAME;Name of the IO-Device; { InternalVal("DEVICE","LASTInputDev",AttrVal("DEVICE","IODev",undef)) }
#par:NEWIGNOREREGEXP;NEWIGNOREREGEXP as set if regex part is included, otherwise it will be added;{ my $old = AttrVal('IODEVNAME','ignoreRegexp','ADD_TO_IO_IGNOREREGEXP'); 'ADD_TO_IO_IGNOREREGEXP' =~ m/$old/ ? $old : $old.'|ADD_TO_IO_IGNOREREGEXP' }
#option:{return 1 if 'NEWIGNOREREGEXP' ne AttrVal('IODEVNAME','ignoreRegexp','not_set');;return 0}
#attr IODEVNAME ignoreRegexp NEWIGNOREREGEXP
###########################################
# mosquitto state, see https://forum.fhem.de/index.php/topic,117988.msg1124272.html#msg1124272
name:MQTT2_mosquitto_SYS
prereq:{my @devices=devspec2array("TYPE=MQTT2_CLIENT");;return 1 if $devices[0];;return 0}
filter:TYPE=MQTT2_DEVICE
desc:Shows health info about mosquitto. Needs additional subscriptions on MQTT2_CLIENT side, see https://forum.fhem.de/index.php/topic,117988.msg1124272.html#msg1124272 for details.
order:000002
attr DEVICE readingList\
.*SYS/broker/.+:.* { $TOPIC=~m,SYS/broker/(.*),;; my %h;; $h{$1}=$EVENT;; \%h }
attr DEVICE model MQTT2_mosquitto_SYS
setreading DEVICE attrTemplateVersion 20210121
###########################################
# zigbee2mqtt
# The zigbee2mqtt bridge device (entire hex id of devices as bridgeRegexp)
name:zigbee2mqtt_bridge
desc:The zigbee2mqtt bridge device
filter:TYPE=MQTT2_DEVICE
order:L_01
farewell:template has been applied successfully. Note: In case you not exclusively use FHEM to send MQTT commands to your devices, it's highly recommended to extend the ignoreRegexp of your IO device! Could be something like |zigbee2mqtt/[A-Za-z0-9._]+/set.
par:BASE_TOPIC;base topic as set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic","") =~ m,[\b]?([^/:]+)(/.+)?, ? $1 : AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)/bridge/.+, ? $1 : undef }
par:ICON;ICON as set, defaults to mqtt;{ AttrVal("DEVICE","icon","mqtt") }
attr DEVICE icon ICON
attr DEVICE devicetopic BASE_TOPIC
attr DEVICE bridgeRegexp\
BASE_TOPIC/([A-Za-z0-9._]+)[/]?.*:.* "zigbee_$1"
attr DEVICE getList\
networkmap_raw:noArg raw $\DEVICETOPIC/bridge/request/networkmap raw\
networkmap_graphviz:noArg graphviz $\DEVICETOPIC/bridge/request/networkmap graphviz
attr DEVICE readingList\
$\DEVICETOPIC/bridge/state:.* state\
$\DEVICETOPIC/bridge/config/devices:.* {}\
$\DEVICETOPIC/bridge/config/log_level:.* log_level\
$\DEVICETOPIC/bridge/config/permit_join:.* permit_join\
$\DEVICETOPIC/bridge/config/rename:.* { json2nameValue($EVENT, 'rename_') }\
$\DEVICETOPIC/bridge/config:.* { json2nameValue($EVENT) }\
$\DEVICETOPIC/bridge/log:.*\"type\".\"devices\".\"message\".* devices\
$\DEVICETOPIC/bridge/log:.* log\
$\DEVICETOPIC/bridge/logging:.* { json2nameValue($EVENT,'log_') }\
$\DEVICETOPIC/bridge/response/networkmap:.* { my $type = $EVENT =~ m/.*,"type":"(raw|graphviz)",.*/ ? $1 : 'networkmap'; $EVENT =~ m/{"data":\{.*"value":"?(.*[^"])"?\},"status":"ok"\}/ ? { $type=>$1 } : {} }\
$\DEVICETOPIC/bridge/devices:.* devices\
$\DEVICETOPIC/bridge/info:.* info\
$\DEVICETOPIC/bridge/groups:.* groups\
$\DEVICETOPIC/bridge/event:.* { json2nameValue($EVENT) }\
$\DEVICETOPIC/bridge/extensions:.* extensions
attr DEVICE setList\
log_level:debug,info,warn,error $\DEVICETOPIC/bridge/config/log_level $EVTPART1\
permit_join:true,false $\DEVICETOPIC/bridge/request/permit_join $EVTPART1\
remove:textField $\DEVICETOPIC/bridge/config/remove $EVTPART1\
ota_update:textField $\DEVICETOPIC/bridge/ota_update/update $EVTPART1\
ota_update_check:textField $\DEVICETOPIC/bridge/ota_update/check $EVTPART1\
y_device_setting:textField $\DEVICETOPIC/$EVTPART1/set {"$EVTPART2": "$EVTPART3"}\
x_bind:textField $\DEVICETOPIC/bridge/bind/$EVTPART1 $EVTPART2\
x_bind_unbind:textField $\DEVICETOPIC/bridge/unbind/$EVTPART1 $EVTPART2\
x_device_options:textField $\DEVICETOPIC/bridge/config/device_options {"friendly_name":"$EVTPART1","options": {"$EVTPART2": "$EVTPART3"}}\
x_group_add_to:textField $\DEVICETOPIC/bridge/group/$EVTPART1/add $EVTPART2\
x_group_rm_from:textField $\DEVICETOPIC/bridge/group/$EVTPART1/remove $EVTPART2\
x_group_rm_from_all:textField $\DEVICETOPIC/bridge/group/$EVTPART1/remove_all $EVTPART2\
x_group_add_group:textField $\DEVICETOPIC/bridge/config/add_group $EVTPART1\
x_group_rm_group:textField $\DEVICETOPIC/bridge/config/remove_group $EVTPART1\
z_elapsed:textField $\DEVICETOPIC/bridge/config/elapsed $EVTPART1\
z_last_seen:disable,ISO_8601,epoch,ISO_8601_local $\DEVICETOPIC/bridge/config/last_seen $EVTPART1\
z_ban:textField $\DEVICETOPIC/bridge/config/ban $EVTPART1\
z_rename:textField $\DEVICETOPIC/bridge/config/rename {"old":"$EVTPART1","new":"$EVTPART2"}\
z_reset_CC:noArg $\DEVICETOPIC/bridge/config/reset
attr DEVICE setStateList on off
attr DEVICE comment To check for new updates of the deamon software, you might want to use a separate HTTPMOD device. See HTTPMOD template zigbee2mqtt_daemon_updates for further details.
#set DEVICE attrTemplate do_general_mqtt_cleanup ADD_TO_IO_IGNOREREGEXP=BASE_TOPIC/[A-Za-z0-9._]+/set
set DEVICE attrTemplate do_general_mqtt_cleanup
attr DEVICE model zigbee2mqtt_bridge
setreading DEVICE attrTemplateVersion 20220328
# Based on https://forum.fhem.de/index.php/topic,94060.msg872371.html#msg872371
#A pure router device, e.g. a CC2531 flashed with router firmware
#Contributed by aperoap, https://forum.fhem.de/index.php/topic,94494.msg992467.html#msg992467
name:zigbee2mqtt_router_only_device
desc: For zigbee2mqtt pure router devices, e.g. a CC2531 flashed with router firmware. To get information on device going offline, set "availability_timeout" to a reasonable value in zigbee2mqtt's configuration.yaml.
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
order:L_02a1
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:ICON;ICON as set, defaults to mqtt_device;{ AttrVal('DEVICE','icon','mqtt_device') }
attr DEVICE icon ICON
attr DEVICE devStateIcon online:rc_GREEN offline:rc_RED
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC:.* { json2nameValue($EVENT) }\
$\DEVICETOPIC/availability:.* availability
deletereading -q DEVICE (?!associatedWith|IODev).*
attr DEVICE stateFormat availability
attr DEVICE comment To get also information on device going offline, set "availability_timeout" to a reasonable value in configuration.yaml.
farewell:template has been applied successfully. Please check configuration.yaml to get regular updates on availability.
attr DEVICE model zigbee2mqtt_router_only_device
setreading DEVICE attrTemplateVersion 20200904
# A dimmable light connected via zigbee2mqtt
name:zigbee2mqtt_light_dimmer
desc: A dimmable light connected via zigbee2mqtt <br>Tested with: Tradfri LED1650R5 + LED1649C5, Osram Lightify W32
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
order:L_02a
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:ICON;ICON as set, defaults to light_control;{ AttrVal('DEVICE','icon','light_control') }
attr DEVICE icon ICON
attr DEVICE devStateIcon {zigbee2mqtt_devStateIcon255($name)}
attr DEVICE webCmd toggle:on:off:brightness
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC:.* { my $ret=json2nameValue($EVENT); $ret->{state}=lc($ret->{state}) if defined $ret->{state}; return $ret }
attr DEVICE setList \
on:noArg $\DEVICETOPIC/set {"state":"ON"}\
off:noArg $\DEVICETOPIC/set {"state":"OFF"}\
brightness:colorpicker,BRI,0,5,255 $\DEVICETOPIC/set {"state":"on","$EVTPART0":"$EVTPART1"}
attr DEVICE setStateList on off
set DEVICE attrTemplate speechcontrol_type_light_254
attr DEVICE model zigbee2mqtt_light_dimmer
setreading DEVICE attrTemplateVersion 20221201
# A dimmable color light connected via zigbee2mqtt
name:zigbee2mqtt_light_cct
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
desc: A dimmable light with color temperature via zigbee2mqtt<br>Tested with: tradfri FLOALT panel WS 30x90
order:L_02b
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:ICON;ICON as set, defaults to light_control;{ AttrVal('DEVICE','icon','light_control') }
attr DEVICE icon ICON
attr DEVICE webCmd toggle:on:off:brightness:ct
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC:.* { my $ret=json2nameValue($EVENT,'',$JSONMAP); $ret->{state}=lc($ret->{state}) if defined $ret->{state}; return $ret }
attr DEVICE setList \
on:noArg $\DEVICETOPIC/set {"state":"ON"}\
off:noArg $\DEVICETOPIC/set {"state":"OFF"}\
brightness:colorpicker,BRI,0,5,255 $\DEVICETOPIC/set {"state":"on","$EVTPART0":"$EVTPART1"}\
ct:colorpicker,CT,154,2,500 $\DEVICETOPIC/set {"color_temp":"$EVTPART1"}\
ct_startup:coolest,cool,neutral,warmest,previous $\DEVICETOPIC/set {"color_temp_startup":"$EVTPART1"}
attr DEVICE jsonMap color_temp:ct color_temp_startup:ct_startup
set DEVICE attrTemplate speechcontrol_type_light_254
attr DEVICE model zigbee2mqtt_light_cct
setreading DEVICE attrTemplateVersion 20221201
#source post: https://forum.fhem.de/index.php/topic,97303.msg905935.html#msg905935
name:zigbee2mqtt_light_rgb_hex
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
desc: A dimmable rgb light connected via zigbee2mqtt <br>rgb value is encoded as HEX value<br>Experimental, still untested
order:L_02c
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:ICON;ICON as set, defaults to hue_filled_white_and_color_e27_b22;{ AttrVal('DEVICE','icon','hue_filled_white_and_color_e27_b22') }
attr DEVICE icon ICON
attr DEVICE devStateIcon {zigbee2mqtt_devStateIcon255($name)}
attr DEVICE webCmd toggle:on:off:brightness:hex
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC:.* { my $ret=json2nameValue($EVENT); $ret->{state}=lc($ret->{state}) if defined $ret->{state}; return $ret }
attr DEVICE setList \
on:noArg $\DEVICETOPIC/set {"state":"ON"}\
off:noArg $\DEVICETOPIC/set {"state":"OFF"}\
brightness:colorpicker,BRI,0,5,255 $\DEVICETOPIC/set {"state":"on","$EVTPART0":"$EVTPART1"}\
hex:colorpicker,HEX,0,15,255 $\DEVICETOPIC/set {"color":{"$EVTPART0":"#$EVTPART1"}}
attr DEVICE userReadings hex:color_y.* {Color::xyY2hex(ReadingsVal($name,'color_x',0),ReadingsVal($name,'color_y',0),ReadingsVal($name,'brightness',254))}
set DEVICE attrTemplate speechcontrol_type_light_254
attr DEVICE model zigbee2mqtt_light_rgb_hex
setreading DEVICE attrTemplateVersion 20221201
name:zigbee2mqtt_light_rgb_rgb
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
desc: A dimmable rgb light connected via zigbee2mqtt <br>rgb values will be sent as individual values r,g and b<br>Experimental, still untested
order:L_02c
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:ICON;ICON as set, defaults to hue_filled_white_and_color_e27_b22;{ AttrVal('DEVICE','icon','hue_filled_white_and_color_e27_b22') }
attr DEVICE icon ICON
attr DEVICE devStateIcon {zigbee2mqtt_devStateIcon255($name)}
attr DEVICE webCmd toggle:on:off:brightness:color
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC:.* { my $ret=json2nameValue($EVENT); $ret->{state}=lc($ret->{state}) if defined $ret->{state}; return $ret }
attr DEVICE setList \
on:noArg $\DEVICETOPIC/set {"state":"ON"}\
off:noArg $\DEVICETOPIC/set {"state":"OFF"}\
brightness:colorpicker,BRI,0,5,255 $\DEVICETOPIC/set {"state":"on","$EVTPART0":"$EVTPART1"}\
color:colorpicker,RGB {"$\DEVICETOPIC/set ".zigbee2mqtt_RGB2JSON($EVTPART1)}
set DEVICE attrTemplate speechcontrol_type_light_254
attr DEVICE model zigbee2mqtt_light_rgb_rgb
setreading DEVICE attrTemplateVersion 20221201
#source post: https://forum.fhem.de/index.php/topic,97303.msg905935.html#msg905935
name:zigbee2mqtt_light_rgbw_hex
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
desc: A dimmable rgbw light connected via zigbee2mqtt <br>rgb value is encoded as HEX value<br>tested with Mueller Light tint RGBW bulb
order:L_02d
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:ICON;ICON as set, defaults to hue_filled_white_and_color_e27_b22;{ AttrVal('DEVICE','icon','hue_filled_white_and_color_e27_b22') }
attr DEVICE icon ICON
attr DEVICE devStateIcon {zigbee2mqtt_devStateIcon255($name)}
attr DEVICE webCmd toggle:on:off:brightness:ct:warm:white:hex
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC:.* { my $ret=json2nameValue($EVENT,'',$JSONMAP); $ret->{state}=lc($ret->{state}) if defined $ret->{state}; return $ret }
attr DEVICE setList \
on:noArg $\DEVICETOPIC/set {"state":"ON"}\
off:noArg $\DEVICETOPIC/set {"state":"OFF"}\
warm:noArg $\DEVICETOPIC/set {"brightness": 200 , "color_temp": 360}\
white:noArg $\DEVICETOPIC/set {"brightness": 254, "color_temp": 250}\
ct:colorpicker,CT,250,1,454 $\DEVICETOPIC/set {"color_temp":"$EVTPART1"}\
brightness:colorpicker,BRI,0,5,255 $\DEVICETOPIC/set {"state":"on","$EVTPART0":"$EVTPART1"}\
hex:colorpicker,HEX,0,15,255 $\DEVICETOPIC/set {"color":{"$EVTPART0":"#$EVTPART1"}}
attr DEVICE userReadings hex:color_y.* {Color::xyY2hex(ReadingsVal($name,'color_x',0),ReadingsVal($name,'color_y',0),ReadingsVal($name,'brightness',254))}
attr DEVICE jsonMap color_temp:ct
set DEVICE attrTemplate speechcontrol_type_light_254
attr DEVICE model zigbee2mqtt_light_rgbw_hex
setreading DEVICE attrTemplateVersion 20221201
#source post: https://forum.fhem.de/index.php/topic,97303.msg905935.html#msg905935
name:zigbee2mqtt_light_rgbw_rgb
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
order:L_02d1
desc: A dimmable rgbw light connected via zigbee2mqtt <br>rgb values will be sent as individual values r,g and b<br>Experimental, still untested
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:ICON;ICON as set, defaults to hue_filled_white_and_color_e27_b22;{ AttrVal('DEVICE','icon','hue_filled_white_and_color_e27_b22') }
attr DEVICE icon ICON
attr DEVICE devStateIcon {zigbee2mqtt_devStateIcon255($name)}
attr DEVICE webCmd toggle:on:off:brightness:color:white
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC:.* { my $ret=json2nameValue($EVENT); $ret->{state}=lc($ret->{state}) if defined $ret->{state}; return $ret }
attr DEVICE setList \
on:noArg $\DEVICETOPIC/set {"state":"ON"}\
off:noArg $\DEVICETOPIC/set {"state":"OFF"}\
white:noArg $\DEVICETOPIC/set {"color_temp": 154 , "color_temp": 500}\
brightness:colorpicker,BRI,0,5,255 $\DEVICETOPIC/set {"state":"on","$EVTPART0":"$EVTPART1"}\
color:colorpicker,RGB {"$\DEVICETOPIC/set ".zigbee2mqtt_RGB2JSON($EVTPART1)}
set DEVICE attrTemplate speechcontrol_type_light_254
attr DEVICE model zigbee2mqtt_light_rgbw_rgb
setreading DEVICE attrTemplateVersion 20221201
#source post: https://forum.fhem.de/index.php/topic,96985.msg902627.html#msg902627
name:zigbee2mqtt_light_rgbcct_hex
desc: A dimmable rgb light connected via zigbee2mqtt <br>rgb value is encoded as HEX value<br>Experimental, still untested
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
order:L_02e
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:ICON;ICON as set, defaults to hue_filled_white_and_color_e27_b22;{ AttrVal('DEVICE','icon','hue_filled_white_and_color_e27_b22') }
attr DEVICE icon ICON
attr DEVICE devStateIcon {zigbee2mqtt_devStateIcon255($name)}
attr DEVICE webCmd toggle:on:off:brightness:ct:hex
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC:.* { my $ret=json2nameValue($EVENT,'',$JSONMAP); $ret->{state}=lc($ret->{state}) if defined $ret->{state}; return $ret }
attr DEVICE setList \
on:noArg $\DEVICETOPIC/set {"state":"ON"}\
off:noArg $\DEVICETOPIC/set {"state":"OFF"}\
brightness:colorpicker,BRI,0,5,255 $\DEVICETOPIC/set {"state":"on","$EVTPART0":"$EVTPART1"}\
ct:colorpicker,CT,154,2,500 $\DEVICETOPIC/set {"color_temp":"$EVTPART1"}\
hex:colorpicker,HEX,0,15,255 $\DEVICETOPIC/set {"color":{"$EVTPART0":"#$EVTPART1"}}
set DEVICE attrTemplate speechcontrol_type_light_254
attr DEVICE jsonMap color_temp:ct
attr DEVICE model zigbee2mqtt_light_rgbcct_hex
setreading DEVICE attrTemplateVersion 20221201
#source post: https://forum.fhem.de/index.php/topic,97303.msg905935.html#msg905935
name:zigbee2mqtt_light_rgbcct_rgb
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
order:L_02e1
desc: <a href="https://forum.fhem.de/index.php/topic,97303.msg905935.html#msg905935" target="_blank">Forum Thread</a><br>A dimmable rgbw light connected via zigbee2mqtt<br>rgb value is encoded as HEX value<br>remove color_temp in setlist command <b>on</b> if default white is not desired<br>Tested with:<br><a href="https://www.zigbee2mqtt.io/devices/HG08008.html" target="_blank">Livarno Home LED ceiling light, </a><a href="https://www.zigbee2mqtt.io/devices/404000_404005_404012_404019.html#m%25C3%25BCller%2520licht-404000%252F404005%252F404012%252F404019" target="_blank">Mueller Light tint RGBW bulb, </a><a href="https://www.zigbee2mqtt.io/devices/HG08010.html" target="_blank">Livarno Home outdoor spotlight</a>
farewell:specified values can be adjusted at any time in the setList attribute
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:BRIGHTNESS;brightness in <b>all</b> specific commands (numeric, 0-255, e.g. 120);undef
par:CTVALUE;ct (color temp) value in <b>on</b>-command (numeric, 0-370, e.g. 320);undef
par:CTWARMVALUE;ct value in <b>warm</b>-command (e.g. 320);undef
par:CTWHITEVALUE;ct value in <b>white</b>-command (e.g. 250);undef
par:ICON;ICON as set, defaults to hue_filled_white_and_color_e27_b22;{ AttrVal('DEVICE','icon','hue_filled_white_and_color_e27_b22') }
attr DEVICE icon ICON
attr DEVICE devStateIcon {zigbee2mqtt_devStateIcon255($name)}
attr DEVICE webCmd toggle:on:off:brightness:ct:rgb
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC:.* { my $ret=json2nameValue($EVENT,'',$JSONMAP); $ret->{state}=lc($ret->{state}) if defined $ret->{state}; return $ret }
attr DEVICE jsonMap color_temp:ct
attr DEVICE getList power_on_behavior:noArg power_on_behavior $\DEVICETOPIC/get {"power_on_behavior": ""}
attr DEVICE setList \
on:noArg $\DEVICETOPIC/set {"brightness": BRIGHTNESS , "state":"ON", "color_temp": CTVALUE}\
off:noArg $\DEVICETOPIC/set {"state":"OFF"}\
brightness:colorpicker,BRI,0,5,255 $\DEVICETOPIC/set {"state":"on","$EVTPART0":"$EVTPART1"}\
ct:colorpicker,CT,154,2,500 $\DEVICETOPIC/set {"color_temp":"$EVTPART1"}\
warm:noArg $\DEVICETOPIC/set {"brightness": BRIGHTNESS , "color_temp": CTWARMVALUE}\
white:noArg $\DEVICETOPIC/set {"brightness": BRIGHTNESS, "color_temp": CTWHITEVALUE}\
rgb:colorpicker,RGB {"$\DEVICETOPIC/set ".zigbee2mqtt_RGB2JSON($EVTPART1)}\
power_on_behavior:on,off $\DEVICETOPIC/set {"power_on_behavior": "$EVTPART1"}
attr DEVICE userReadings rgb:color_y.* {Color::xyY2hex(ReadingsVal($name,'color_x',0),ReadingsVal($name,'color_y',0),ReadingsVal($name,'brightness',254))}
attr DEVICE comment The specified ct and brightness values in on and warm etc. commands can be adjusted at any time via the setList attribute
set DEVICE attrTemplate speechcontrol_type_light_254
attr DEVICE model zigbee2mqtt_light_rgbcct_rgb
setreading DEVICE attrTemplateVersion 20230323
# zigbee2mqtt 2 channel dimmer device
name:zigbee2mqtt_2channel_dimmer_split
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
desc:For zigbee2mqtt 2 channel dimmer device. <br>NOTE: a second device will be created for the second channel<br>NOTE: Untested updated version, should work with MOES MS-105B, see https://forum.fhem.de/index.php/topic,124612.0.html
order:L_02g1
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:ICON;ICON as set, defaults to light_control;{ AttrVal('DEVICE','icon','light_control') }
attr DEVICE icon ICON
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC:.* { my $ret=json2nameValue($EVENT,'',$JSONMAP); $ret->{state}=lc($ret->{state}) if defined $ret->{state}; return $ret }
attr DEVICE jsonMap state:availability state_l1:state state_l2:0 brightness_l1:brightness brightness_l2:0
attr DEVICE setList \
on:noArg $\DEVICETOPIC/l1/set {"state":"ON"}\
off:noArg $\DEVICETOPIC/l1/set {"state":"OFF"}\
toggle:noArg $\DEVICETOPIC/l1/set {"state":"TOGGLE"}\
brightness:colorpicker,BRI,0,1,254 $\DEVICETOPIC/l1/set {"state":"ON","$EVTPART0":"$EVTPART1"}
attr DEVICE setStateList on off toggle
attr DEVICE webCmd brightness
deletereading -q DEVICE (?!associatedWith|IODev).*
set DEVICE attrTemplate set_associatedWith \CHANNELS=2 \MAKECOPIES=1
attr DEVICE_CH2 setList \
on:noArg $\DEVICETOPIC/l2/set {"state":"ON"}\
off:noArg $\DEVICETOPIC/l2/set {"state":"OFF"}\
toggle:noArg $\DEVICETOPIC/l2/set {"state":"TOGGLE"}\
brightness:colorpicker,BRI,0,1,254 $\DEVICETOPIC/l2/set {"state":"ON","$EVTPART0":"$EVTPART1"}
attr DEVICE_CH2 setStateList on off toggle
deletereading -q DEVICE_CH2 (?!associatedWith|IODev).*
attr DEVICE_CH2 jsonMap state_l1:0 state_l2:state state:0 consumption:0 linkquality:0 power:0 temperature:0 brightness_l1:0 brightness_l2:brightness
set DEVICE,DEVICE_CH2 attrTemplate speechcontrol_type_light_254
attr DEVICE,DEVICE_CH2 model zigbee2mqtt_2channel_dimmer_split
setreading DEVICE,DEVICE_CH2 attrTemplateVersion 20221201
# zigbee2mqtt air purifier
name:zigbee2mqtt_air_purifier
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
desc:For zigbee2mqtt air purifier. <br>NOTE: Untested updated version, should work with tradfri STARKVIND, see https://forum.fhem.de/index.php/topic,124515.0.html
order:L_02i
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:ICON;ICON as set, defaults to Ventilator_wind;{ AttrVal('DEVICE','icon','Ventilator_wind') }
attr DEVICE icon ICON
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC:.* { my $ret=json2nameValue($EVENT,'',$JSONMAP); $ret->{state}=lc($ret->{state}) if defined $ret->{state}; return $ret }
attr DEVICE getList state:noArg state $\DEVICETOPIC/get {"fan_state": ""}\
fan_speed:noArg fan_speed $\DEVICETOPIC/get {"fan_speed": ""}\
pm25:noArg pm25 $\DEVICETOPIC/get {"pm25": ""}\
air_quality:noArg air_quality $\DEVICETOPIC/get {"air_quality": ""}\
child_lock:noArg child_lock $\DEVICETOPIC/get {"child_lock": ""}\
replace_filter:noArg replace_filter $\DEVICETOPIC/get {"replace_filter": ""}
attr DEVICE jsonMap fan_state:state state_l2:0 brightness_l1:brightness brightness_l2:0
attr DEVICE setList \
on:noArg $\DEVICETOPIC/set {"fan_state":"ON"}\
off:noArg $\DEVICETOPIC/set {"fan_state":"OFF"}\
toggle:noArg $\DEVICETOPIC/set {"fan_state":"TOGGLE"}\
fan_mode:off,auto,1,2,3,4,5,6,7,8,9 $\DEVICETOPIC/set {"fan_mode": "$EVTPART1"}
attr DEVICE setStateList on off toggle
attr DEVICE webCmd fan_mode
deletereading -q DEVICE (?!associatedWith|IODev).*
attr DEVICE model zigbee2mqtt_air_purifier
setreading DEVICE attrTemplateVersion 20220913
# zigbee2mqtt air quality sensor
name:zigbee2mqtt_air_quality
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
desc:For zigbee2mqtt air quality sensor. <br>NOTE: Untested updated version, should work with tradfri frient A/S, see https://forum.fhem.de/index.php/topic,124515.0.html
order:L_02i
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:ICON;ICON as set, defaults to feinstaub_pm25;{ AttrVal('DEVICE','icon','feinstaub_pm25') }
attr DEVICE icon ICON
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC/availability:.* availability\
$\DEVICETOPIC:.* { my $ret=json2nameValue($EVENT,'',$JSONMAP); $ret->{state}=lc($ret->{state}) if defined $ret->{state}; return $ret }
attr DEVICE jsonMap battery:batteryPercent voltage:batterymV
attr DEVICE stateFormat air quality: air_quality, VOC: voc, Hum: humidity
deletereading -q DEVICE (?!associatedWith|IODev).*
attr DEVICE model zigbee2mqtt_air_quality
setreading DEVICE attrTemplateVersion 20220913
name:zigbee2mqtt_smokeDetector
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
order:L_03
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:ICON;ICON as set, defaults to secur_smoke_detector;{ AttrVal("DEVICE","icon","secur_smoke_detector") }
attr DEVICE icon ICON
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC:.* { json2nameValue($EVENT) }
attr DEVICE stateFormat smoke
attr DEVICE model zigbee2mqtt_smokeDetector
setreading DEVICE attrTemplateVersion 20200904
name:zigbee2mqtt_hueMotionSensor
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
order:L_04
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:ICON;ICON as set, defaults to people_sensor;{ AttrVal("DEVICE","icon","people_sensor") }
attr DEVICE icon ICON
attr DEVICE stateFormat T: temperature_weather B: illuminance L: linkquality
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC:.* { json2nameValue($EVENT) }
attr DEVICE userReadings temperature_weather { sprintf("%.1f",ReadingsVal($name,"temperature","")+2.5) }
set DEVICE attrTemplate speechcontrol_gdt_and_mapping GENERICDEVTYPE=motion HOMEBRIDGEMAPPING="MotionDetected=state,values=motion:1;nomotion:0"
attr DEVICE model zigbee2mqtt_hueMotionSensor
setreading DEVICE attrTemplateVersion 20200904
name:zigbee2mqtt_plug
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
desc: Should work e.g. with Osram smart+plug
order:L_05
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:ICON;ICON as set, defaults to message_socket;{ AttrVal('DEVICE','icon','message_socket') }
attr DEVICE icon ICON
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC:.* { my $ret=json2nameValue($EVENT); $ret->{state}=lc($ret->{state}) if defined $ret->{state}; return $ret }
attr DEVICE setList \
on:noArg $\DEVICETOPIC/set {"state":"ON"}\
off:noArg $\DEVICETOPIC/set {"state":"OFF"}\
toggle:noArg $\DEVICETOPIC/set {"state":"TOGGLE"}
attr DEVICE setStateList on off toggle
set DEVICE attrTemplate speechcontrol_type_switch
attr DEVICE model zigbee2mqtt_plug
setreading DEVICE attrTemplateVersion 20220909
name:zigbee2mqtt_plug_w_energy_measuring
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
desc: For plugs with energy measuring features like innr SP 120 or Blitzwolf Powerplug BW-SHP13
order:L_05a
set DEVICE attrTemplate zigbee2mqtt_plug
attr DEVICE devStateIcon {my $light = FW_makeImage(ReadingsVal($name,'state','off')); my $current = ReadingsVal($name,'current',0); my $pwr = ReadingsVal($name,'power',0); my $energy = ReadingsVal($name,'energy',0); qq(<div> <a href="/fhem?cmd.dummy=set $name toggle&XHR=1">$light</a> Aktuell: $current A Leistung.: $pwr W<b></b>)}
attr DEVICE model zigbee2mqtt_plug_w_energy_measuring
setreading DEVICE attrTemplateVersion 20220622
# zigbee2mqtt 2 channel device
name:zigbee2mqtt_2channel_split
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
desc:For zigbee2mqtt 2 channel device. <br>NOTE: a second device will be created for the second channel<br>NOTE: Untested updated version, should work with LLKZMK11LM, Ubisys S2 (-R),
order:L_05c
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:ICON;ICON as set, defaults to message_socket;{ AttrVal('DEVICE','icon','message_socket') }
attr DEVICE icon ICON
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC:.* { my $ret=json2nameValue($EVENT,'',$JSONMAP); $ret->{state}=lc($ret->{state}) if defined $ret->{state}; return $ret }
attr DEVICE jsonMap state:availability state_l1:state state_l2:0
attr DEVICE setList \
on:noArg $\DEVICETOPIC/l1/set {"state":"ON"}\
off:noArg $\DEVICETOPIC/l1/set {"state":"OFF"}\
toggle:noArg $\DEVICETOPIC/l1/set {"state":"TOGGLE"}
attr DEVICE setStateList on off toggle
deletereading -q DEVICE (?!associatedWith|IODev).*
set DEVICE attrTemplate set_associatedWith \CHANNELS=2 \MAKECOPIES=1
attr DEVICE_CH2 setList \
on:noArg $\DEVICETOPIC/l2/set {"state":"ON"}\
off:noArg $\DEVICETOPIC/l2/set {"state":"OFF"}\
toggle:noArg $\DEVICETOPIC/l2/set {"state":"TOGGLE"}
attr DEVICE_CH2 setStateList on off toggle
deletereading -q DEVICE_CH2 (?!associatedWith|IODev).*
attr DEVICE_CH2 jsonMap state_l1:0 state_l2:state state:0 consumption:0 linkquality:0 power:0 temperature:0
set DEVICE,DEVICE_CH2 attrTemplate speechcontrol_type_switch
attr DEVICE,DEVICE_CH2 model zigbee2mqtt_2channel_split
setreading DEVICE,DEVICE_CH2 attrTemplateVersion 20220913
# zigbee2mqtt 2 channel device with buttons, forum #102866
name:zigbee2mqtt_2channel_split_w_buttons
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
desc:For zigbee2mqtt 2 channel device with 2 buttons. <br>NOTE: a second device will be created for the second channel<br>NOTE: Untested version, should work with Xiaomi QBKG12LM
order:L_05d
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
set DEVICE attrTemplate zigbee2mqtt_2channel_split
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE setList \
on:noArg $\DEVICETOPIC/left/set {"state":"ON"}\
off:noArg $\DEVICETOPIC/left/set {"state":"OFF"}\
toggle:noArg $\DEVICETOPIC/left/set {"state":"TOGGLE"}
attr DEVICE jsonMap state:availability state_left:state state_right:0
attr DEVICE_CH2 setList \
on:noArg $\DEVICETOPIC/right/set {"state":"ON"}\
off:noArg $\DEVICETOPIC/right/set {"state":"OFF"}\
toggle:noArg $\DEVICETOPIC/right/set {"state":"TOGGLE"}
attr DEVICE_CH2 jsonMap state_left:0 state_right:state state:0 consumption:0 linkquality:0 power:0 temperature:0
attr DEVICE,DEVICE_CH2 model zigbee2mqtt_2channel_split_w_buttons
setreading DEVICE,DEVICE_CH2 attrTemplateVersion 20220622
# zigbee2mqtt 3 channel device
name:zigbee2mqtt_3channel_split
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
desc:For zigbee2mqtt 3 channel device like Silvercrest Steckerleiste »Zigbee Smart Home«. <br>NOTE: Two additional devices will be created for further channels.<br>NOTE: Might need a FHEM restart to work properly.
order:L_05e
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:ICON;ICON as set, defaults to message_socket;{ AttrVal('DEVICE','icon','message_socket') }
attr DEVICE icon ICON
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC:.* { my $ret=json2nameValue($EVENT,'',$JSONMAP); $ret->{state}=lc($ret->{state}) if defined $ret->{state}; return $ret }
attr DEVICE jsonMap state:availability state_l1:state state_l2:0 state_l3:0
attr DEVICE setList \
on:noArg $\DEVICETOPIC/set {"state_l1":"ON"}\
off:noArg $\DEVICETOPIC/set {"state_l1":"OFF"}\
toggle:noArg $\DEVICETOPIC/set {"state_l1":"TOGGLE"}
attr DEVICE setStateList on off toggle
deletereading -q DEVICE (?!associatedWith|IODev).*
set DEVICE attrTemplate set_associatedWith \CHANNELS=3 \MAKECOPIES=1
loop:#:2:3
defmod DEVICE_CH# MQTT2_\DEVICE
attr DEVICE_CH# setList \
on:noArg $\DEVICETOPIC/set {"state_l#":"ON"}\
off:noArg $\DEVICETOPIC/set {"state_l#":"OFF"}\
toggle:noArg $\DEVICETOPIC/set {"state_l#":"TOGGLE"}
loop:END
attr DEVICE_CH2 jsonMap state_l2:state state_l1:0 state_l3:0 state:0 consumption:0 linkquality:0 power:0 temperature:0
attr DEVICE_CH3 jsonMap state_l3:state state_l1:0 state_l2:0 state:0 consumption:0 linkquality:0 power:0 temperature:0
set DEVICE,DEVICE_CH2,DEVICE_CH3 attrTemplate speechcontrol_type_switch
attr DEVICE,DEVICE_CH2,DEVICE_CH3 model zigbee2mqtt_3channel_split
setreading DEVICE,DEVICE_CH2,DEVICE_CH3 attrTemplateVersion 20220913
#provided by laberlaib, https://forum.fhem.de/index.php/topic,94495.msg1238330.html#msg1238330
# zigbee2mqtt 5 channel device
name:zigbee2mqtt_5channel_split
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
desc:For zigbee2mqtt 5 channel device like UseeLink Steckerleiste SM-0306E-2W. <br>NOTE: Four additional devices will be created for further channels.<br>NOTE: Might need a FHEM restart to work properly.
order:L_05g
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:ICON;ICON as set, defaults to message_socket;{ AttrVal('DEVICE','icon','message_socket') }
attr DEVICE icon ICON
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC:.* { my $ret=json2nameValue($EVENT,'',$JSONMAP); $ret->{state}=lc($ret->{state}) if defined $ret->{state}; return $ret }
attr DEVICE jsonMap state:availability state_l1:state state_l2:0 state_l3:0 state_l4:0 state_l5:0
attr DEVICE setList \
on:noArg $\DEVICETOPIC/set {"state_l1":"ON"}\
off:noArg $\DEVICETOPIC/set {"state_l1":"OFF"}\
toggle:noArg $\DEVICETOPIC/set {"state_l1":"TOGGLE"}
attr DEVICE setStateList on off toggle
deletereading -q DEVICE (?!associatedWith|IODev).*
set DEVICE attrTemplate set_associatedWith \CHANNELS=5 \MAKECOPIES=1
loop:#:2:3:4:5
defmod DEVICE_CH# MQTT2_\DEVICE
attr DEVICE_CH# setList \
on:noArg $\DEVICETOPIC/set {"state_l#":"ON"}\
off:noArg $\DEVICETOPIC/set {"state_l#":"OFF"}\
toggle:noArg $\DEVICETOPIC/set {"state_l#":"TOGGLE"}
loop:END
attr DEVICE_CH2 jsonMap state_l2:state state_l1:0 state_l3:0 state_l4:0 state_l5:0 state:0
attr DEVICE_CH3 jsonMap state_l3:state state_l1:0 state_l2:0 state_l4:0 state_l5:0 state:0
attr DEVICE_CH4 jsonMap state_l4:state state_l1:0 state_l2:0 state_l3:0 state_l5:0 state:0
attr DEVICE_CH5 jsonMap state_l5:state state_l1:0 state_l2:0 state_l3:0 state_l4:0 state:0
set DEVICE,DEVICE_CH2,DEVICE_CH3,DEVICE_CH4,DEVICE_CH5 attrTemplate speechcontrol_type_switch
attr DEVICE,DEVICE_CH2,DEVICE_CH3,DEVICE_CH4,DEVICE_CH5 model zigbee2mqtt_5channel_split
setreading DEVICE,DEVICE_CH2,DEVICE_CH3,DEVICE_CH4,DEVICE_CH5 attrTemplateVersion 20221007
# A blind drive motor TS0601_cover connected via zigbee2mqtt
#contributed by barneybaer, https://forum.fhem.de/index.php/topic,94495.msg1134215.html#msg1134215
name:zigbee2mqtt_blind_drive
desc: A blind drive motor connected via zigbee2mqtt <br>Tested with: Tuya AM43 TS0601_cover
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
order:L_05f
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:ICON;ICON as set, defaults to fts_shutter_100;{ AttrVal("DEVICE","icon","fts_shutter_100") }
attr DEVICE icon ICON
attr DEVICE devStateIcon 0:fts_shutter_100 100:fts_shutter_10 9\d.*:fts_shutter_10 8\d.*:fts_shutter_20 7\d.*:fts_shutter_30 6\d.*:fts_shutter_40 5\d.*:fts_shutter_50 4\d.*:fts_shutter_60 3\d.*:fts_shutter_70 2\d.*:fts_shutter_80 1\d.*:fts_shutter_90 0\d.*:fts_shutter_100
attr DEVICE webCmd open:close:stop:pct:speed
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE jsonMap position:pct motor_speed:speed
attr DEVICE readingList $\DEVICETOPIC:.* { json2nameValue($EVENT,'',$JSONMAP) }
attr DEVICE setList \
open:noArg $\DEVICETOPIC/set {"state":"OPEN"}\
close:noArg $\DEVICETOPIC/set {"state":"CLOSE"}\
stop:noArg $\DEVICETOPIC/set {"state":"STOP"}\
pct:slider,0,1,100 $\DEVICETOPIC/set {"position":"$EVTPART1"}\
speed:colorpicker,BRI,0,1,255 $\DEVICETOPIC/set {"options": {"motor_speed":"$EVTPART1"}}
attr DEVICE stateFormat pct
set DEVICE attrTemplate speechcontrol_type_blind
attr DEVICE model zigbee2mqtt_blind_drive
setreading DEVICE attrTemplateVersion 20211113
# Aqara Curtain Driver E1
# contributed by drhirn, https://forum.fhem.de/index.php/topic,94495.msg1241895.html#msg1241895
name:zigbee2mqtt_curtain_driver
desc:E.g. for Aqara curtain driver E1 via zigbee2mqtt.<br>Tested with: <a href="https://www.zigbee2mqtt.io/devices/ZNCLBL01LM.html">ZNCLBL01LM</a>.
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
order:L_05f1
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC/availability:.* availability\
$\DEVICETOPIC:.* { json2nameValue($EVENT,'',$JSONMAP) }
attr DEVICE event-on-change-reading .*
attr DEVICE setList open:noArg $\DEVICETOPIC/set {"state": "OPEN"}\
close:noArg $\DEVICETOPIC/set {"state": "CLOSE"}\
stop:noArg $\DEVICETOPIC/set {"state": "STOP"}\
pct:slider,0,1,100 $\DEVICETOPIC/set {"position": "$EVTPART1"}
attr DEVICE jsonMap position:pct
attr DEVICE stateFormat pct
attr DEVICE devStateIcon 0:fts_shutter_100 (\d|1\d):fts_shutter_90 2\d:fts_shutter_80 3\d:fts_shutter_70 4\d:fts_shutter_60 5\d:fts_shutter_50 6\d:fts_shutter_40 7\d:fts_shutter:30 8\d:fts_shutter_20 9\d:fts_shutter_10 100:fts_window_2w
attr DEVICE webCmd open:close:stop:pct
deletereading -q DEVICE (?!associatedWith|IODev).*
attr DEVICE model zigbee2mqtt_curtain_driver
setreading DEVICE attrTemplateVersion 20221101
name:zigbee2mqtt_ContactSensor
desc: Contact sensor via zigbee2mqtt <br>Tested with: Xiaomi models Aqara and Mijia
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
order:L_06
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
attr DEVICE devStateIcon open:fts_window_1w_open@red closed:fts_window_1w@green
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC:.* { my $ret=json2nameValue($EVENT,'',$JSONMAP); $ret->{state}=$ret->{state} eq 'true' ? 'closed' : 'open'; return $ret }
attr DEVICE jsonMap contact:state
deletereading -q DEVICE (?!associatedWith|IODev).*
set DEVICE attrTemplate speechcontrol_gdt_and_mapping GENERICDEVTYPE=ContactSensor HOMEBRIDGEMAPPING=ContactSensorState=state,values=closed:CONTACT_DETECTED;open:CONTACT_NOT_DETECTED
attr DEVICE model zigbee2mqtt_ContactSensor
setreading DEVICE attrTemplateVersion 20220622
name:zigbee2mqtt_TempHumHpaSensor
desc: Temp/hum/hpa sensor via zigbee2mqtt <br>Tested with: Xiaomi Aqara WSDCGQ11LM Temperature Humidity Sensor
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
order:L_07
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:ICON;ICON as set, defaults to temperature_humidity;{ AttrVal("DEVICE","icon","temperature_humidity") }
attr DEVICE icon ICON
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE stateFormat {sprintf ("Temperature: %.1f°C Humidity: %.1f%% Pressure: %.1fhpa", ReadingsVal($name,"temperature",0), ReadingsVal($name,"humidity",0), ReadingsVal($name,"pressure",0)) }
attr DEVICE readingList $\DEVICETOPIC:.* { json2nameValue($EVENT,'',$JSONMAP) }
deletereading -q DEVICE (?!associatedWith|IODev).*
attr DEVICE model zigbee2mqtt_TempHumHpaSensor
setreading DEVICE attrTemplateVersion 20200904
#source post: https://forum.fhem.de/index.php/topic,94495.msg898198.html#msg898198
name:zigbee2mqtt_TempHumSensor
desc: Temp/hum sensor via zigbee2mqtt <br>Tested with: Xiaomi MiJia WSDCGQ01LM Temperature Humidity Sensor
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
order:L_07a
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:ICON;ICON as set, defaults to temperature_humidity;{ AttrVal("DEVICE","icon","temperature_humidity") }
attr DEVICE icon ICON
attr DEVICE stateFormat {sprintf ("Temperature: %.1f°C Humidity: %.1f%%", ReadingsVal($name,"temperature",0), ReadingsVal($name,"humidity",0)) }
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC:.* { json2nameValue($EVENT,'',$JSONMAP) }
deletereading -q DEVICE (?!associatedWith|IODev).*
attr DEVICE model zigbee2mqtt_TempHumSensor
setreading DEVICE attrTemplateVersion 20200904
#contributed by chefschaffner, https://forum.fhem.de/index.php/topic,94495.msg1260253.html#msg1260253
name:zigbee2mqtt_TempSensor
desc: Temp sensor via zigbee2mqtt <br>Tested with: OWON THS317-ET Temperature Sensor
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
order:L_07a1
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:ICON;ICON as set, defaults to temp_temperature;{ AttrVal('DEVICE','icon','temp_temperature') }
attr DEVICE icon ICON
attr DEVICE stateFormat {sprintf ("Temperature: %.1f°C", ReadingsVal($name,'temperature',0)) }
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC:.* { json2nameValue($EVENT,'',$JSONMAP) }
deletereading -q DEVICE (?!associatedWith|IODev).*
attr DEVICE model zigbee2mqtt_TempSensor
setreading DEVICE attrTemplateVersion 20230126
#by TomLee, https://forum.fhem.de/index.php/topic,116310.msg1105927.html#msg1105927
name:zigbee2mqtt_human_body_movement
desc: Human motion sensor via zigbee2mqtt <br>Tested with: Xiaomi MiJia human RTCGQ01LM body movement sensor (occupancy)
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
order:L_08
set DEVICE attrTemplate zigbee2mqtt_human_body_movement_illuminance
attr DEVICE jsonMap battery:batteryPercent voltage:batterymV
attr DEVICE stateFormat Motion: occupancy\
Battery: batteryPercent%
attr DEVICE model zigbee2mqtt_human_body_movement
setreading DEVICE attrTemplateVersion 20201208
#source post: https://forum.fhem.de/index.php/topic,94495.msg898198.html#msg898198, addon by TomLee, https://forum.fhem.de/index.php/topic,116310.msg1105927.html#msg1105927
name:zigbee2mqtt_human_body_movement_illuminance
desc: Human motion sensor with illumiuance measurement via zigbee2mqtt <br>Tested with: Xiaomi Aqara RTCGQ11LM Human Motion Sensor
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
order:L_08a
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:ICON;ICON as set, defaults to people_sensor;{ AttrVal("DEVICE","icon","people_sensor") }
attr DEVICE icon ICON
attr DEVICE devStateIcon Motion..true:people_sensor Motion..false:motion_detector
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE jsonMap battery:batteryPercent voltage:batterymV illuminance_lux:0
attr DEVICE stateFormat Motion: occupancy\
Luminance: illuminance Battery: batteryPercent%
attr DEVICE readingList $\DEVICETOPIC:.* { json2nameValue($EVENT,'',$JSONMAP) }
attr DEVICE userReadings batteryVoltage:batterymV.* {ReadingsNum($name,'batterymV',0)/1000}
deletereading -q DEVICE (?!associatedWith|IODev).*
attr DEVICE model zigbee2mqtt_human_body_movement_illuminance
setreading DEVICE attrTemplateVersion 20201208
#provided by barneybaer, forum https://forum.fhem.de/index.php/topic,94495.msg1257179.html#msg1257179
name:zigbee2mqtt_human_body_presence_detector
desc: Human body presence detector via zigbee2mqtt <br>Tested with: Xiaomi Aqara RTCZCGQ11LM Presence Detector FP1
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
order:L_08a001
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:ICON;ICON as set, defaults to people_sensor;{ AttrVal('DEVICE','icon','people_sensor') }
attr DEVICE icon ICON
attr DEVICE devStateIcon Motion..true:people_sensor Motion..false:motion_detector
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE stateFormat Motion: presence
attr DEVICE readingList $\DEVICETOPIC:.* { json2nameValue($EVENT,'',$JSONMAP) }
attr DEVICE setList \
mode:undirected,left_right $\DEVICETOPIC/set {"monitoring_mode":"$EVTPART1"}\
distance:far,medium,near $\DEVICETOPIC/set {"approach_distance":"$EVTPART1"}\
sensitivity:low,medium,high $\DEVICETOPIC/set {"motion_sensitivity":"$EVTPART1"}
attr DEVICE model zigbee2mqtt_human_body_presence_detector
setreading DEVICE attrTemplateVersion 20230111
name:zigbee2mqtt_Light_Intensity_Sensor
desc: Light Intensity Sensor via zigbee2mqtt <br>Tested with: Xiaomi MiJia light intensity sensor GZCGQ01LM
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
order:L_08a01
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:ICON;ICON as set, defaults to weather_sun;{ AttrVal("DEVICE","icon","weather_sun") }
attr DEVICE icon ICON
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE stateFormat Lux: illuminance_lux Luminance: illuminance
attr DEVICE readingList $\DEVICETOPIC:.* { json2nameValue($EVENT,'',$JSONMAP) }
deletereading -q DEVICE (?!associatedWith|IODev).*
attr DEVICE model zigbee2mqtt_Light_Intensity_Sensor
setreading DEVICE attrTemplateVersion 20200904
#source post: https://forum.fhem.de/index.php/topic,94495.msg975785.html#msg975785
# Osram Lightify, Smart+ Motion Sensor
name:zigbee2mqtt_TempMotion_sensor
desc: Temperature and motion sensor via zigbee2mqtt <br>Tested with: Osram Lightify Motion Sensor
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
order:L_08a02
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
attr DEVICE icon ICON
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE stateFormat Motion: occupancy T: temperature
attr DEVICE readingList $\DEVICETOPIC:.* { json2nameValue($EVENT,'',$JSONMAP) }
deletereading -q DEVICE (?!associatedWith|IODev).*
attr DEVICE model zigbee2mqtt_TempMotion_sensor
setreading DEVICE attrTemplateVersion 20200904
#source post: https://forum.fhem.de/index.php/topic,94495.msg898198.html#msg898198
name:zigbee2mqtt_Motion_Sensor
desc: Smart motion sensor via zigbee2mqtt <br>Tested with: Xiaomi Aqara DJT11LM Smart Motion Sensor
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
order:L_09
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:ICON;ICON as set, defaults to people_sensor;{ AttrVal("DEVICE","icon","people_sensor") }
attr DEVICE icon ICON
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE stateFormat Motion: action X: angle_x Y: angle_y Z: angle_z
attr DEVICE readingList $\DEVICETOPIC:.* { json2nameValue($EVENT) }
deletereading -q DEVICE (?!associatedWith|IODev).*
attr DEVICE model zigbee2mqtt_Motion_Sensor
setreading DEVICE attrTemplateVersion 20200904
#source post: https://forum.fhem.de/index.php/topic,94495.msg898198.html#msg898198
name:zigbee2mqtt_Water_Leak_Sensor
desc: Water leak sensor via zigbee2mqtt <br>Tested with: Xiaomi Aqara SJCGQ11LM Water Leak Sensor
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
order:L_10
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
attr DEVICE stateFormat Leak: state
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC:.* { json2nameValue($EVENT,'',$JSONMAP) }
attr DEVICE jsonMap water_leak:state
deletereading -q DEVICE (?!associatedWith|IODev).*
attr DEVICE model zigbee2mqtt_Water_Leak_Sensor
setreading DEVICE attrTemplateVersion 20200904
#source post: https://forum.fhem.de/index.php/topic,94495.msg898198.html#msg898198
name:zigbee2mqtt_Light_Switch
desc: Smart light switch 2btn via zigbee2mqtt <br>Tested with: Xiaomi Aqara WXKG02LM 2btn Smart Light Switch
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
order:L_11
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:ICON;ICON as set, defaults to control_home;{ AttrVal("DEVICE","icon","control_home") }
attr DEVICE icon ICON
attr DEVICE stateFormat click
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC:.* { json2nameValue($EVENT) }
deletereading -q DEVICE (?!associatedWith|IODev).*
set DEVICE attrTemplate speechcontrol_type_switch
attr DEVICE model zigbee2mqtt_Light_Switch
setreading DEVICE attrTemplateVersion 20200904
#contributed by Puccini, source post: https://forum.fhem.de/index.php/topic,108538.msg1106932.html#msg1106932
name:zigbee2mqtt_scene_controller
desc: Wireless button via zigbee2mqtt <br>Tested with: Xiaomi Aqara WXCJKG13LM wireless switch
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
order:L_12
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $1 : undef }
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:ICON;ICON as set, defaults to control_home;{ AttrVal("DEVICE","icon","control_home") }
attr DEVICE icon ICON
attr DEVICE stateFormat Action: action Batterie: battery %
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC:.* { json2nameValue($EVENT) }
deletereading -q DEVICE (?!associatedWith|IODev).*
attr DEVICE model zigbee2mqtt_scene_controller
setreading DEVICE attrTemplateVersion 20200904
#source post: https://forum.fhem.de/index.php/topic,94495.msg916789.html#msg916789
name:zigbee2mqtt_Wireless_Button
desc: Wireless button via zigbee2mqtt <br>Tested with: Xiaomi Aqara WXKG12LM wireless switch with gyroscope
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
order:L_12a
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","readingList","") =~ m,[\b]?([^/:]+)[/].*:, ? $1 : undef }
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:ICON;ICON as set, defaults to control_home;{ AttrVal("DEVICE","icon","control_home") }
attr DEVICE icon ICON
attr DEVICE stateFormat Click: click Action: action
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC:.* { json2nameValue($EVENT,'',$JSONMAP) }
attr DEVICE jsonMap battery:batteryPercent voltage:batterymV
attr DEVICE userReadings batteryVoltage:batterymV.* {ReadingsNum($name,'batterymV',0)/1000}
deletereading -q DEVICE (?!associatedWith|IODev).*
attr DEVICE model zigbee2mqtt_Wireless_Button
setreading DEVICE attrTemplateVersion 20201208
name:zigbee2mqtt_wireless_button_old
desc: Wireless button without gyro via zigbee2mqtt <br>Tested with: Xiaomi Aqara WXKG11LM wireless button
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
order:L_13
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:ICON;ICON as set, defaults to control_home;{ AttrVal("DEVICE","icon","control_home") }
attr DEVICE icon ICON
attr DEVICE stateFormat Click: click
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC:.* { json2nameValue($EVENT) }
deletereading -q DEVICE (?!associatedWith|IODev).*
#not yet tested, see https://forum.fhem.de/index.php/topic,113224.msg1075311.html#msg1075311
#set DEVICE attrTemplate speechcontrol_gdt_and_mapping GENERICDEVTYPE=StatelessProgrammableSwitch HOMEBRIDGEMAPPING= "ProgrammableSwitchEvent=click,values=single:SINGLE_PRESS;;double:DOUBLE_PRESS"
attr DEVICE model zigbee2mqtt_wireless_button_old
setreading DEVICE attrTemplateVersion 20200904
name:zigbee2mqtt_aqara_cube
desc: Aqara smarthome cube via zigbee2mqtt <br>Tested with: Xiaomi Aqara MFKZQ01LM smarthome cube
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
order:L_14
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
attr DEVICE stateFormat Action: action
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE readingList $\DEVICETOPIC:.* { json2nameValue($EVENT,'',$JSONMAP) }
attr DEVICE jsonMap battery:batteryPercent voltage:batterymV
attr DEVICE userReadings batteryVoltage:batterymV.* {ReadingsNum($name,'batterymV',0)/1000}
deletereading -q DEVICE (?!associatedWith|IODev).*
attr DEVICE model zigbee2mqtt_aqara_cube
setreading DEVICE attrTemplateVersion 20210226
#source post: https://forum.fhem.de/index.php/topic,94494.msg983905.html#msg983905
name:zigbee2mqtt_AlarmSensor
desc: Alarm sensor via zigbee2mqtt <br>Can report actions drop, tilt or vibration as well as x,y,z coordinates of its movement.<br>Sensitivity can be set to low, medium or high.<br>Tested with: Xiaomi DJT11LM Vibration Sensor
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
order:L_15
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }
par:DEV_ID;name of the device in the zigbee2mqtt bridge;{ AttrVal("DEVICE","devicetopic",AttrVal("DEVICE","readingList","")) =~ m,[^/]+[/]([^/:]+).*, ? $1 : undef }
par:ICON;ICON as set, defaults to secur_alarm;{ AttrVal("DEVICE","icon","secur_alarm") }
attr DEVICE icon ICON
attr DEVICE devicetopic BASE_TOPIC/DEV_ID
attr DEVICE setList \
sensitivity:low,medium,high $\DEVICETOPIC/set {"sensitivity":"$EVTPART1"}
attr DEVICE stateFormat Action: action X: angle_x Y: angle_y Z: angle_z
attr DEVICE readingList $\DEVICETOPIC:.* { json2nameValue($EVENT) }
deletereading -q DEVICE (?!associatedWith|IODev).*
attr DEVICE model zigbee2mqtt_AlarmSensor
setreading DEVICE attrTemplateVersion 20200904
# contributed by JJ_Pamoux, https://forum.fhem.de/index.php/topic,94495.msg1243613.html#msg1243613
# NEO AB02B2 Alarm Sound
name:zigbee2mqtt_alarm_sound
desc: Alarm sound controller via zigbee2mqtt <br>Tested with: Tuya Neo NAS-AB02B2 sound device
filter:TYPE=MQTT2_DEVICE:FILTER=CID~zigbee.*
order:L_15a
par:BASE_TOPIC;base topic set in configuration.yaml of the zigbee2mqtt bridge;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m,[\b]?([^/:]+)[/].+, ? $1 : undef }