Skip to content

Commit e1033dd

Browse files
authored
Merge pull request #145 from pdostal/shelly_ht
Add example for Shelly H&T sensor
2 parents e748c6f + aef661e commit e1033dd

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

examples/shelly_ht.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Sample MQTT messages from Shelly H&T processed by this configuration file:
2+
# $ mosquitto_sub -h 127.0.0.1 -t 'shellies/+/sensor/+' -v -u bob -P happylittleclouds
3+
#
4+
# shellies/shellyht-CC2D76/sensor/temperature 24.75
5+
# shellies/shellyht-CC2D76/sensor/humidity 43.5
6+
# shellies/shellyht-CC2D76/sensor/battery 100
7+
# shellies/shellyht-CC2D76/sensor/ext_power false
8+
# shellies/shellyht-CC2D76/sensor/error 0
9+
# shellies/shellyht-CC2D76/sensor/act_reasons ["sensor"]
10+
11+
mqtt:
12+
server: tcp://127.0.0.1:1883
13+
user: bob
14+
password: happylittleclouds
15+
topic_path: shellies/+/sensor/+
16+
device_id_regex: "shellies/(?P<deviceid>.*)/sensor/.*"
17+
metric_per_topic_config:
18+
metric_name_regex: "shellies/(?P<deviceid>.*)/sensor/(?P<metricname>.*)"
19+
qos: 0
20+
cache:
21+
timeout: 24h
22+
metrics:
23+
- prom_name: temperature
24+
mqtt_name: temperature
25+
type: gauge
26+
const_labels:
27+
sensor_type: shelly
28+
- prom_name: humidity
29+
mqtt_name: humidity
30+
type: gauge
31+
const_labels:
32+
sensor_type: shelly
33+
- prom_name: battery
34+
mqtt_name: battery
35+
type: gauge
36+
const_labels:
37+
sensor_type: shelly
38+

0 commit comments

Comments
 (0)