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.
- package/CHANGELOG.md +76 -0
- package/LICENSE +202 -0
- package/NOTICE +23 -0
- package/README.md +172 -2
- package/dist/app.d.ts +34 -0
- package/dist/app.js +157 -0
- package/dist/app.js.map +1 -0
- package/dist/commands/import-z2m.d.ts +20 -0
- package/dist/commands/import-z2m.js +173 -0
- package/dist/commands/import-z2m.js.map +1 -0
- package/dist/commands/install.d.ts +41 -0
- package/dist/commands/install.js +250 -0
- package/dist/commands/install.js.map +1 -0
- package/dist/commands/update.d.ts +14 -0
- package/dist/commands/update.js +109 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/config/index.d.ts +2 -0
- package/dist/config/index.js +3 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/load.d.ts +57 -0
- package/dist/config/load.js +137 -0
- package/dist/config/load.js.map +1 -0
- package/dist/config/schema.d.ts +496 -0
- package/dist/config/schema.js +115 -0
- package/dist/config/schema.js.map +1 -0
- package/dist/engine/payload.d.ts +94 -0
- package/dist/engine/payload.js +515 -0
- package/dist/engine/payload.js.map +1 -0
- package/dist/engine/runtime.d.ts +79 -0
- package/dist/engine/runtime.js +438 -0
- package/dist/engine/runtime.js.map +1 -0
- package/dist/engine/template.d.ts +20 -0
- package/dist/engine/template.js +264 -0
- package/dist/engine/template.js.map +1 -0
- package/dist/engine/units.d.ts +9 -0
- package/dist/engine/units.js +42 -0
- package/dist/engine/units.js.map +1 -0
- package/dist/families/climate.d.ts +11 -0
- package/dist/families/climate.js +68 -0
- package/dist/families/climate.js.map +1 -0
- package/dist/families/color.d.ts +30 -0
- package/dist/families/color.js +152 -0
- package/dist/families/color.js.map +1 -0
- package/dist/families/cover.d.ts +17 -0
- package/dist/families/cover.js +308 -0
- package/dist/families/cover.js.map +1 -0
- package/dist/families/fan.d.ts +16 -0
- package/dist/families/fan.js +154 -0
- package/dist/families/fan.js.map +1 -0
- package/dist/families/index.d.ts +32 -0
- package/dist/families/index.js +162 -0
- package/dist/families/index.js.map +1 -0
- package/dist/families/light.d.ts +36 -0
- package/dist/families/light.js +258 -0
- package/dist/families/light.js.map +1 -0
- package/dist/families/lock.d.ts +10 -0
- package/dist/families/lock.js +31 -0
- package/dist/families/lock.js.map +1 -0
- package/dist/families/on-off.d.ts +7 -0
- package/dist/families/on-off.js +56 -0
- package/dist/families/on-off.js.map +1 -0
- package/dist/families/power-source.d.ts +12 -0
- package/dist/families/power-source.js +60 -0
- package/dist/families/power-source.js.map +1 -0
- package/dist/families/registry.d.ts +40 -0
- package/dist/families/registry.js +72 -0
- package/dist/families/registry.js.map +1 -0
- package/dist/families/rvc.d.ts +40 -0
- package/dist/families/rvc.js +83 -0
- package/dist/families/rvc.js.map +1 -0
- package/dist/families/switch.d.ts +19 -0
- package/dist/families/switch.js +94 -0
- package/dist/families/switch.js.map +1 -0
- package/dist/importers/actions.d.ts +19 -0
- package/dist/importers/actions.js +98 -0
- package/dist/importers/actions.js.map +1 -0
- package/dist/importers/ha/areas.d.ts +6 -0
- package/dist/importers/ha/areas.js +279 -0
- package/dist/importers/ha/areas.js.map +1 -0
- package/dist/importers/ha/generate.d.ts +51 -0
- package/dist/importers/ha/generate.js +1376 -0
- package/dist/importers/ha/generate.js.map +1 -0
- package/dist/importers/ha/index.d.ts +6 -0
- package/dist/importers/ha/index.js +7 -0
- package/dist/importers/ha/index.js.map +1 -0
- package/dist/importers/ha/source.d.ts +36 -0
- package/dist/importers/ha/source.js +95 -0
- package/dist/importers/ha/source.js.map +1 -0
- package/dist/importers/ha/sync.d.ts +29 -0
- package/dist/importers/ha/sync.js +132 -0
- package/dist/importers/ha/sync.js.map +1 -0
- package/dist/importers/ha/templates.d.ts +18 -0
- package/dist/importers/ha/templates.js +285 -0
- package/dist/importers/ha/templates.js.map +1 -0
- package/dist/importers/ha/types.d.ts +78 -0
- package/dist/importers/ha/types.js +479 -0
- package/dist/importers/ha/types.js.map +1 -0
- package/dist/importers/index.d.ts +5 -0
- package/dist/importers/index.js +8 -0
- package/dist/importers/index.js.map +1 -0
- package/dist/importers/patch.d.ts +50 -0
- package/dist/importers/patch.js +224 -0
- package/dist/importers/patch.js.map +1 -0
- package/dist/importers/sync.d.ts +112 -0
- package/dist/importers/sync.js +220 -0
- package/dist/importers/sync.js.map +1 -0
- package/dist/importers/twins.d.ts +10 -0
- package/dist/importers/twins.js +34 -0
- package/dist/importers/twins.js.map +1 -0
- package/dist/importers/z2m/generate.d.ts +81 -0
- package/dist/importers/z2m/generate.js +1171 -0
- package/dist/importers/z2m/generate.js.map +1 -0
- package/dist/importers/z2m/index.d.ts +5 -0
- package/dist/importers/z2m/index.js +6 -0
- package/dist/importers/z2m/index.js.map +1 -0
- package/dist/importers/z2m/source.d.ts +18 -0
- package/dist/importers/z2m/source.js +46 -0
- package/dist/importers/z2m/source.js.map +1 -0
- package/dist/importers/z2m/sync.d.ts +29 -0
- package/dist/importers/z2m/sync.js +92 -0
- package/dist/importers/z2m/sync.js.map +1 -0
- package/dist/importers/z2m/types.d.ts +72 -0
- package/dist/importers/z2m/types.js +46 -0
- package/dist/importers/z2m/types.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/log.d.ts +17 -0
- package/dist/log.js +54 -0
- package/dist/log.js.map +1 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +202 -0
- package/dist/main.js.map +1 -0
- package/dist/matter/bridge.d.ts +113 -0
- package/dist/matter/bridge.js +467 -0
- package/dist/matter/bridge.js.map +1 -0
- package/dist/matter/check.d.ts +11 -0
- package/dist/matter/check.js +116 -0
- package/dist/matter/check.js.map +1 -0
- package/dist/matter/cluster-defaults.d.ts +6 -0
- package/dist/matter/cluster-defaults.js +63 -0
- package/dist/matter/cluster-defaults.js.map +1 -0
- package/dist/matter/commissioning.d.ts +21 -0
- package/dist/matter/commissioning.js +88 -0
- package/dist/matter/commissioning.js.map +1 -0
- package/dist/matter/device-types.d.ts +44 -0
- package/dist/matter/device-types.js +230 -0
- package/dist/matter/device-types.js.map +1 -0
- package/dist/matter/ids.d.ts +31 -0
- package/dist/matter/ids.js +83 -0
- package/dist/matter/ids.js.map +1 -0
- package/dist/matter/index.d.ts +7 -0
- package/dist/matter/index.js +8 -0
- package/dist/matter/index.js.map +1 -0
- package/dist/matter/node-manager.d.ts +39 -0
- package/dist/matter/node-manager.js +161 -0
- package/dist/matter/node-manager.js.map +1 -0
- package/dist/matter/shards.d.ts +26 -0
- package/dist/matter/shards.js +93 -0
- package/dist/matter/shards.js.map +1 -0
- package/dist/model/attribute.d.ts +18 -0
- package/dist/model/attribute.js +28 -0
- package/dist/model/attribute.js.map +1 -0
- package/dist/model/catalog.d.ts +79 -0
- package/dist/model/catalog.js +223 -0
- package/dist/model/catalog.js.map +1 -0
- package/dist/model/index.d.ts +7 -0
- package/dist/model/index.js +8 -0
- package/dist/model/index.js.map +1 -0
- package/dist/model/migrate.d.ts +4 -0
- package/dist/model/migrate.js +39 -0
- package/dist/model/migrate.js.map +1 -0
- package/dist/model/options.d.ts +102 -0
- package/dist/model/options.js +88 -0
- package/dist/model/options.js.map +1 -0
- package/dist/model/presets.d.ts +37 -0
- package/dist/model/presets.js +105 -0
- package/dist/model/presets.js.map +1 -0
- package/dist/model/schema.d.ts +1747 -0
- package/dist/model/schema.js +243 -0
- package/dist/model/schema.js.map +1 -0
- package/dist/model/validate.d.ts +21 -0
- package/dist/model/validate.js +484 -0
- package/dist/model/validate.js.map +1 -0
- package/dist/mqtt/client.d.ts +38 -0
- package/dist/mqtt/client.js +94 -0
- package/dist/mqtt/client.js.map +1 -0
- package/dist/mqtt/index.d.ts +2 -0
- package/dist/mqtt/index.js +3 -0
- package/dist/mqtt/index.js.map +1 -0
- package/dist/mqtt/topic-cache.d.ts +20 -0
- package/dist/mqtt/topic-cache.js +58 -0
- package/dist/mqtt/topic-cache.js.map +1 -0
- package/dist/server/auth.d.ts +59 -0
- package/dist/server/auth.js +185 -0
- package/dist/server/auth.js.map +1 -0
- package/dist/server/catalog.d.ts +52 -0
- package/dist/server/catalog.js +96 -0
- package/dist/server/catalog.js.map +1 -0
- package/dist/server/compact.d.ts +3 -0
- package/dist/server/compact.js +105 -0
- package/dist/server/compact.js.map +1 -0
- package/dist/server/config-store.d.ts +36 -0
- package/dist/server/config-store.js +155 -0
- package/dist/server/config-store.js.map +1 -0
- package/dist/server/events.d.ts +50 -0
- package/dist/server/events.js +71 -0
- package/dist/server/events.js.map +1 -0
- package/dist/server/http.d.ts +27 -0
- package/dist/server/http.js +168 -0
- package/dist/server/http.js.map +1 -0
- package/dist/server/importers.d.ts +40 -0
- package/dist/server/importers.js +75 -0
- package/dist/server/importers.js.map +1 -0
- package/dist/server/index.d.ts +6 -0
- package/dist/server/index.js +8 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/log-buffer.d.ts +22 -0
- package/dist/server/log-buffer.js +55 -0
- package/dist/server/log-buffer.js.map +1 -0
- package/dist/server/presets.d.ts +17 -0
- package/dist/server/presets.js +55 -0
- package/dist/server/presets.js.map +1 -0
- package/dist/server/preview.d.ts +19 -0
- package/dist/server/preview.js +121 -0
- package/dist/server/preview.js.map +1 -0
- package/dist/server/server.d.ts +107 -0
- package/dist/server/server.js +810 -0
- package/dist/server/server.js.map +1 -0
- package/dist/server/update.d.ts +60 -0
- package/dist/server/update.js +191 -0
- package/dist/server/update.js.map +1 -0
- package/docs/api.md +128 -0
- package/docs/architecture.md +121 -0
- package/docs/config.md +538 -0
- package/docs/importers.md +241 -0
- package/example/mqtt2matter.json +276 -0
- package/package.json +90 -4
- package/presets/mqtt-smarthome/button.json +47 -0
- package/presets/mqtt-smarthome/contact.json +37 -0
- package/presets/mqtt-smarthome/cover.json +50 -0
- package/presets/mqtt-smarthome/dimmer.json +57 -0
- package/presets/mqtt-smarthome/humidity.json +38 -0
- package/presets/mqtt-smarthome/light.json +47 -0
- package/presets/mqtt-smarthome/occupancy.json +46 -0
- package/presets/mqtt-smarthome/switch.json +47 -0
- package/presets/mqtt-smarthome/temperature.json +38 -0
- package/presets/openbeken/color-light.json +64 -0
- package/presets/openbeken/ct-light.json +51 -0
- package/presets/openbeken/dimmer.json +47 -0
- package/presets/openbeken/humidity.json +37 -0
- package/presets/openbeken/relay.json +40 -0
- package/presets/openbeken/temperature.json +41 -0
- package/presets/shelly-gen1/dimmer.json +48 -0
- package/presets/shelly-gen1/door-window.json +43 -0
- package/presets/shelly-gen1/ht.json +43 -0
- package/presets/shelly-gen1/relay-pm.json +60 -0
- package/presets/shelly-gen1/relay.json +36 -0
- package/presets/shelly-gen1/roller.json +52 -0
- package/presets/shelly-gen2/cover.json +68 -0
- package/presets/shelly-gen2/dimmer.json +61 -0
- package/presets/shelly-gen2/ht.json +47 -0
- package/presets/shelly-gen2/i4.json +82 -0
- package/presets/shelly-gen2/switch-pm.json +101 -0
- package/presets/shelly-gen2/switch.json +47 -0
- package/presets/tasmota/climate.json +52 -0
- package/presets/tasmota/color-light.json +63 -0
- package/presets/tasmota/ct-light.json +50 -0
- package/presets/tasmota/dimmer.json +45 -0
- package/presets/tasmota/relay.json +39 -0
- package/presets/tasmota/shutter.json +46 -0
- package/presets/tasmota/temperature-humidity.json +42 -0
- package/presets/tasmota/temperature.json +32 -0
- package/presets/valetudo/vacuum.json +103 -0
- package/presets/wled/dimmer.json +46 -0
- package/presets/wled/light.json +59 -0
- package/ui/dist/assets/index-BDtT6bdH.js +10 -0
- package/ui/dist/assets/index-CHiG-aoU.css +1 -0
- 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
|
+
}
|