Code Monkey home page Code Monkey logo

Comments (5)

kpetremann avatar kpetremann commented on June 12, 2024

Hello @Merlin83b,

Can you send the original messages from MQTT?

According the logs, the metrics are "duplicated" as they have the same device id or name.
Let's take the power metric for instance.

In the logs there is:

DEBUG:mqtt-exporter:new value for mqtt_power: 1647.29
DEBUG:mqtt-exporter:new value for mqtt_power: 0.0

but at the end you only get:

mqtt_power{topic="shellies_shellyem"} 0.0

Looks like you devices have the same name/identifier (shellye). So you only get the last power metric as it overrides it.

Please check your MQTT configuration on your Shelly devices.

from mqtt-exporter.

Merlin83b avatar Merlin83b commented on June 12, 2024

In a separate window I have mosquitto_sub -h localhost -u user -P password -v -t "shellies/shellyem/emeter/0/power" running and get the following for the MQTT messages:

shellies/shellyem-BCFF4DFCFBFD/emeter/0/power 1447.54
shellies/shellyem-BCFF4DFCFBFD/emeter/0/power 1432.74
shellies/shellyem-BCFF4DFCFBFD/emeter/0/power 1424.27
shellies/shellyem-BCFF4DFCFBFD/emeter/0/power 1399.98
shellies/shellyem-BCFF4DFCFBFD/emeter/0/power 1393.41
shellies/shellyem-BCFF4DFCFBFD/emeter/0/power 1412.84
shellies/shellyem-BCFF4DFCFBFD/emeter/0/power 1409.69
shellies/shellyem-BCFF4DFCFBFD/emeter/0/power 1424.67
shellies/shellyem-BCFF4DFCFBFD/emeter/0/power 1419.98
shellies/shellyem-BCFF4DFCFBFD/emeter/0/power 1427.57

Would you like this running with moquitto_sub in debug mode??

from mqtt-exporter.

Merlin83b avatar Merlin83b commented on June 12, 2024

Aha, I think I've just realised that it's likely because the Shelly EM has two power monitors, form the above there is also emeter/1/power and it's likely that that's overwriting the value.

from mqtt-exporter.

Merlin83b avatar Merlin83b commented on June 12, 2024

Yep, that does it. Adjusting the topic to MQTT_TOPIC=shellies/+/emeter/0/# has sorted it for my use case.

from mqtt-exporter.

kpetremann avatar kpetremann commented on June 12, 2024

perfect :)

from mqtt-exporter.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.