mqtt2matter 0.1.0 → 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 +37 -0
- package/README.md +8 -0
- package/dist/config/schema.d.ts +6 -6
- package/dist/engine/payload.d.ts +6 -0
- package/dist/engine/payload.js +8 -3
- package/dist/engine/payload.js.map +1 -1
- package/dist/engine/runtime.js +6 -1
- package/dist/engine/runtime.js.map +1 -1
- package/dist/engine/template.js +22 -5
- package/dist/engine/template.js.map +1 -1
- package/dist/families/fan.js +3 -1
- package/dist/families/fan.js.map +1 -1
- package/dist/families/index.d.ts +1 -0
- package/dist/families/index.js +4 -0
- package/dist/families/index.js.map +1 -1
- package/dist/families/power-source.js +5 -0
- package/dist/families/power-source.js.map +1 -1
- 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/importers/ha/generate.js +3 -0
- package/dist/importers/ha/generate.js.map +1 -1
- package/dist/importers/z2m/generate.js +7 -0
- package/dist/importers/z2m/generate.js.map +1 -1
- package/dist/model/catalog.js +6 -3
- package/dist/model/catalog.js.map +1 -1
- package/dist/model/schema.d.ts +32 -32
- package/dist/model/schema.js +7 -4
- package/dist/model/schema.js.map +1 -1
- package/dist/model/validate.js +6 -0
- package/dist/model/validate.js.map +1 -1
- package/docs/config.md +149 -20
- package/docs/importers.md +2 -2
- package/package.json +1 -1
- 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 +14 -3
- 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
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "mqtt-smarthome/light",
|
|
3
|
+
"name": "mqtt-smarthome light",
|
|
4
|
+
"description": "An on/off item (true/false) as a light: status/<item> as a plain value or {val, ts, lc}, set/<item> with true/false, <name>/connected 2 = reachable.",
|
|
5
|
+
"vendor": "mqtt-smarthome",
|
|
6
|
+
"format": 1,
|
|
7
|
+
"variables": {
|
|
8
|
+
"instance": {
|
|
9
|
+
"label": "Instance name",
|
|
10
|
+
"description": "The adapter instance's <name>: the first level of its topics (lgtv, hm, cul, …)"
|
|
11
|
+
},
|
|
12
|
+
"item": {"label": "Item", "description": "The item below status/ and set/, e.g. light/1/state"},
|
|
13
|
+
"name": {"label": "Name", "default": "Light"}
|
|
14
|
+
},
|
|
15
|
+
"device": {
|
|
16
|
+
"name": "%name%",
|
|
17
|
+
"availability": {
|
|
18
|
+
"topic": "%instance%/connected",
|
|
19
|
+
"template": "{{ 'online' if value | trim == '2' else 'offline' }}"
|
|
20
|
+
},
|
|
21
|
+
"endpoints": [
|
|
22
|
+
{
|
|
23
|
+
"deviceTypes": ["OnOffLight"],
|
|
24
|
+
"mappings": [
|
|
25
|
+
{
|
|
26
|
+
"attribute": "OnOff.onOff",
|
|
27
|
+
"status": {
|
|
28
|
+
"topic": "%instance%/status/%item%",
|
|
29
|
+
"template": "{{ (value_json.val if value_json is mapping else value) | string | lower }}",
|
|
30
|
+
"map": {
|
|
31
|
+
"true": true,
|
|
32
|
+
"false": false,
|
|
33
|
+
"1": true,
|
|
34
|
+
"0": false,
|
|
35
|
+
"on": true,
|
|
36
|
+
"off": false,
|
|
37
|
+
"yes": true,
|
|
38
|
+
"no": false
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"command": {"topic": "%instance%/set/%item%", "format": {"true": "true", "false": "false"}}
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "mqtt-smarthome/occupancy",
|
|
3
|
+
"name": "mqtt-smarthome occupancy",
|
|
4
|
+
"description": "A presence or motion item (true/false) as an occupancy sensor.",
|
|
5
|
+
"vendor": "mqtt-smarthome",
|
|
6
|
+
"format": 1,
|
|
7
|
+
"variables": {
|
|
8
|
+
"instance": {
|
|
9
|
+
"label": "Instance name",
|
|
10
|
+
"description": "The adapter instance's <name>: the first level of its topics (lgtv, hm, cul, …)"
|
|
11
|
+
},
|
|
12
|
+
"item": {"label": "Item", "description": "The item below status/, e.g. motion/1/state"},
|
|
13
|
+
"name": {"label": "Name", "default": "Occupancy"}
|
|
14
|
+
},
|
|
15
|
+
"device": {
|
|
16
|
+
"name": "%name%",
|
|
17
|
+
"availability": {
|
|
18
|
+
"topic": "%instance%/connected",
|
|
19
|
+
"template": "{{ 'online' if value | trim == '2' else 'offline' }}"
|
|
20
|
+
},
|
|
21
|
+
"endpoints": [
|
|
22
|
+
{
|
|
23
|
+
"deviceTypes": ["OccupancySensor"],
|
|
24
|
+
"mappings": [
|
|
25
|
+
{
|
|
26
|
+
"attribute": "OccupancySensing.occupancy",
|
|
27
|
+
"status": {
|
|
28
|
+
"topic": "%instance%/status/%item%",
|
|
29
|
+
"template": "{{ (value_json.val if value_json is mapping else value) | string | lower }}",
|
|
30
|
+
"map": {
|
|
31
|
+
"true": true,
|
|
32
|
+
"false": false,
|
|
33
|
+
"1": true,
|
|
34
|
+
"0": false,
|
|
35
|
+
"on": true,
|
|
36
|
+
"off": false,
|
|
37
|
+
"yes": true,
|
|
38
|
+
"no": false
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "mqtt-smarthome/switch",
|
|
3
|
+
"name": "mqtt-smarthome switch",
|
|
4
|
+
"description": "An on/off item (true/false) as a plug-in unit: status/<item> as a plain value or {val, ts, lc}, set/<item> with true/false, <name>/connected 2 = reachable.",
|
|
5
|
+
"vendor": "mqtt-smarthome",
|
|
6
|
+
"format": 1,
|
|
7
|
+
"variables": {
|
|
8
|
+
"instance": {
|
|
9
|
+
"label": "Instance name",
|
|
10
|
+
"description": "The adapter instance's <name>: the first level of its topics (lgtv, hm, cul, …)"
|
|
11
|
+
},
|
|
12
|
+
"item": {"label": "Item", "description": "The item below status/ and set/, e.g. switch/1/state"},
|
|
13
|
+
"name": {"label": "Name", "default": "Switch"}
|
|
14
|
+
},
|
|
15
|
+
"device": {
|
|
16
|
+
"name": "%name%",
|
|
17
|
+
"availability": {
|
|
18
|
+
"topic": "%instance%/connected",
|
|
19
|
+
"template": "{{ 'online' if value | trim == '2' else 'offline' }}"
|
|
20
|
+
},
|
|
21
|
+
"endpoints": [
|
|
22
|
+
{
|
|
23
|
+
"deviceTypes": ["OnOffPlugInUnit"],
|
|
24
|
+
"mappings": [
|
|
25
|
+
{
|
|
26
|
+
"attribute": "OnOff.onOff",
|
|
27
|
+
"status": {
|
|
28
|
+
"topic": "%instance%/status/%item%",
|
|
29
|
+
"template": "{{ (value_json.val if value_json is mapping else value) | string | lower }}",
|
|
30
|
+
"map": {
|
|
31
|
+
"true": true,
|
|
32
|
+
"false": false,
|
|
33
|
+
"1": true,
|
|
34
|
+
"0": false,
|
|
35
|
+
"on": true,
|
|
36
|
+
"off": false,
|
|
37
|
+
"yes": true,
|
|
38
|
+
"no": false
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"command": {"topic": "%instance%/set/%item%", "format": {"true": "true", "false": "false"}}
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "mqtt-smarthome/temperature",
|
|
3
|
+
"name": "mqtt-smarthome temperature",
|
|
4
|
+
"description": "A temperature item in °C as a temperature sensor.",
|
|
5
|
+
"vendor": "mqtt-smarthome",
|
|
6
|
+
"format": 1,
|
|
7
|
+
"variables": {
|
|
8
|
+
"instance": {
|
|
9
|
+
"label": "Instance name",
|
|
10
|
+
"description": "The adapter instance's <name>: the first level of its topics (lgtv, hm, cul, …)"
|
|
11
|
+
},
|
|
12
|
+
"item": {"label": "Item", "description": "The item below status/, e.g. room/temperature"},
|
|
13
|
+
"name": {"label": "Name", "default": "Temperature"}
|
|
14
|
+
},
|
|
15
|
+
"device": {
|
|
16
|
+
"name": "%name%",
|
|
17
|
+
"availability": {
|
|
18
|
+
"topic": "%instance%/connected",
|
|
19
|
+
"template": "{{ 'online' if value | trim == '2' else 'offline' }}"
|
|
20
|
+
},
|
|
21
|
+
"endpoints": [
|
|
22
|
+
{
|
|
23
|
+
"deviceTypes": ["TemperatureSensor"],
|
|
24
|
+
"mappings": [
|
|
25
|
+
{
|
|
26
|
+
"attribute": "TemperatureMeasurement.measuredValue",
|
|
27
|
+
"status": {
|
|
28
|
+
"topic": "%instance%/status/%item%",
|
|
29
|
+
"template": "{{ (value_json.val if value_json is mapping else value) }}",
|
|
30
|
+
"type": "number",
|
|
31
|
+
"unit": "celsius"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "openbeken/color-light",
|
|
3
|
+
"name": "OpenBeken colour light",
|
|
4
|
+
"description": "An OpenBeken RGB, RGBW or RGBCW light: on/off and dimmer, the colour from led_basecolor_rgb (hex), sent with led_basecolor_rgb; the colour temperature with led_temperature, kept locally.",
|
|
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": "Light"}
|
|
13
|
+
},
|
|
14
|
+
"device": {
|
|
15
|
+
"name": "%name%",
|
|
16
|
+
"vendor": "OpenBeken",
|
|
17
|
+
"availability": {"topic": "%client%/connected", "online": "online", "offline": "offline"},
|
|
18
|
+
"endpoints": [
|
|
19
|
+
{
|
|
20
|
+
"deviceTypes": ["ExtendedColorLight"],
|
|
21
|
+
"features": {"ColorControl": ["HueSaturation"]},
|
|
22
|
+
"options": {"light": {"onCommandType": "first"}},
|
|
23
|
+
"mappings": [
|
|
24
|
+
{
|
|
25
|
+
"attribute": "OnOff.onOff",
|
|
26
|
+
"status": {
|
|
27
|
+
"topic": "%client%/led_enableAll/get",
|
|
28
|
+
"map": {"1": true, "0": false},
|
|
29
|
+
"get": {"topic": "%client%/led_enableAll/get", "payload": ""}
|
|
30
|
+
},
|
|
31
|
+
"command": {"topic": "cmnd/%client%/led_enableAll", "format": {"true": "1", "false": "0"}}
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"attribute": "LevelControl.currentLevel",
|
|
35
|
+
"status": {
|
|
36
|
+
"topic": "%client%/led_dimmer/get",
|
|
37
|
+
"template": "{{ value if value | float > 0 else '' }}",
|
|
38
|
+
"type": "number",
|
|
39
|
+
"unit": "percentLevel",
|
|
40
|
+
"get": {"topic": "%client%/led_dimmer/get", "payload": ""}
|
|
41
|
+
},
|
|
42
|
+
"command": {"topic": "cmnd/%client%/led_dimmer", "unit": "percentLevel", "round": 0}
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"attribute": "ColorControl.colorRgb",
|
|
46
|
+
"status": {
|
|
47
|
+
"topic": "%client%/led_basecolor_rgb/get",
|
|
48
|
+
"template": "{% set v = value | trim %}{{ v[-6:-4] | int(0, 16) }},{{ v[-4:-2] | int(0, 16) }},{{ v[-2:] | int(0, 16) }}",
|
|
49
|
+
"get": {"topic": "%client%/led_basecolor_rgb/get", "payload": ""}
|
|
50
|
+
},
|
|
51
|
+
"command": {
|
|
52
|
+
"topic": "cmnd/%client%/led_basecolor_rgb",
|
|
53
|
+
"template": "{% set h = '0123456789ABCDEF' %}{% for c in [red, green, blue] %}{% set n = c | round(0) | int %}{{ h[n // 16] }}{{ h[n % 16] }}{% endfor %}"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"attribute": "ColorControl.colorTemperatureMireds",
|
|
58
|
+
"command": {"topic": "cmnd/%client%/led_temperature", "round": 0, "optimistic": true}
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "openbeken/ct-light",
|
|
3
|
+
"name": "OpenBeken CT light",
|
|
4
|
+
"description": "An OpenBeken CW/WW light: on/off and dimmer as the dimmer preset, the colour temperature (154–500 mireds) sent with led_temperature and kept locally (the topic list documents no report of it).",
|
|
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": "Light"}
|
|
13
|
+
},
|
|
14
|
+
"device": {
|
|
15
|
+
"name": "%name%",
|
|
16
|
+
"vendor": "OpenBeken",
|
|
17
|
+
"availability": {"topic": "%client%/connected", "online": "online", "offline": "offline"},
|
|
18
|
+
"endpoints": [
|
|
19
|
+
{
|
|
20
|
+
"deviceTypes": ["ColorTemperatureLight"],
|
|
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
|
+
"attribute": "ColorControl.colorTemperatureMireds",
|
|
45
|
+
"command": {"topic": "cmnd/%client%/led_temperature", "round": 0, "optimistic": true}
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -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
|
+
}
|