mqtt2matter 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (279) hide show
  1. package/CHANGELOG.md +76 -0
  2. package/LICENSE +202 -0
  3. package/NOTICE +23 -0
  4. package/README.md +172 -2
  5. package/dist/app.d.ts +34 -0
  6. package/dist/app.js +157 -0
  7. package/dist/app.js.map +1 -0
  8. package/dist/commands/import-z2m.d.ts +20 -0
  9. package/dist/commands/import-z2m.js +173 -0
  10. package/dist/commands/import-z2m.js.map +1 -0
  11. package/dist/commands/install.d.ts +41 -0
  12. package/dist/commands/install.js +250 -0
  13. package/dist/commands/install.js.map +1 -0
  14. package/dist/commands/update.d.ts +14 -0
  15. package/dist/commands/update.js +109 -0
  16. package/dist/commands/update.js.map +1 -0
  17. package/dist/config/index.d.ts +2 -0
  18. package/dist/config/index.js +3 -0
  19. package/dist/config/index.js.map +1 -0
  20. package/dist/config/load.d.ts +57 -0
  21. package/dist/config/load.js +137 -0
  22. package/dist/config/load.js.map +1 -0
  23. package/dist/config/schema.d.ts +496 -0
  24. package/dist/config/schema.js +115 -0
  25. package/dist/config/schema.js.map +1 -0
  26. package/dist/engine/payload.d.ts +94 -0
  27. package/dist/engine/payload.js +515 -0
  28. package/dist/engine/payload.js.map +1 -0
  29. package/dist/engine/runtime.d.ts +79 -0
  30. package/dist/engine/runtime.js +438 -0
  31. package/dist/engine/runtime.js.map +1 -0
  32. package/dist/engine/template.d.ts +20 -0
  33. package/dist/engine/template.js +264 -0
  34. package/dist/engine/template.js.map +1 -0
  35. package/dist/engine/units.d.ts +9 -0
  36. package/dist/engine/units.js +42 -0
  37. package/dist/engine/units.js.map +1 -0
  38. package/dist/families/climate.d.ts +11 -0
  39. package/dist/families/climate.js +68 -0
  40. package/dist/families/climate.js.map +1 -0
  41. package/dist/families/color.d.ts +30 -0
  42. package/dist/families/color.js +152 -0
  43. package/dist/families/color.js.map +1 -0
  44. package/dist/families/cover.d.ts +17 -0
  45. package/dist/families/cover.js +308 -0
  46. package/dist/families/cover.js.map +1 -0
  47. package/dist/families/fan.d.ts +16 -0
  48. package/dist/families/fan.js +154 -0
  49. package/dist/families/fan.js.map +1 -0
  50. package/dist/families/index.d.ts +32 -0
  51. package/dist/families/index.js +162 -0
  52. package/dist/families/index.js.map +1 -0
  53. package/dist/families/light.d.ts +36 -0
  54. package/dist/families/light.js +258 -0
  55. package/dist/families/light.js.map +1 -0
  56. package/dist/families/lock.d.ts +10 -0
  57. package/dist/families/lock.js +31 -0
  58. package/dist/families/lock.js.map +1 -0
  59. package/dist/families/on-off.d.ts +7 -0
  60. package/dist/families/on-off.js +56 -0
  61. package/dist/families/on-off.js.map +1 -0
  62. package/dist/families/power-source.d.ts +12 -0
  63. package/dist/families/power-source.js +60 -0
  64. package/dist/families/power-source.js.map +1 -0
  65. package/dist/families/registry.d.ts +40 -0
  66. package/dist/families/registry.js +72 -0
  67. package/dist/families/registry.js.map +1 -0
  68. package/dist/families/rvc.d.ts +40 -0
  69. package/dist/families/rvc.js +83 -0
  70. package/dist/families/rvc.js.map +1 -0
  71. package/dist/families/switch.d.ts +19 -0
  72. package/dist/families/switch.js +94 -0
  73. package/dist/families/switch.js.map +1 -0
  74. package/dist/importers/actions.d.ts +19 -0
  75. package/dist/importers/actions.js +98 -0
  76. package/dist/importers/actions.js.map +1 -0
  77. package/dist/importers/ha/areas.d.ts +6 -0
  78. package/dist/importers/ha/areas.js +279 -0
  79. package/dist/importers/ha/areas.js.map +1 -0
  80. package/dist/importers/ha/generate.d.ts +51 -0
  81. package/dist/importers/ha/generate.js +1376 -0
  82. package/dist/importers/ha/generate.js.map +1 -0
  83. package/dist/importers/ha/index.d.ts +6 -0
  84. package/dist/importers/ha/index.js +7 -0
  85. package/dist/importers/ha/index.js.map +1 -0
  86. package/dist/importers/ha/source.d.ts +36 -0
  87. package/dist/importers/ha/source.js +95 -0
  88. package/dist/importers/ha/source.js.map +1 -0
  89. package/dist/importers/ha/sync.d.ts +29 -0
  90. package/dist/importers/ha/sync.js +132 -0
  91. package/dist/importers/ha/sync.js.map +1 -0
  92. package/dist/importers/ha/templates.d.ts +18 -0
  93. package/dist/importers/ha/templates.js +285 -0
  94. package/dist/importers/ha/templates.js.map +1 -0
  95. package/dist/importers/ha/types.d.ts +78 -0
  96. package/dist/importers/ha/types.js +479 -0
  97. package/dist/importers/ha/types.js.map +1 -0
  98. package/dist/importers/index.d.ts +5 -0
  99. package/dist/importers/index.js +8 -0
  100. package/dist/importers/index.js.map +1 -0
  101. package/dist/importers/patch.d.ts +50 -0
  102. package/dist/importers/patch.js +224 -0
  103. package/dist/importers/patch.js.map +1 -0
  104. package/dist/importers/sync.d.ts +112 -0
  105. package/dist/importers/sync.js +220 -0
  106. package/dist/importers/sync.js.map +1 -0
  107. package/dist/importers/twins.d.ts +10 -0
  108. package/dist/importers/twins.js +34 -0
  109. package/dist/importers/twins.js.map +1 -0
  110. package/dist/importers/z2m/generate.d.ts +81 -0
  111. package/dist/importers/z2m/generate.js +1171 -0
  112. package/dist/importers/z2m/generate.js.map +1 -0
  113. package/dist/importers/z2m/index.d.ts +5 -0
  114. package/dist/importers/z2m/index.js +6 -0
  115. package/dist/importers/z2m/index.js.map +1 -0
  116. package/dist/importers/z2m/source.d.ts +18 -0
  117. package/dist/importers/z2m/source.js +46 -0
  118. package/dist/importers/z2m/source.js.map +1 -0
  119. package/dist/importers/z2m/sync.d.ts +29 -0
  120. package/dist/importers/z2m/sync.js +92 -0
  121. package/dist/importers/z2m/sync.js.map +1 -0
  122. package/dist/importers/z2m/types.d.ts +72 -0
  123. package/dist/importers/z2m/types.js +46 -0
  124. package/dist/importers/z2m/types.js.map +1 -0
  125. package/dist/index.d.ts +5 -0
  126. package/dist/index.js +7 -0
  127. package/dist/index.js.map +1 -0
  128. package/dist/log.d.ts +17 -0
  129. package/dist/log.js +54 -0
  130. package/dist/log.js.map +1 -0
  131. package/dist/main.d.ts +2 -0
  132. package/dist/main.js +202 -0
  133. package/dist/main.js.map +1 -0
  134. package/dist/matter/bridge.d.ts +113 -0
  135. package/dist/matter/bridge.js +467 -0
  136. package/dist/matter/bridge.js.map +1 -0
  137. package/dist/matter/check.d.ts +11 -0
  138. package/dist/matter/check.js +116 -0
  139. package/dist/matter/check.js.map +1 -0
  140. package/dist/matter/cluster-defaults.d.ts +6 -0
  141. package/dist/matter/cluster-defaults.js +63 -0
  142. package/dist/matter/cluster-defaults.js.map +1 -0
  143. package/dist/matter/commissioning.d.ts +21 -0
  144. package/dist/matter/commissioning.js +88 -0
  145. package/dist/matter/commissioning.js.map +1 -0
  146. package/dist/matter/device-types.d.ts +44 -0
  147. package/dist/matter/device-types.js +230 -0
  148. package/dist/matter/device-types.js.map +1 -0
  149. package/dist/matter/ids.d.ts +31 -0
  150. package/dist/matter/ids.js +83 -0
  151. package/dist/matter/ids.js.map +1 -0
  152. package/dist/matter/index.d.ts +7 -0
  153. package/dist/matter/index.js +8 -0
  154. package/dist/matter/index.js.map +1 -0
  155. package/dist/matter/node-manager.d.ts +39 -0
  156. package/dist/matter/node-manager.js +161 -0
  157. package/dist/matter/node-manager.js.map +1 -0
  158. package/dist/matter/shards.d.ts +26 -0
  159. package/dist/matter/shards.js +93 -0
  160. package/dist/matter/shards.js.map +1 -0
  161. package/dist/model/attribute.d.ts +18 -0
  162. package/dist/model/attribute.js +28 -0
  163. package/dist/model/attribute.js.map +1 -0
  164. package/dist/model/catalog.d.ts +79 -0
  165. package/dist/model/catalog.js +223 -0
  166. package/dist/model/catalog.js.map +1 -0
  167. package/dist/model/index.d.ts +7 -0
  168. package/dist/model/index.js +8 -0
  169. package/dist/model/index.js.map +1 -0
  170. package/dist/model/migrate.d.ts +4 -0
  171. package/dist/model/migrate.js +39 -0
  172. package/dist/model/migrate.js.map +1 -0
  173. package/dist/model/options.d.ts +102 -0
  174. package/dist/model/options.js +88 -0
  175. package/dist/model/options.js.map +1 -0
  176. package/dist/model/presets.d.ts +37 -0
  177. package/dist/model/presets.js +105 -0
  178. package/dist/model/presets.js.map +1 -0
  179. package/dist/model/schema.d.ts +1747 -0
  180. package/dist/model/schema.js +243 -0
  181. package/dist/model/schema.js.map +1 -0
  182. package/dist/model/validate.d.ts +21 -0
  183. package/dist/model/validate.js +484 -0
  184. package/dist/model/validate.js.map +1 -0
  185. package/dist/mqtt/client.d.ts +38 -0
  186. package/dist/mqtt/client.js +94 -0
  187. package/dist/mqtt/client.js.map +1 -0
  188. package/dist/mqtt/index.d.ts +2 -0
  189. package/dist/mqtt/index.js +3 -0
  190. package/dist/mqtt/index.js.map +1 -0
  191. package/dist/mqtt/topic-cache.d.ts +20 -0
  192. package/dist/mqtt/topic-cache.js +58 -0
  193. package/dist/mqtt/topic-cache.js.map +1 -0
  194. package/dist/server/auth.d.ts +59 -0
  195. package/dist/server/auth.js +185 -0
  196. package/dist/server/auth.js.map +1 -0
  197. package/dist/server/catalog.d.ts +52 -0
  198. package/dist/server/catalog.js +96 -0
  199. package/dist/server/catalog.js.map +1 -0
  200. package/dist/server/compact.d.ts +3 -0
  201. package/dist/server/compact.js +105 -0
  202. package/dist/server/compact.js.map +1 -0
  203. package/dist/server/config-store.d.ts +36 -0
  204. package/dist/server/config-store.js +155 -0
  205. package/dist/server/config-store.js.map +1 -0
  206. package/dist/server/events.d.ts +50 -0
  207. package/dist/server/events.js +71 -0
  208. package/dist/server/events.js.map +1 -0
  209. package/dist/server/http.d.ts +27 -0
  210. package/dist/server/http.js +168 -0
  211. package/dist/server/http.js.map +1 -0
  212. package/dist/server/importers.d.ts +40 -0
  213. package/dist/server/importers.js +75 -0
  214. package/dist/server/importers.js.map +1 -0
  215. package/dist/server/index.d.ts +6 -0
  216. package/dist/server/index.js +8 -0
  217. package/dist/server/index.js.map +1 -0
  218. package/dist/server/log-buffer.d.ts +22 -0
  219. package/dist/server/log-buffer.js +55 -0
  220. package/dist/server/log-buffer.js.map +1 -0
  221. package/dist/server/presets.d.ts +17 -0
  222. package/dist/server/presets.js +55 -0
  223. package/dist/server/presets.js.map +1 -0
  224. package/dist/server/preview.d.ts +19 -0
  225. package/dist/server/preview.js +121 -0
  226. package/dist/server/preview.js.map +1 -0
  227. package/dist/server/server.d.ts +107 -0
  228. package/dist/server/server.js +810 -0
  229. package/dist/server/server.js.map +1 -0
  230. package/dist/server/update.d.ts +60 -0
  231. package/dist/server/update.js +191 -0
  232. package/dist/server/update.js.map +1 -0
  233. package/docs/api.md +128 -0
  234. package/docs/architecture.md +121 -0
  235. package/docs/config.md +538 -0
  236. package/docs/importers.md +241 -0
  237. package/example/mqtt2matter.json +276 -0
  238. package/package.json +90 -4
  239. package/presets/mqtt-smarthome/button.json +47 -0
  240. package/presets/mqtt-smarthome/contact.json +37 -0
  241. package/presets/mqtt-smarthome/cover.json +50 -0
  242. package/presets/mqtt-smarthome/dimmer.json +57 -0
  243. package/presets/mqtt-smarthome/humidity.json +38 -0
  244. package/presets/mqtt-smarthome/light.json +47 -0
  245. package/presets/mqtt-smarthome/occupancy.json +46 -0
  246. package/presets/mqtt-smarthome/switch.json +47 -0
  247. package/presets/mqtt-smarthome/temperature.json +38 -0
  248. package/presets/openbeken/color-light.json +64 -0
  249. package/presets/openbeken/ct-light.json +51 -0
  250. package/presets/openbeken/dimmer.json +47 -0
  251. package/presets/openbeken/humidity.json +37 -0
  252. package/presets/openbeken/relay.json +40 -0
  253. package/presets/openbeken/temperature.json +41 -0
  254. package/presets/shelly-gen1/dimmer.json +48 -0
  255. package/presets/shelly-gen1/door-window.json +43 -0
  256. package/presets/shelly-gen1/ht.json +43 -0
  257. package/presets/shelly-gen1/relay-pm.json +60 -0
  258. package/presets/shelly-gen1/relay.json +36 -0
  259. package/presets/shelly-gen1/roller.json +52 -0
  260. package/presets/shelly-gen2/cover.json +68 -0
  261. package/presets/shelly-gen2/dimmer.json +61 -0
  262. package/presets/shelly-gen2/ht.json +47 -0
  263. package/presets/shelly-gen2/i4.json +82 -0
  264. package/presets/shelly-gen2/switch-pm.json +101 -0
  265. package/presets/shelly-gen2/switch.json +47 -0
  266. package/presets/tasmota/climate.json +52 -0
  267. package/presets/tasmota/color-light.json +63 -0
  268. package/presets/tasmota/ct-light.json +50 -0
  269. package/presets/tasmota/dimmer.json +45 -0
  270. package/presets/tasmota/relay.json +39 -0
  271. package/presets/tasmota/shutter.json +46 -0
  272. package/presets/tasmota/temperature-humidity.json +42 -0
  273. package/presets/tasmota/temperature.json +32 -0
  274. package/presets/valetudo/vacuum.json +103 -0
  275. package/presets/wled/dimmer.json +46 -0
  276. package/presets/wled/light.json +59 -0
  277. package/ui/dist/assets/index-BDtT6bdH.js +10 -0
  278. package/ui/dist/assets/index-CHiG-aoU.css +1 -0
  279. package/ui/dist/index.html +18 -0
