RogerSelwyn / Home_Assistant_SkyQ_MediaPlayer

Home Assistant SkyQ Media player component
MIT License
103 stars 17 forks source link

[BUG] Config flow error not displaying / mDNS not working #98

Closed SparkyDan555 closed 2 years ago

SparkyDan555 commented 2 years ago

Describe the bug
Attempting to add Sky Q box via mDNS hostname gives an error but does not show the error. Adding boxes this way used to work correctly.

To Reproduce
Steps to reproduce the behavior:

  1. Install add on through HACS
  2. Add sky q box via mDNS hostname i.e. skyq.local

Expected behaviour
Config flow shows succeeds and the box is added using hostname.

Screenshots

Screenshot 2022-04-14 at 7 18 28 pm

Component versions

  1. What version of SkyQ component are you using? 2.8.9
  2. What was the last version where the problem was not shown? Unknown

Your configuration
How have you setup your devices, by UI or YAML? UI

Your configuration from the options dialogue

Screenshot 2022-04-14 at 7 22 19 pm

Output of HA logs
Nothing relevant

RogerSelwyn commented 2 years ago

Have you validated that the name resolved via a terminal session on your HA server? Any errors shown in the logs?

RogerSelwyn commented 2 years ago

By the way there does seem to be a spurious blank 'error' line when it can't resolve the name, but I don't believe that should be there, it does say it failed to connect, so I don't believe the name is resolving.

RogerSelwyn commented 2 years ago

If no further information provided, this will be closed in the next few days.

SparkyDan555 commented 2 years ago

Can you advise how I could check the name is resolvable from Home Assistant?

RogerSelwyn commented 2 years ago

Assuming you have SSH & terminal add-on installed:

You should get a response like the below

Screenshot 2022-04-25 at 10 30 39
SparkyDan555 commented 2 years ago

Hmm, I just get server can't find skyq.local: NXDOMAIN even when I try from my PC. I have checked my router and it just shows the sky boxes IP address, no hostname. It seems the sky q box is not sending its hostname alongside the DHCP request?

RogerSelwyn commented 2 years ago

You may be able to set the name on the router, depends what you have. Personally I have an Asus router which I added the name to test this out. If it can’t resolve then the best way to do it is to use the IP address.

SparkyDan555 commented 2 years ago

I have an OpenWRT system so I have made an entry under static leases with suitable hostnames for each box. Putting this into the config flow works with no problem. The blank error line only seems to appear with mDNS hostnames. Closing since this is likely not a problem with this integration and depends on whether mDNS is working on a specific box.

RogerSelwyn commented 2 years ago

I have added a fix for the blank error in the next release.