uvjim / hass_hdhomerun

Home Assistant integration for HDHomeRun
30 stars 4 forks source link

Add signal strength for each tuner? #100

Closed DuelCoreF18 closed 4 months ago

DuelCoreF18 commented 5 months ago

Would it be possible to add signal strength details for each tuner if the tuner was not idle? Trying to track down why a specific OTA stations is cutting out at night. Tuned in vs idle will definitely help, but it would be really interesting to see a logged history of the signal strength leading up to when it fails.

My best guess right now is a close neighbor might have an LED that's messing up VHF signal, but the more data I have the easier it would be to track down the root cause.

Thanks.

uvjim commented 5 months ago

Thanks for bringing this up. Could you confirm that the signal strength attribute on the tuner is what you're after? If so, you could handle this in a template sensor in the interim - not the best solution, I get that. However, I have some work to do re: entity naming etc which I think should be done to make this easier.

DuelCoreF18 commented 5 months ago

Signal quality would be the field i think would be most helpful. It's often that signal strength and symbol quality can be at 100%, while signal quality is the indicative factor of a good signal. Something like 70% or greater is a great signal. That being said, I wouldn't say no to as much data from the tuner as possible.

https://imgur.com/a/dXm84jy

I'm amazed there isn't an official (non HACS) integration for HDhomerun and I'd encourage you to pursue that.

uvjim commented 5 months ago

OK. The same holds true. Signal quality is an attribute in the tuner that you could template out to a sensor.

I have a decision to make really... Treat each tuner as a device and attach entities to it. Or, keep them all under the single device as they are now and name each entity per the tuner.

With either of those I still need to do the entity naming work previously mentioned.

uvjim commented 5 months ago

RE: becoming official... The code possibly isn't in a state that it would be allowed in. The pyhdhr library isn't published separately (although I could do that). I don't really have the time to get it into shape.

Also, if I go that route then any fixes etc will have to follow the HASS release schedule. Horses for courses really.

DuelCoreF18 commented 5 months ago

Would one of those options be more favorable with different hdhomerun devices having different numbers of Tuners? 2, 3, 4, & 16 are all the current tuner count options I believe.

Would one of those options be better in the event of multiple devices? I run 2x Flex 4k with 4 Tuners each for example. One for each antenna on the roof.

Just trying to help you brainstorm edge cases if it helps make one solution better than the other. Software Engineer, but haven't gotten under the hood of HA.

Official: I get that... It's a time sink. Love what you have started. Keep up the great work.

uvjim commented 5 months ago

It's more a case of what logically fits and marrying that with what looks best/easiest in the UI. Couple that then with the HASS terminology and definitions.

I will get time to make those changes, at some point. In all honesty I don't actually use this integration for much other than alerting me when there's an update for the device.

I have two devices available for testing against. One is used daily and the other isn't even attached to an aerial.

The number of tuners will only dictate the number of entities. I can probably mitigate some of that by keeping everything as is and disabling, by default, the entities that are currently attributes only. That would be the easier option, but I need to weigh up if the HDHR devices fit a better model as per the first paragraph.

dioneimiodutzki commented 4 months ago

Hello! I've created a pull request adding signal strength and quality by tuner. I found out i needed/wanted the same info so took the time to code it. I think it will be better in the future to group each tuner as a separated device, I'm gonna try to redo it this way later.

uvjim commented 4 months ago

Keep your eyes open for an upcoming beta. I have a bit more testing to do, but I have a branch working locally that has split tuners to devices with separate entities for each of the current extra attributes.

uvjim commented 4 months ago

Hopefully this is addressed in #103. I have released as a beta in 2024.5.1b0. Could you test and let me know if I've broken anything please?

AnthonyBe commented 4 months ago

Updated to 2024.5.1b0 - looks good so far! My hardware is HDHomeRun CONNECT QUATRO (Model: HDHR5-4DT)

msedge_2024-05-26_12-25-37

Fratopolis commented 4 months ago

I'm stupid excited for this addition

dioneimiodutzki commented 4 months ago

working well for me too, thanks a lot!

uvjim commented 4 months ago

Released now in 2024.5.1