@@ -0,0 +1,47 @@
1
+ {
2
+ "id": "openbeken/dimmer",
3
+ "name": "OpenBeken dimmer",
4
+ "description": "An OpenBeken LED driver or dimmer as a dimmable light: led_enableAll and led_dimmer (0–100) from <client>/<variable>/get, commands over cmnd/<client>/….",
5
+ "vendor": "OpenBeken",
6
+ "format": 1,
7
+ "variables": {
8
+ "client": {
9
+ "label": "Client topic",
10
+ "description": "OpenBeken → Config → MQTT → Client Topic (Base Topic): the first level of its topics"
11
+ },
12
+ "name": {"label": "Name", "default": "Dimmer"}
13
+ },
14
+ "device": {
15
+ "name": "%name%",
16
+ "vendor": "OpenBeken",
17
+ "availability": {"topic": "%client%/connected", "online": "online", "offline": "offline"},
18
+ "endpoints": [
19
+ {
20
+ "deviceTypes": ["DimmableLight"],
21
+ "options": {"light": {"onCommandType": "first"}},
22
+ "mappings": [
23
+ {
24
+ "attribute": "OnOff.onOff",
25
+ "status": {
26
+ "topic": "%client%/led_enableAll/get",
27
+ "map": {"1": true, "0": false},
28
+ "get": {"topic": "%client%/led_enableAll/get", "payload": ""}
29
+ },
30
+ "command": {"topic": "cmnd/%client%/led_enableAll", "format": {"true": "1", "false": "0"}}
31
+ },
32
+ {
33
+ "attribute": "LevelControl.currentLevel",
34
+ "status": {
35
+ "topic": "%client%/led_dimmer/get",
36
+ "template": "{{ value if value | float > 0 else '' }}",
37
+ "type": "number",
38
+ "unit": "percentLevel",
39
+ "get": {"topic": "%client%/led_dimmer/get", "payload": ""}
40
+ },
41
+ "command": {"topic": "cmnd/%client%/led_dimmer", "unit": "percentLevel", "round": 0}
42
+ }
43
+ ]
44
+ }
45
+ ]
46
+ }
47
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "id": "openbeken/humidity",
3
+ "name": "OpenBeken humidity",
4
+ "description": "A humidity channel (channel type Humidity or Humidity_div10) as a humidity sensor: <client>/<channel>/get divided by the type's divisor.",
5
+ "vendor": "OpenBeken",
6
+ "format": 1,
7
+ "variables": {
8
+ "client": {
9
+ "label": "Client topic",
10
+ "description": "OpenBeken → Config → MQTT → Client Topic (Base Topic): the first level of its topics"
11
+ },
12
+ "channel": {"label": "Channel", "description": "The humidity's channel number", "default": "2"},
13
+ "divisor": {"label": "Divisor", "description": "1 for Humidity, 10 for Humidity_div10", "default": "1"},
14
+ "name": {"label": "Name", "default": "Humidity"}
15
+ },
16
+ "device": {
17
+ "name": "%name%",
18
+ "vendor": "OpenBeken",
19
+ "availability": {"topic": "%client%/connected", "online": "online", "offline": "offline"},
20
+ "endpoints": [
21
+ {
22
+ "deviceTypes": ["HumiditySensor"],
23
+ "mappings": [
24
+ {
25
+ "attribute": "RelativeHumidityMeasurement.measuredValue",
26
+ "status": {
27
+ "topic": "%client%/%channel%/get",
28
+ "template": "{{ (value | float) / %divisor% }}",
29
+ "type": "number",
30
+ "unit": "percent100ths"
31
+ }
32
+ }
33
+ ]
34
+ }
35
+ ]
36
+ }
37
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "id": "openbeken/relay",
3
+ "name": "OpenBeken relay",
4
+ "description": "A relay channel of an OpenBeken device (BK7231, …) as a plug-in unit: <client>/<channel>/get 1/0, <client>/<channel>/set, the state asked for at start; availability from <client>/connected.",
5
+ "vendor": "OpenBeken",
6
+ "format": 1,
7
+ "variables": {
8
+ "client": {
9
+ "label": "Client topic",
10
+ "description": "OpenBeken → Config → MQTT → Client Topic (Base Topic): the first level of its topics"
11
+ },
12
+ "channel": {
13
+ "label": "Channel",
14
+ "description": "The relay's channel number (the pin's channel in Configure Module)",
15
+ "default": "1"
16
+ },
17
+ "name": {"label": "Name", "default": "Relay"}
18
+ },
19
+ "device": {
20
+ "name": "%name%",
21
+ "vendor": "OpenBeken",
22
+ "availability": {"topic": "%client%/connected", "online": "online", "offline": "offline"},
23
+ "endpoints": [
24
+ {
25
+ "deviceTypes": ["OnOffPlugInUnit"],
26
+ "mappings": [
27
+ {
28
+ "attribute": "OnOff.onOff",
29
+ "status": {
30
+ "topic": "%client%/%channel%/get",
31
+ "map": {"1": true, "0": false},
32
+ "get": {"topic": "%client%/%channel%/get", "payload": ""}
33
+ },
34
+ "command": {"topic": "%client%/%channel%/set", "format": {"true": "1", "false": "0"}}
35
+ }
36
+ ]
37
+ }
38
+ ]
39
+ }
40
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "id": "openbeken/temperature",
3
+ "name": "OpenBeken temperature",
4
+ "description": "A temperature channel (channel type Temperature, Temperature_div10 or _div100) as a temperature sensor: <client>/<channel>/get divided by the type's divisor.",
5
+ "vendor": "OpenBeken",
6
+ "format": 1,
7
+ "variables": {
8
+ "client": {
9
+ "label": "Client topic",
10
+ "description": "OpenBeken → Config → MQTT → Client Topic (Base Topic): the first level of its topics"
11
+ },
12
+ "channel": {"label": "Channel", "description": "The temperature's channel number", "default": "1"},
13
+ "divisor": {
14
+ "label": "Divisor",
15
+ "description": "1 for Temperature, 10 for Temperature_div10, 100 for Temperature_div100",
16
+ "default": "10"
17
+ },
18
+ "name": {"label": "Name", "default": "Temperature"}
19
+ },
20
+ "device": {
21
+ "name": "%name%",
22
+ "vendor": "OpenBeken",
23
+ "availability": {"topic": "%client%/connected", "online": "online", "offline": "offline"},
24
+ "endpoints": [
25
+ {
26
+ "deviceTypes": ["TemperatureSensor"],
27
+ "mappings": [
28
+ {
29
+ "attribute": "TemperatureMeasurement.measuredValue",
30
+ "status": {
31
+ "topic": "%client%/%channel%/get",
32
+ "template": "{{ (value | float) / %divisor% }}",
33
+ "type": "number",
34
+ "unit": "celsius"
35
+ }
36
+ }
37
+ ]
38
+ }
39
+ ]
40
+ }
41
+ }
@@ -0,0 +1,48 @@
1
+ {
2
+ "id": "shelly-gen1/dimmer",
3
+ "name": "Shelly Gen1 dimmer",
4
+ "description": "Shelly Dimmer 1/2 as a dimmable light: the light/0/status JSON (ison, brightness), commands as JSON to light/0/set; a level switches on.",
5
+ "vendor": "Shelly",
6
+ "format": 1,
7
+ "variables": {
8
+ "device": {
9
+ "label": "Device id",
10
+ "description": "The device's MQTT id: <model>-<deviceid>, as in its topics shellies/<id>/… (shellydimmer2-B929CC)"
11
+ },
12
+ "name": {"label": "Name", "default": "Shelly dimmer"}
13
+ },
14
+ "device": {
15
+ "name": "%name%",
16
+ "vendor": "Shelly",
17
+ "availability": {"topic": "shellies/%device%/online", "online": "true", "offline": "false"},
18
+ "endpoints": [
19
+ {
20
+ "deviceTypes": ["DimmableLight"],
21
+ "options": {"light": {"onCommandType": "brightness"}},
22
+ "mappings": [
23
+ {
24
+ "attribute": "OnOff.onOff",
25
+ "status": {
26
+ "topic": "shellies/%device%/light/0/status",
27
+ "extract": "ison",
28
+ "type": "boolean",
29
+ "get": {"topic": "shellies/%device%/command", "payload": "update"}
30
+ },
31
+ "command": {
32
+ "topic": "shellies/%device%/light/0/set",
33
+ "format": {"true": "{\"turn\":\"on\"}", "false": "{\"turn\":\"off\"}"}
34
+ }
35
+ },
36
+ {
37
+ "attribute": "LevelControl.currentLevel",
38
+ "status": {"topic": "shellies/%device%/light/0/status", "extract": "brightness", "unit": "percentLevel"},
39
+ "command": {
40
+ "topic": "shellies/%device%/light/0/set",
41
+ "template": "{\"turn\":\"{{ 'on' if percent > 0 else 'off' }}\",\"brightness\":{{ [percent, 1] | max }}}"
42
+ }
43
+ }
44
+ ]
45
+ }
46
+ ]
47
+ }
48
+ }
@@ -0,0 +1,43 @@
1
+ {
2
+ "id": "shelly-gen1/door-window",
3
+ "name": "Shelly Door/Window (Gen1)",
4
+ "description": "Shelly Door/Window 1/2 as a contact sensor with its battery (sensor/state open/close, sensor/battery) and the illuminance (sensor/lux) as a child endpoint. It sleeps between reports, so it has no availability.",
5
+ "vendor": "Shelly",
6
+ "format": 1,
7
+ "variables": {
8
+ "device": {
9
+ "label": "Device id",
10
+ "description": "The device's MQTT id: <model>-<deviceid>, as in its topics shellies/<id>/… (shellydw2-B929CC)"
11
+ },
12
+ "name": {"label": "Name", "default": "Shelly door/window"}
13
+ },
14
+ "device": {
15
+ "name": "%name%",
16
+ "vendor": "Shelly",
17
+ "endpoints": [
18
+ {
19
+ "deviceTypes": ["ContactSensor", "PowerSource"],
20
+ "mappings": [
21
+ {
22
+ "attribute": "BooleanState.stateValue",
23
+ "status": {"topic": "shellies/%device%/sensor/state", "map": {"open": false, "close": true}}
24
+ },
25
+ {
26
+ "attribute": "PowerSource.batPercentRemaining",
27
+ "status": {"topic": "shellies/%device%/sensor/battery", "type": "number", "unit": "halfPercent"}
28
+ }
29
+ ]
30
+ },
31
+ {
32
+ "id": "illuminance",
33
+ "deviceTypes": ["LightSensor"],
34
+ "mappings": [
35
+ {
36
+ "attribute": "IlluminanceMeasurement.measuredValue",
37
+ "status": {"topic": "shellies/%device%/sensor/lux", "type": "number", "unit": "lux"}
38
+ }
39
+ ]
40
+ }
41
+ ]
42
+ }
43
+ }
@@ -0,0 +1,43 @@
1
+ {
2
+ "id": "shelly-gen1/ht",
3
+ "name": "Shelly H&T (Gen1)",
4
+ "description": "The first-generation Shelly H&T: sensor/temperature (set the device to °C), sensor/humidity as a child endpoint, sensor/battery. It sleeps between reports, so it has no availability.",
5
+ "vendor": "Shelly",
6
+ "format": 1,
7
+ "variables": {
8
+ "device": {
9
+ "label": "Device id",
10
+ "description": "The device's MQTT id: <model>-<deviceid>, as in its topics shellies/<id>/… (shellyht-B929CC)"
11
+ },
12
+ "name": {"label": "Name", "default": "Shelly H&T"}
13
+ },
14
+ "device": {
15
+ "name": "%name%",
16
+ "vendor": "Shelly",
17
+ "endpoints": [
18
+ {
19
+ "deviceTypes": ["TemperatureSensor", "PowerSource"],
20
+ "mappings": [
21
+ {
22
+ "attribute": "TemperatureMeasurement.measuredValue",
23
+ "status": {"topic": "shellies/%device%/sensor/temperature", "type": "number", "unit": "celsius"}
24
+ },
25
+ {
26
+ "attribute": "PowerSource.batPercentRemaining",
27
+ "status": {"topic": "shellies/%device%/sensor/battery", "type": "number", "unit": "halfPercent"}
28
+ }
29
+ ]
30
+ },
31
+ {
32
+ "id": "humidity",
33
+ "deviceTypes": ["HumiditySensor"],
34
+ "mappings": [
35
+ {
36
+ "attribute": "RelativeHumidityMeasurement.measuredValue",
37
+ "status": {"topic": "shellies/%device%/sensor/humidity", "type": "number", "unit": "percent100ths"}
38
+ }
39
+ ]
40
+ }
41
+ ]
42
+ }
43
+ }
@@ -0,0 +1,60 @@
1
+ {
2
+ "id": "shelly-gen1/relay-pm",
3
+ "name": "Shelly Gen1 relay with power",
4
+ "description": "A metering relay (1PM, 2.5, Plug S) as a plug-in unit with an electrical sensor: the active power from shellies/<id>/relay/<channel>/power.",
5
+ "vendor": "Shelly",
6
+ "format": 1,
7
+ "variables": {
8
+ "device": {
9
+ "label": "Device id",
10
+ "description": "The device's MQTT id: <model>-<deviceid>, as in its topics shellies/<id>/… (shelly1pm-B929CC)"
11
+ },
12
+ "channel": {"label": "Channel", "description": "The relay: 0, or 1 for a Shelly 2.5's second", "default": "0"},
13
+ "name": {"label": "Name", "default": "Shelly relay"}
14
+ },
15
+ "device": {
16
+ "name": "%name%",
17
+ "vendor": "Shelly",
18
+ "availability": {"topic": "shellies/%device%/online", "online": "true", "offline": "false"},
19
+ "endpoints": [
20
+ {
21
+ "deviceTypes": ["OnOffPlugInUnit", "ElectricalSensor"],
22
+ "features": {"ElectricalPowerMeasurement": ["AlternatingCurrent"], "PowerTopology": ["NodeTopology"]},
23
+ "attributes": {
24
+ "ElectricalPowerMeasurement": {
25
+ "powerMode": 2,
26
+ "numberOfMeasurementTypes": 1,
27
+ "accuracy": [
28
+ {
29
+ "measurementType": 5,
30
+ "measured": true,
31
+ "minMeasuredValue": 0,
32
+ "maxMeasuredValue": 4000000,
33
+ "accuracyRanges": [{"rangeMin": 0, "rangeMax": 4000000, "fixedMax": 1000}]
34
+ }
35
+ ]
36
+ }
37
+ },
38
+ "mappings": [
39
+ {
40
+ "attribute": "OnOff.onOff",
41
+ "status": {
42
+ "topic": "shellies/%device%/relay/%channel%",
43
+ "map": {"on": true, "off": false, "overpower": false},
44
+ "get": {"topic": "shellies/%device%/command", "payload": "update"}
45
+ },
46
+ "command": {"topic": "shellies/%device%/relay/%channel%/command", "format": {"true": "on", "false": "off"}}
47
+ },
48
+ {
49
+ "attribute": "ElectricalPowerMeasurement.activePower",
50
+ "status": {
51
+ "topic": "shellies/%device%/relay/%channel%/power",
52
+ "type": "number",
53
+ "scale": {"from": [0, 1], "to": [0, 1000], "clamp": false}
54
+ }
55
+ }
56
+ ]
57
+ }
58
+ ]
59
+ }
60
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "id": "shelly-gen1/relay",
3
+ "name": "Shelly Gen1 relay",
4
+ "description": "A relay of a first-generation Shelly (1, 1PM, 2.5, Plug S, …) as a plug-in unit: shellies/<id>/relay/<channel> and …/command; availability from shellies/<id>/online.",
5
+ "vendor": "Shelly",
6
+ "format": 1,
7
+ "variables": {
8
+ "device": {
9
+ "label": "Device id",
10
+ "description": "The device's MQTT id: <model>-<deviceid>, as in its topics shellies/<id>/… (shelly1-B929CC)"
11
+ },
12
+ "channel": {"label": "Channel", "description": "The relay: 0, or 1 for a Shelly 2.5's second", "default": "0"},
13
+ "name": {"label": "Name", "default": "Shelly relay"}
14
+ },
15
+ "device": {
16
+ "name": "%name%",
17
+ "vendor": "Shelly",
18
+ "availability": {"topic": "shellies/%device%/online", "online": "true", "offline": "false"},
19
+ "endpoints": [
20
+ {
21
+ "deviceTypes": ["OnOffPlugInUnit"],
22
+ "mappings": [
23
+ {
24
+ "attribute": "OnOff.onOff",
25
+ "status": {
26
+ "topic": "shellies/%device%/relay/%channel%",
27
+ "map": {"on": true, "off": false, "overpower": false},
28
+ "get": {"topic": "shellies/%device%/command", "payload": "update"}
29
+ },
30
+ "command": {"topic": "shellies/%device%/relay/%channel%/command", "format": {"true": "on", "false": "off"}}
31
+ }
32
+ ]
33
+ }
34
+ ]
35
+ }
36
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "id": "shelly-gen1/roller",
3
+ "name": "Shelly Gen1 roller",
4
+ "description": "A Shelly 2.5 in roller mode as a position-aware window covering: roller/0/pos (100 = open; -1 until calibrated), roller/0/command/pos, open/close/stop on roller/0/command.",
5
+ "vendor": "Shelly",
6
+ "format": 1,
7
+ "variables": {
8
+ "device": {
9
+ "label": "Device id",
10
+ "description": "The device's MQTT id: <model>-<deviceid>, as in its topics shellies/<id>/… (shellyswitch25-B929CC)"
11
+ },
12
+ "name": {"label": "Name", "default": "Shelly roller"}
13
+ },
14
+ "device": {
15
+ "name": "%name%",
16
+ "vendor": "Shelly",
17
+ "availability": {"topic": "shellies/%device%/online", "online": "true", "offline": "false"},
18
+ "endpoints": [
19
+ {
20
+ "deviceTypes": ["WindowCovering"],
21
+ "mappings": [
22
+ {
23
+ "attribute": "WindowCovering.currentPositionLiftPercent100ths",
24
+ "status": {
25
+ "topic": "shellies/%device%/roller/0/pos",
26
+ "template": "{{ value if value | int >= 0 else '' }}",
27
+ "type": "number",
28
+ "scale": {"from": [0, 100], "to": [10000, 0]},
29
+ "get": {"topic": "shellies/%device%/command", "payload": "update"}
30
+ }
31
+ },
32
+ {
33
+ "attribute": "WindowCovering.targetPositionLiftPercent100ths",
34
+ "command": {"topic": "shellies/%device%/roller/0/command/pos", "template": "{{ open }}"}
35
+ },
36
+ {
37
+ "invoke": "WindowCovering.upOrOpen",
38
+ "command": {"topic": "shellies/%device%/roller/0/command", "payload": "open"}
39
+ },
40
+ {
41
+ "invoke": "WindowCovering.downOrClose",
42
+ "command": {"topic": "shellies/%device%/roller/0/command", "payload": "close"}
43
+ },
44
+ {
45
+ "invoke": "WindowCovering.stopMotion",
46
+ "command": {"topic": "shellies/%device%/roller/0/command", "payload": "stop"}
47
+ }
48
+ ]
49
+ }
50
+ ]
51
+ }
52
+ }
@@ -0,0 +1,68 @@
1
+ {
2
+ "id": "shelly-gen2/cover",
3
+ "name": "Shelly Gen2 cover",
4
+ "description": "A cover (2PM in cover mode, Pro Dual Cover: cover:<channel>) as a position-aware window covering; needs a calibrated cover and Settings → MQTT → Generic status update. Commands as RPC: Cover.GoToPosition, Open, Close, Stop.",
5
+ "vendor": "Shelly",
6
+ "format": 1,
7
+ "variables": {
8
+ "prefix": {
9
+ "label": "MQTT prefix",
10
+ "description": "Settings → MQTT → MQTT prefix; by default the device id (shellyplus1pm-a8032abe54dc)"
11
+ },
12
+ "channel": {
13
+ "label": "Channel",
14
+ "description": "The cover component's id: 0, or 1 for a Pro Dual Cover's second",
15
+ "default": "0"
16
+ },
17
+ "name": {"label": "Name", "default": "Shelly cover"}
18
+ },
19
+ "device": {
20
+ "name": "%name%",
21
+ "vendor": "Shelly",
22
+ "availability": {"topic": "%prefix%/online", "online": "true", "offline": "false"},
23
+ "endpoints": [
24
+ {
25
+ "deviceTypes": ["WindowCovering"],
26
+ "mappings": [
27
+ {
28
+ "attribute": "WindowCovering.currentPositionLiftPercent100ths",
29
+ "status": {
30
+ "topic": "%prefix%/status/cover:%channel%",
31
+ "extract": "current_pos",
32
+ "scale": {"from": [0, 100], "to": [10000, 0]},
33
+ "get": {"topic": "%prefix%/command/cover:%channel%", "payload": "status_update"}
34
+ }
35
+ },
36
+ {
37
+ "attribute": "WindowCovering.targetPositionLiftPercent100ths",
38
+ "command": {
39
+ "topic": "%prefix%/rpc",
40
+ "template": "{\"id\":1,\"src\":\"mqtt2matter\",\"method\":\"Cover.GoToPosition\",\"params\":{\"id\":%channel%,\"pos\":{{ open }}}}"
41
+ }
42
+ },
43
+ {
44
+ "invoke": "WindowCovering.upOrOpen",
45
+ "command": {
46
+ "topic": "%prefix%/rpc",
47
+ "payload": "{\"id\":1,\"src\":\"mqtt2matter\",\"method\":\"Cover.Open\",\"params\":{\"id\":%channel%}}"
48
+ }
49
+ },
50
+ {
51
+ "invoke": "WindowCovering.downOrClose",
52
+ "command": {
53
+ "topic": "%prefix%/rpc",
54
+ "payload": "{\"id\":1,\"src\":\"mqtt2matter\",\"method\":\"Cover.Close\",\"params\":{\"id\":%channel%}}"
55
+ }
56
+ },
57
+ {
58
+ "invoke": "WindowCovering.stopMotion",
59
+ "command": {
60
+ "topic": "%prefix%/rpc",
61
+ "payload": "{\"id\":1,\"src\":\"mqtt2matter\",\"method\":\"Cover.Stop\",\"params\":{\"id\":%channel%}}"
62
+ }
63
+ }
64
+ ]
65
+ }
66
+ ]
67
+ }
68
+ }
@@ -0,0 +1,61 @@
1
+ {
2
+ "id": "shelly-gen2/dimmer",
3
+ "name": "Shelly Gen2 dimmer",
4
+ "description": "A dimmer (Plus/Pro Dimmer, Dimmer Gen3: light:<channel>) as a dimmable light; needs Settings → MQTT → Generic status update. Commands as RPC (Light.Set); a level switches on.",
5
+ "vendor": "Shelly",
6
+ "format": 1,
7
+ "variables": {
8
+ "prefix": {
9
+ "label": "MQTT prefix",
10
+ "description": "Settings → MQTT → MQTT prefix; by default the device id (shellyplus1pm-a8032abe54dc)"
11
+ },
12
+ "channel": {
13
+ "label": "Channel",
14
+ "description": "The light component's id: 0, or 1 for a Pro Dimmer 2PM's second",
15
+ "default": "0"
16
+ },
17
+ "name": {"label": "Name", "default": "Shelly dimmer"}
18
+ },
19
+ "device": {
20
+ "name": "%name%",
21
+ "vendor": "Shelly",
22
+ "availability": {"topic": "%prefix%/online", "online": "true", "offline": "false"},
23
+ "endpoints": [
24
+ {
25
+ "deviceTypes": ["DimmableLight"],
26
+ "options": {"light": {"onCommandType": "brightness"}},
27
+ "mappings": [
28
+ {
29
+ "attribute": "OnOff.onOff",
30
+ "status": {
31
+ "topic": "%prefix%/status/light:%channel%",
32
+ "extract": "output",
33
+ "type": "boolean",
34
+ "get": {"topic": "%prefix%/command/light:%channel%", "payload": "status_update"}
35
+ },
36
+ "command": {
37
+ "topic": "%prefix%/rpc",
38
+ "format": {
39
+ "true": "{\"id\":1,\"src\":\"mqtt2matter\",\"method\":\"Light.Set\",\"params\":{\"id\":%channel%,\"on\":true}}",
40
+ "false": "{\"id\":1,\"src\":\"mqtt2matter\",\"method\":\"Light.Set\",\"params\":{\"id\":%channel%,\"on\":false}}"
41
+ }
42
+ }
43
+ },
44
+ {
45
+ "attribute": "LevelControl.currentLevel",
46
+ "status": {
47
+ "topic": "%prefix%/status/light:%channel%",
48
+ "template": "{{ value_json.brightness if value_json.brightness > 0 else '' }}",
49
+ "type": "number",
50
+ "unit": "percentLevel"
51
+ },
52
+ "command": {
53
+ "topic": "%prefix%/rpc",
54
+ "template": "{\"id\":1,\"src\":\"mqtt2matter\",\"method\":\"Light.Set\",\"params\":{\"id\":%channel%,\"on\":{{ 'true' if percent > 0 else 'false' }},\"brightness\":{{ [percent, 1] | max }}}}"
55
+ }
56
+ }
57
+ ]
58
+ }
59
+ ]
60
+ }
61
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "id": "shelly-gen2/ht",
3
+ "name": "Shelly Plus H&T",
4
+ "description": "Shelly Plus H&T / H&T Gen3: temperature with the battery, humidity as a child endpoint. Needs Settings → MQTT → Generic status update. Battery-powered: it reports when it wakes up and has no availability topic worth following (it is offline while asleep).",
5
+ "vendor": "Shelly",
6
+ "format": 1,
7
+ "variables": {
8
+ "prefix": {
9
+ "label": "MQTT prefix",
10
+ "description": "Settings → MQTT → MQTT prefix; by default the device id (shellyplus1pm-a8032abe54dc)"
11
+ },
12
+ "name": {"label": "Name", "default": "Shelly H&T"}
13
+ },
14
+ "device": {
15
+ "name": "%name%",
16
+ "vendor": "Shelly",
17
+ "endpoints": [
18
+ {
19
+ "deviceTypes": ["TemperatureSensor", "PowerSource"],
20
+ "mappings": [
21
+ {
22
+ "attribute": "TemperatureMeasurement.measuredValue",
23
+ "status": {"topic": "%prefix%/status/temperature:0", "extract": "tC", "unit": "celsius"}
24
+ },
25
+ {
26
+ "attribute": "PowerSource.batPercentRemaining",
27
+ "status": {"topic": "%prefix%/status/devicepower:0", "extract": "battery.percent", "unit": "halfPercent"}
28
+ },
29
+ {
30
+ "attribute": "PowerSource.batVoltage",
31
+ "status": {"topic": "%prefix%/status/devicepower:0", "extract": "battery.V", "unit": "volt"}
32
+ }
33
+ ]
34
+ },
35
+ {
36
+ "id": "humidity",
37
+ "deviceTypes": ["HumiditySensor"],
38
+ "mappings": [
39
+ {
40
+ "attribute": "RelativeHumidityMeasurement.measuredValue",
41
+ "status": {"topic": "%prefix%/status/humidity:0", "extract": "rh", "unit": "percent100ths"}
42
+ }
43
+ ]
44
+ }
45
+ ]
46
+ }
47
+ }