sfudeus / homematic_exporter

Prometheus exporter for homematic ccu3
Apache License 2.0
23 stars 17 forks source link

Prometheus.yaml config #9

Closed MarpleA closed 3 years ago

MarpleA commented 3 years ago

hi,

I installed the homematic_exporter and run it with python3 exporter.py --ccu_host 192.168.10.170 --ccu_port 2010 --interval 15 --port 9411 --debug

It successfully fetches all the data from the ccu but homematic metrics don't show up in prometheus. here's my prometheus.yaml:

scrape homematic

what am I doing from?

Best

sfudeus commented 3 years ago

Hmm, looks ok so far. Is your prometheus running on the same host (and not in a container)? Did you try accessing the metrics endpoint from a browser?

MarpleA commented 3 years ago

Thanks for pointing me to the right direction. I realized that none the metric pages of my exporters where actually still accessible (even though they kept on collecting data) Seems like my prometheus installation was partly broken somehow. After fixing this, the homematic_exporter worked like charm.

there's only one little thing which doesn't work yet - the config file.

if I run: python3 /home/user01/homematic_exporter/exporter.py --ccu_host 192.168.10.170 --ccu_port 2010 --interval 15 --port 9411 both devices, weatherstation and power plug are detected.

if I run: python3 /home/user01/homematic_exporter/exporter.py --ccu_host 192.168.10.170 --ccu_port 2010 --interval 15 --port 9411 --config_file /home/user01/homematic_exporter/homematic_exporter.json

with config file like this:

{ "supported_device_types": [ "HmIP-SWO-PL", "HmIP-PSM"

], "device_mapping": { "00xxx": "Wetterstation", "00xxx": "Waschmaschine" } }

only "Wetterstation" is being detected - not the power plug "Waschmaschine"

EDIT: same happens if I use the sample_config.json

sfudeus commented 3 years ago

You can leave out supported_device_types if you do not want to add additional ones. PSM is supported by default. The problem most likely is that HMIP-PSM has different case than the others (most have HmIP). I suggest removing the definition from the config. Even if the mapped names do not match, they just don't get a name mapping, so the mapped_name label is not set.

MarpleA commented 3 years ago

that did the trick. thx