theneweinstein / somneo

Home Assistant custom component for Philips Someo
32 stars 18 forks source link

Unable to add Somneo Device #24

Closed Highsight closed 1 year ago

Highsight commented 1 year ago

Whenever I try and add the device, I get the following error: image

I've searched for any log info to help diagnose this further, but can't find anything. I've confirmed that pysomneo is able to interface with the device just fine in Python, so it appears to be integration itself, or the configuration flow that is causing the issue. The model is: HF3670/60

theneweinstein commented 1 year ago

What did you fill in as a host? It should be an op address (no http or so added to it).

Highsight commented 1 year ago

I used the device's IP, with nothing else included.

theneweinstein commented 1 year ago

After some googling, it looks like an issue with the XML parser to get the device info of the Somneo. Could you send me the content of https://IP-ADDRESS/upnp/description.xml? Then I can try if I can fix it (or find a work-around).

Highsight commented 1 year ago

Ahh, that would make sense. Here you go!

description.zip

Frank071 commented 1 year ago

I stumbled upon this same problem, but could not retrieve the file you requested. As it turns out... it can be retrieved via http, but with https I get a 404 error?

Highsight commented 1 year ago

I stumbled upon this same problem, but could not retrieve the file you requested. As it turns out... it can be retrieved via http, but with https I get a 404 error?

Oh, look at that, you're right! I'm unable to access the file if it's https. When I grabbed it, I was just http. If I try https, it returns "{}" instead of the xml. Excellent catch!

Frank071 commented 1 year ago

I was just planning to create a pull request for pysomneo when I saw that @theneweinstein had already updated the code ;-) Fast work ;-)

Highsight commented 1 year ago

Looks like that change got it! I added it manually, and it seems to connect perfectly now. Thanks @theneweinstein!

theneweinstein commented 1 year ago

Great to hear, I wanted to ask you to test it before I make a new release of it, but it sounds like it works. I'll make a new release with the updated code. Thanks for the help of finding the cause of the issue.