Closed r0ckarong closed 11 months ago
Here is a bit of the full mqtt data that gets sent
{
"src": "shellyplusht-a0a3b3de6b4c",
"dst": "shellies/shellyplusht-a0a3b3de6b4c/events",
"method": "NotifyFullStatus",
"params": {
"ts": 1.86,
"ble": {},
"cloud": {
"connected": false
},
"devicepower:0": {
"id": 0,
"battery": {
"V": 6.39,
"percent": 100
},
"external": {
"present": false
}
},
"ht_ui": {},
"humidity:0": {
"id": 0,
"rh": 43.8
},
"mqtt": {
"connected": true
},
"sys": {
"mac": "A0A3B3DE6B4C",
"restart_required": false,
"time": null,
"unixtime": null,
"uptime": 1,
"ram_size": 246612,
"ram_free": 165028,
"fs_size": 458752,
"fs_free": 176128,
"cfg_rev": 23,
"kvs_rev": 1,
"webhook_rev": 0,
"available_updates": {},
"wakeup_reason": {
"boot": "deepsleep_wake",
"cause": "status_update"
},
"wakeup_period": 7200
},
"temperature:0": {
"id": 0,
"tC": 20.2,
"tF": 68.3
},
"wifi": {
"sta_ip": "192.168.178.110",
"status": "got ip",
"ssid": "EnairaSukram",
"rssi": -55
},
"ws": {
"connected": false
}
}
}
Hi @r0ckarong
Thanks for raising the issue and for the details you provided.
Could you please also send the log with debug level?
I'll troubleshoot it this weekend.
Can you give me an idea on how to get the "correct" log? I'm using all of this on the Synology Container manager and this just gives me one line.
Where in the container is the log stored? I've set LOG_LEVEL: DEBUG
in the compose file.
Ok nevermind, figured out the problem.
The exporter was subscribed correctly to shellies/+/status/#
and the log showed the right values but I had some confusion about the ports. I configured port mapping for docker but then didn't realize I had to configure the custom port for the exporter too. So my prometheus config was trying to scrape from port 9093 but the exporter was still using default 9000.
Happy you found the root cause. Cheers
I just bought two of these devices and updated them to Firmware 1.0.8 as suggested by the Web UI. I configured MQTT fine and the messages are showing up in my mosquitto broker instance.
What I can't seem to make work is the other end to write this stuff to my prometheus instance.
For my devices, the shelly topic structure looks like this:
For me it is not
<prefix>/<name>/sensor/temperature
it's<prefix>/<name>/status/temperature:0
.I've got another mqtt exporter tool working for my tasmota device and it's working fine there. I just don't understand what I'm doing wrong with your tool that it just seems to do nothing.
Here are the relevant snippets of my configs:
docker-compose.yaml
prometheus.yaml