FalconChristmas / fpp

Falcon Player
http://FalconChristmas.com
Other
568 stars 199 forks source link

Add current stats to MQTT reporting #1661

Closed Jchuchla closed 7 months ago

Jchuchla commented 11 months ago

Is your feature request related to a problem? Please describe. I would like to be able to monitor the current of the controllers, per port, per bank and total per controller from my home automation system.

Describe the solution you'd like Provide current stats in an MQTT topic.

Additional context See Issue #1660 for related request.

ghormann commented 11 months ago

I don't have one that reports current, but I think these are just configured as sensors.

If you enable the stats publishing, doesn't it show up as a sensor? image

Here is what I see on my version w/o current sensors

image

Jchuchla commented 11 months ago

Nope, they don’t show up under sensors. And really it should show up as it’s own subtopic, not a whole bunch of json stuffed into a single status topic that we have to parse to make use of.

libby2cm commented 11 months ago

If using the home assistant plugin, it appears the ability to easily map these sensors into their own entities is a 2 second task, if the plugin config section worked. But it's blank, so nothing gets sent/populated (as confirmed in debug logs for plugin). If it worked, these sensors should be easily mappable to consume in HA (or anything for that matter). I'll log a separate bug for this after I do some more checking to confirm it's not me missing something. Should fix both our issues.

image

Jchuchla commented 11 months ago

I don't use Home Assistant. I use Homeseer. It predates Home Assistant by a few decades. While not really related to this issue here, I don't really understand why HA encourages stuffing a bunch of information as json into a single topic. It makes it a pain to parse for the data you actually need. It also forces you to update all your parameters any time any part of that json changes. Topics and subtopics are free. Start a new one for each parameter. Then you could just subscribe to the ones you care about.

libby2cm commented 11 months ago

Disregard my comment, I was assuming system attributes were intended to be included in 'sensors' but after looking at the code, they aren't... it's just select hardware. I may submit a feature request for that and other non-hardware sensors though.