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,103 @@
1
+ {
2
+ "id": "valetudo/vacuum",
3
+ "name": "Valetudo robot vacuum",
4
+ "description": "A robot vacuum running Valetudo as a Matter robotic vacuum cleaner: run mode (Idle/Cleaning), operational state from StatusStateAttribute/status, start, pause, resume and return to the dock over BasicControlCapability, the battery. Bridged vacuums show in Google Home and Home Assistant; Apple Home and Alexa want a vacuum as a Matter node of its own.",
5
+ "vendor": "Valetudo",
6
+ "format": 1,
7
+ "variables": {
8
+ "prefix": {
9
+ "label": "Topic prefix",
10
+ "description": "Valetudo → Connectivity → MQTT → Topic prefix",
11
+ "default": "valetudo"
12
+ },
13
+ "identifier": {
14
+ "label": "Identifier",
15
+ "description": "Valetudo → Connectivity → MQTT → Identifier (the robot's name in the topics)"
16
+ },
17
+ "name": {"label": "Name", "default": "Vacuum"}
18
+ },
19
+ "device": {
20
+ "name": "%name%",
21
+ "vendor": "Valetudo",
22
+ "availability": {
23
+ "topic": "%prefix%/%identifier%/$state",
24
+ "template": "{{ 'online' if value == 'ready' else 'offline' }}"
25
+ },
26
+ "endpoints": [
27
+ {
28
+ "deviceTypes": ["RoboticVacuumCleaner", "PowerSource"],
29
+ "features": {"PowerSource": ["Battery", "Rechargeable"]},
30
+ "mappings": [
31
+ {
32
+ "attribute": "RvcRunMode.currentMode",
33
+ "status": {
34
+ "topic": "%prefix%/%identifier%/StatusStateAttribute/status",
35
+ "map": {
36
+ "cleaning": 1,
37
+ "paused": 1,
38
+ "moving": 1,
39
+ "manual_control": 1,
40
+ "returning": 0,
41
+ "docked": 0,
42
+ "idle": 0,
43
+ "error": 0
44
+ }
45
+ },
46
+ "command": {
47
+ "topic": "%prefix%/%identifier%/BasicControlCapability/operation/set",
48
+ "format": {"1": "START", "0": "HOME"}
49
+ }
50
+ },
51
+ {
52
+ "attribute": "RvcOperationalState.operationalState",
53
+ "status": {
54
+ "topic": "%prefix%/%identifier%/StatusStateAttribute/status",
55
+ "map": {
56
+ "cleaning": "Running",
57
+ "moving": "Running",
58
+ "manual_control": "Running",
59
+ "paused": "Paused",
60
+ "returning": "SeekingCharger",
61
+ "docked": "Docked",
62
+ "idle": "Stopped",
63
+ "error": "Error"
64
+ }
65
+ }
66
+ },
67
+ {
68
+ "invoke": "RvcOperationalState.pause",
69
+ "command": {"topic": "%prefix%/%identifier%/BasicControlCapability/operation/set", "payload": "PAUSE"}
70
+ },
71
+ {
72
+ "invoke": "RvcOperationalState.resume",
73
+ "command": {"topic": "%prefix%/%identifier%/BasicControlCapability/operation/set", "payload": "START"}
74
+ },
75
+ {
76
+ "invoke": "RvcOperationalState.goHome",
77
+ "command": {"topic": "%prefix%/%identifier%/BasicControlCapability/operation/set", "payload": "HOME"}
78
+ },
79
+ {
80
+ "attribute": "PowerSource.batPercentRemaining",
81
+ "status": {
82
+ "topic": "%prefix%/%identifier%/BatteryStateAttribute/level",
83
+ "type": "number",
84
+ "unit": "halfPercent"
85
+ }
86
+ },
87
+ {
88
+ "attribute": "PowerSource.batChargeState",
89
+ "status": {
90
+ "topic": "%prefix%/%identifier%/BatteryStateAttribute/status",
91
+ "map": {
92
+ "charging": "IsCharging",
93
+ "charged": "IsAtFullCharge",
94
+ "discharging": "IsNotCharging",
95
+ "none": "Unknown"
96
+ }
97
+ }
98
+ }
99
+ ]
100
+ }
101
+ ]
102
+ }
103
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "id": "wled/dimmer",
3
+ "name": "WLED dimmer",
4
+ "description": "A single-colour WLED strip as a dimmable light: on/off and brightness from <topic>/g, commands to <topic>; availability from <topic>/status.",
5
+ "vendor": "WLED",
6
+ "format": 1,
7
+ "variables": {
8
+ "topic": {
9
+ "label": "Device topic",
10
+ "description": "WLED's MQTT device topic (Config → Sync Interfaces → MQTT → Device Topic; default wled/<MAC>)"
11
+ },
12
+ "name": {"label": "Name", "default": "WLED"}
13
+ },
14
+ "device": {
15
+ "name": "%name%",
16
+ "vendor": "WLED",
17
+ "availability": {"topic": "%topic%/status", "online": "online", "offline": "offline"},
18
+ "endpoints": [
19
+ {
20
+ "deviceTypes": ["DimmableLight"],
21
+ "options": {"light": {"onCommandType": "brightness"}},
22
+ "mappings": [
23
+ {
24
+ "attribute": "OnOff.onOff",
25
+ "status": {
26
+ "topic": "%topic%/g",
27
+ "template": "{{ 'true' if value | int > 0 else 'false' }}",
28
+ "map": {"true": true, "false": false}
29
+ },
30
+ "command": {"topic": "%topic%", "format": {"true": "ON", "false": "OFF"}}
31
+ },
32
+ {
33
+ "attribute": "LevelControl.currentLevel",
34
+ "status": {
35
+ "topic": "%topic%/g",
36
+ "template": "{{ value if value | int > 0 else '' }}",
37
+ "type": "number",
38
+ "unit": "byteLevel"
39
+ },
40
+ "command": {"topic": "%topic%", "unit": "byteLevel", "round": 0}
41
+ }
42
+ ]
43
+ }
44
+ ]
45
+ }
46
+ }
@@ -0,0 +1,59 @@
1
+ {
2
+ "id": "wled/light",
3
+ "name": "WLED light",
4
+ "description": "A WLED strip as a colour light: on/off and brightness from <topic>/g, the colour from <topic>/c, commands to <topic> and <topic>/col; colour temperature goes to the main segment's cct over <topic>/api (white channels only); availability from <topic>/status.",
5
+ "vendor": "WLED",
6
+ "format": 1,
7
+ "variables": {
8
+ "topic": {
9
+ "label": "Device topic",
10
+ "description": "WLED's MQTT device topic (Config → Sync Interfaces → MQTT → Device Topic; default wled/<MAC>)"
11
+ },
12
+ "name": {"label": "Name", "default": "WLED"}
13
+ },
14
+ "device": {
15
+ "name": "%name%",
16
+ "vendor": "WLED",
17
+ "availability": {"topic": "%topic%/status", "online": "online", "offline": "offline"},
18
+ "endpoints": [
19
+ {
20
+ "deviceTypes": ["ExtendedColorLight"],
21
+ "features": {"ColorControl": ["HueSaturation"]},
22
+ "options": {"light": {"onCommandType": "brightness"}},
23
+ "mappings": [
24
+ {
25
+ "attribute": "OnOff.onOff",
26
+ "status": {
27
+ "topic": "%topic%/g",
28
+ "template": "{{ 'true' if value | int > 0 else 'false' }}",
29
+ "map": {"true": true, "false": false}
30
+ },
31
+ "command": {"topic": "%topic%", "format": {"true": "ON", "false": "OFF"}}
32
+ },
33
+ {
34
+ "attribute": "LevelControl.currentLevel",
35
+ "status": {
36
+ "topic": "%topic%/g",
37
+ "template": "{{ value if value | int > 0 else '' }}",
38
+ "type": "number",
39
+ "unit": "byteLevel"
40
+ },
41
+ "command": {"topic": "%topic%", "unit": "byteLevel", "round": 0}
42
+ },
43
+ {
44
+ "attribute": "ColorControl.colorRgb",
45
+ "status": {
46
+ "topic": "%topic%/c",
47
+ "template": "{% set h = value[-6:] %}{{ h[0:2] | int(0, 16) }},{{ h[2:4] | int(0, 16) }},{{ h[4:6] | int(0, 16) }}"
48
+ },
49
+ "command": {"topic": "%topic%/col", "template": "{{ red * 65536 + green * 256 + blue }}"}
50
+ },
51
+ {
52
+ "attribute": "ColorControl.colorTemperatureMireds",
53
+ "command": {"topic": "%topic%/api", "template": "{\"seg\":{\"cct\":{{ kelvin | round(0) | int }}}}"}
54
+ }
55
+ ]
56
+ }
57
+ ]
58
+ }
59
+ }