Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Sonos manual config not recognized in 0.72 #15146

Closed
jjlawren opened this issue Jun 25, 2018 · 19 comments · Fixed by #15630
Closed

New Sonos manual config not recognized in 0.72 #15146

jjlawren opened this issue Jun 25, 2018 · 19 comments · Fixed by #15630
Assignees

Comments

@jjlawren
Copy link
Contributor

jjlawren commented Jun 25, 2018

Home Assistant release with the issue:

0.72

Last working Home Assistant release (if known):
0.71

Operating environment (Hass.io/Docker/Windows/etc.):

Ubuntu 18.04 venv

Component/platform:

Sonos (https://www.home-assistant.io/components/sonos/)

Description of problem:
New top-level sonos component config seems to have no effect. Reverting to the old config under media_player works fine.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
Not working:

sonos:
  media_player:
    hosts:
      - 1.2.3.4
      - 1.2.3.5

Still works:

media_player:
  - platform: sonos
    entity_namespace: sonos
    hosts:
      - 1.2.3.4
      - 1.2.3.5

Traceback (if applicable):


Additional information:

@arsaboo
Copy link
Contributor

arsaboo commented Jun 25, 2018

You are missing a :. It should be

sonos:
  media_player:
    hosts:
      - 192.168.2.150
      - 192.168.2.69

@jjlawren
Copy link
Contributor Author

jjlawren commented Jun 25, 2018

Sorry, that was a typo above. It was included in the config while testing. I've edited the original comment.

@arsaboo
Copy link
Contributor

arsaboo commented Jun 25, 2018

Working for me here. Did you finish the integration in the Configuration panel?

@jjlawren
Copy link
Contributor Author

Whenever I tried to add the integration it would complain "No Sonos devices found on the network".

@dancwilliams
Copy link

@jjlawren I am experiencing the same thing. New config doesn't work and I get the "No Sonos devices found on the network" message. Put the legacy config back in and it works great. Interesting...

Legacy config:

media_player:
  - platform: sonos
    hosts:
      - 172.20.20.210 # Kitchen
      #- 172.20.20.211 # Office
      - 172.20.20.212 # Patio
      - 172.20.20.213 # Guest House
      - 172.20.20.216 # Living Room
      - 172.20.20.217 # Main Bathroom

New Config:

sonos:
  media_player:
    hosts:
      - 172.20.20.210 # Kitchen
      #- 172.20.20.211 # Office
      - 172.20.20.212 # Patio
      - 172.20.20.213 # Guest House
      - 172.20.20.216 # Living Room
      - 172.20.20.217 # Main Bathroom

@RealGandy
Copy link

RealGandy commented Jul 3, 2018

Does the device running home assistant have multiple network interfaces? Mine does and I needed to tell HA which interface to use with:

sonos:
  media_player:
    interface_addr: 192.168.2.80

@jjlawren
Copy link
Contributor Author

jjlawren commented Jul 4, 2018

Yes, as there are multiple subnets on the network. I’ve tried using interface_addr, both without and with an interface on the same subnet as the Sonos devices.

@PostSven
Copy link

PostSven commented Jul 5, 2018

i am having a similar issue, but i am using the docker image without the net==host as i am using traefik for reverse proxy.

@dancwilliams
Copy link

I am using Hass.io and only have a single interface.

@jckoester
Copy link

Same problem for me using home assistant 0,73 under hassio in a virtual machine. New config does not work at all, old config works.

@dancwilliams
Copy link

@arsaboo

Could you provide the config you used in your configuration.yaml for your Sonos setup? I am still tryin to run this down and if it works for you I really want to figure out what I am doing wrong.

I have my Sonos devices on a different subnet, so auto discovery is not available.

Below is my config. I even added the interface parameter even though I only have a single interface. But, when I go to the Configuration > Integrations page and click "CONFIGURE" beside Sonos, I get "Aborted No Sonos devices found on the network." As soon as I go back to my "legacy" configuration, everything works great. I am on 0.73.1 now.

sonos:
  media_player:
    interface_addr: 172.24.24.100
    hosts:
      - 172.20.20.210
      - 172.20.20.211
      - 172.20.20.212
      - 172.20.20.213
      - 172.20.20.216
      - 172.20.20.217

Thanks!

@arsaboo
Copy link
Contributor

arsaboo commented Jul 15, 2018

sonos:
  media_player:
    hosts:
      - 192.168.2.150
      - 192.168.2.69

@RosaEinhorn
Copy link

I am having the same issue. The legacy configuration is working fine while I cannot detect Sonos using discovery or the new configuration. (Already opened port 1400 TCP)

@PostSven
Copy link

PostSven commented Jul 21, 2018

I got it to work.

I had to expose port tcp 1400 on my docker container and use the following config:

sonos:
  media_player:
    interface_addr: xxx.xxx.xxx.xxx
    hosts:
      - xxx.xxx.xxx.xxx
      - xxx.xxx.xxx.xxx

@amelchio amelchio self-assigned this Jul 22, 2018
@tynor88
Copy link

tynor88 commented Jul 22, 2018

Same issue. Legacy config works fine.

@amelchio
Copy link
Contributor

I will fix this, I just have to figure out how it is supposed to work in these modern times :)

Stick to the legacy config for now.

@balloob
Copy link
Member

balloob commented Jul 23, 2018

I was discussing this with @amelchio in the dev chat.

The solution will be to add an import step that just creates the entry. That is than invoked when the user has configured the Sonos component and if there are no entries:

Adding something like this to async_setup of the Sonos component:

if DOMAIN in config and not sonos_entries():
    hass.async_create_task(hass.config_entries.flow.async_init(
        DOMAIN, source=data_entry_flow.SOURCE_IMPORT)

@amelchio
Copy link
Contributor

It will be some days before I can work on this but I expect to be able to fix it for 0.75 (if nobody beats me to it).

@jjlawren
Copy link
Contributor Author

Confirming the new config now works for me.

@home-assistant home-assistant locked and limited conversation to collaborators Oct 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants