Closed guice closed 4 years ago
Here's HA's recent attempt to update Office Mini, fresh stack.
2020-04-30 10:45:29 DEBUG (zeroconf-ServiceBrowser__googlecast._tcp.local.) [pychromecast.discovery] add_service _googlecast._tcp.local., Google-Home-Mini-ab381eb2c0676099e563c11dac745976-1._googlecast._tcp.local.
2020-04-30 10:45:29 DEBUG (zeroconf-ServiceBrowser__googlecast._tcp.local.) [homeassistant.components.cast.discovery] Discovered chromecast ChromecastInfo(host='192.168.2.152', port=8009, service='Google-Home-Mini-ab381eb2c0676099e563c11dac745976-1._googlecast._tcp.local.', uuid='ab381eb2-c067-6099-e563-c11dac745976', model_name='Google Home Mini', friendly_name='Office Mini')
2020-04-30 10:45:29 DEBUG (MainThread) [homeassistant.components.cast.media_player] _async_create_cast_device: ChromecastInfo(host='192.168.2.152', port=8009, service='Google-Home-Mini-ab381eb2c0676099e563c11dac745976-1._googlecast._tcp.local.', uuid='ab381eb2-c067-6099-e563-c11dac745976', model_name='Google Home Mini', friendly_name='Office Mini')
2020-04-30 10:45:30 DEBUG (zeroconf-ServiceBrowser__googlecast._tcp.local.) [pychromecast.discovery] add_service _googlecast._tcp.local., Google-Home-Mini-ab381eb2c0676099e563c11dac745976-1._googlecast._tcp.local.
2020-04-30 10:45:30 DEBUG (MainThread) [homeassistant.components.cast.media_player] Discovered chromecast with same UUID: ChromecastInfo(host='192.168.2.152', port=8009, service='Google-Home-Mini-ab381eb2c0676099e563c11dac745976-1._googlecast._tcp.local.', uuid='ab381eb2-c067-6099-e563-c11dac745976', model_name='Google Home Mini', friendly_name='Office Mini')
2020-04-30 10:45:30 DEBUG (zeroconf-ServiceBrowser__googlecast._tcp.local.) [pychromecast] _get_chromecast_from_host ('192.168.2.152', 8009, UUID('ab381eb2-c067-6099-e563-c11dac745976'), 'Google Home Mini', 'Office Mini')
2020-04-30 10:45:30 DEBUG (MainThread) [homeassistant.components.cast.media_player] [media_player.office_speaker Office Mini (192.168.2.152:8009)] Got new service: Google-Home-Mini-ab381eb2c0676099e563c11dac745976-1._googlecast._tcp.local. ({'Google-Home-Mini-ab381eb2c0676099e563c11dac745976._googlecast._tcp.local.'})
2020-04-30 10:45:30 INFO (zeroconf-ServiceBrowser__googlecast._tcp.local.) [pychromecast] Querying device status
2020-04-30 10:45:30 DEBUG (MainThread) [homeassistant.components.cast.media_player] [media_player.office_speaker Office Mini (192.168.2.152:8009)] Connecting to cast device by service {'Google-Home-Mini-ab381eb2c0676099e563c11dac745976-1._googlecast._tcp.local.', 'Google-Home-Mini-ab381eb2c0676099e563c11dac745976._googlecast._tcp.local.'}
2020-04-30 10:45:30 ERROR (MainThread) [homeassistant.util.logging] Exception in _async_cast_discovered when dispatching 'cast_discovered': (ChromecastInfo(host='192.168.2.152', port=8009, service='Google-Home-Mini-ab381eb2c0676099e563c11dac745976-1._googlecast._tcp.local.', uuid='ab381eb2-c067-6099-e563-c11dac745976', model_name='Google Home Mini', friendly_name='Office Mini'),)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 722, in _async_cast_discovered
await self.async_set_cast_info(discover)
File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 272, in async_set_cast_info
pychromecast.get_chromecast_from_service,
AttributeError: module 'pychromecast' has no attribute 'get_chromecast_from_service'
No idea why I see this later on -- a remove (??)
2020-04-30 10:53:42 DEBUG (zeroconf-ServiceBrowser__googlecast._tcp.local.) [pychromecast.discovery] remove_service _googlecast._tcp.local., Google-Home-Mini-ab381eb2c0676099e563c11dac745976._googlecast._tcp.local.
2020-04-30 10:53:42 DEBUG (zeroconf-ServiceBrowser__googlecast._tcp.local.) [pychromecast.discovery] remove_service _googlecast._tcp.local., Google-Home-Mini-ab381eb2c0676099e563c11dac745976._googlecast._tcp.local.
2020-04-30 10:53:42 DEBUG (zeroconf-ServiceBrowser__googlecast._tcp.local.) [homeassistant.components.cast.discovery] Removed chromecast ChromecastInfo(host='192.168.2.152', port=8009, service='Google-Home-Mini-ab381eb2c0676099e563c11dac745976._googlecast._tcp.local.', uuid='ab381eb2-c067-6099-e563-c11dac745976', model_name='Google Home Mini', friendly_name='Office Mini')
2020-04-30 10:53:42 DEBUG (MainThread) [homeassistant.components.cast.media_player] Removed chromecast with same UUID: ChromecastInfo(host='192.168.2.152', port=8009, service='Google-Home-Mini-ab381eb2c0676099e563c11dac745976._googlecast._tcp.local.', uuid='ab381eb2-c067-6099-e563-c11dac745976', model_name='Google Home Mini', friendly_name='Office Mini')
2020-04-30 10:53:42 DEBUG (MainThread) [homeassistant.components.cast.media_player] [media_player.office_speaker Office Mini (192.168.2.152:8009)] Remove service: Google-Home-Mini-ab381eb2c0676099e563c11dac745976._googlecast._tcp.local. ({'Google-Home-Mini-ab381eb2c0676099e563c11dac745976-1._googlecast._tcp.local.'})
cast documentation cast source (message by IssueLinks)
Hey there @emontnemery, mind taking a look at this issue as its been labeled with a integration (cast
) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)
Have a look at issue #34620 I my case it was the Plex Assistant Custom Component, I removed the line with "pychromecast==4.1.1" from the manifest.json file and after a restart the Google devices are available again.
My cast devices also stopped working after upgrading.
@gambith I only have 2 custom_components in my install, HACS, and wyzesense, and neither list pychromecast in manifest.json.
All cast devices disappeared from my install also. Docker container can reach all of my devices but Home Assistant can't find them.
Have a look at issue #34620 I my case it was the Plex Assistant Custom Component, I removed the line with "pychromecast==4.1.1" from the manifest.json file and after a restart the Google devices are available again.
That was indeed it for me! I have Plex Assistant installed, too. Removing that line did fix it, mostly. One of my Chromecast devices still isn't showing, but it might be related to something else? I've had ups and downs on some of these devices.
I had similar issue, but i I remove cast configuration from yaml file - cast is working.
diff --git a/packs/conf_conf.yaml b/packs/conf_conf.yaml
index 5535897..f388d69 100644
--- a/packs/conf_conf.yaml
+++ b/packs/conf_conf.yaml
@@ -22,10 +22,10 @@ media_extractor:
media_player.bedroom_speaker:
music: bestaudio[ext=m4a]
-cast:
- media_player:
- - host: !secret cast_bedroom
- - host: !secret cast_sound_bar
+# cast:
+# media_player:
+# - host: !secret cast_bedroom
+# - host: !secret cast_sound_bar
Caused by custom_component pinning an outdated version of pychromecast: https://github.com/home-assistant/core/issues/34968#issuecomment-622090096
I don't have any custom components using pychromecast. All my Home Minis are showing as unavailable with nothing present in the logs. Works perfectly fine if I downgrade to 0.108.9.
Do you use spotcast?
On Fri, May 1, 2020, 7:31 AM droans notifications@github.com wrote:
I don't have any custom components using pychromecast. All my Home Minis are showing as unavailable with nothing present in the logs. Works perfectly fine if I downgrade to 0.108.9.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/34968#issuecomment-622368949, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJCT7SZIVBAS7L6ILWHQ5ALRPK6K3ANCNFSM4MVX5CSA .
I do not.
Pychromecast version is 5.0.0. Logging is set to debug for pychromecast, pychromecast.discovery, pychromecast.socket_client, homeassistant.components.cast, homeassistant.components.cast.media_player, and zeroconf.
Oddly I don't have a single debug log in my log files. Only cast reference in the log file is zeroconf broadcast and homeassistant.components.cast being loaded.
I did a search of my entire homeassistant install, and the term "pychromecast" doesn't appear at all, unless it's in some kind of binary file?
I am experiencing the same issue after updating to 109.2 (docker/kubernetes) where both Chromecasts, Google Home, and Google Home Mini are unavailable. The devices are manually set as they are on a different VLAN in my network and no other changes have been made. Enabling debug logging did not show anything odd for the devices. I do not have any other custom components and a search for "pychromecast" in my HASS directory only returned entries under the file core.
I downgraded to 109.1 then 109.0 with no change, but back down to 108.9 all the devices immediately started working. I then created a brand new docker container running stable (109.2), specified one Google Home by IP, and the devices still do not connect or show up. The debug log has nothing for the IP, its like it is ignoring the hosts.
cast: media_player:
- host: 192.168.25.234
@droans, @captainnapalm, @danukefl are you using docker? if you are, please share docker command line or docker composer setting.s
If the tag is changed to 0.108.9 it works just fine.
I don't think media_player is even being loaded by Home Assistant. Running a script to send a message to one of the devices returns "Unable to find service media_player/play_media"
networks:
t2_proxy:
external:
name: t2_proxy
default:
driver: bridge
services:
---------------
homeassistant:
container_name: homeassistant
restart: always
dns:
- 192.168.86.35
- 192.168.86.36
image: homeassistant/home-assistant:stable
devices:
- /dev/hidraw0:/dev/hidraw0
- /dev/hidraw1:/dev/hidraw1
volumes:
- ${USERDIR}/docker/homeassistant:/config
- /etc/localtime:/etc/localtime:ro
- ${USERDIR}/docker/shared:/shared
ports:
- "8123:8123"
privileged: true
environment:
- PUID=${PUID}
- PGID=${PGID}
- TZ=${TZ}
networks:
- t2_proxy
- default
labels:
- "traefik.enable=true"
## HTTP Routers
- "traefik.http.routers.home-assistant-rtr.entrypoints=https"
- "traefik.http.routers.home-assistant-rtr.rule=Host(`hass.$DOMAINNAME`)"
- "traefik.http.routers.home-assistant-rtr.tls=true"
## Middlewares
- "traefik.http.routers.home-assistant-rtr.middlewares=chain-no-auth@file>
## HTTP Services
- "traefik.http.routers.home-assistant-rtr.service=home-assistant-svc"
- "traefik.http.services.home-assistant-svc.loadbalancer.server.port=8123"
I'm also able to ping all the Homes from within the container so it isn't a networking issue.
My main instance is in Kubernetes but my test instance with no configuration besides adding the cast and logger lines is using the below command.
`docker run -d -p 8124:8123 --name test2 -v test:/config homeassistant/home-assistant:stable configuration.zip
`
@danukefl, @droans You need to use Docker command line option --net=host
or the compose file equivalent network_mode: host
to put Home Assistant on the host network. If you don't do that, mDNS does not work which is a requirement for the cast integration from 0.109.
Please note the -p
command line option or the compose file equivalent ports:
is not compatible with host networking mode and must not be used.
Can't do that. Home Assistant loses access to all my other Docker services such as MariaDB, InfluxDB, and Traefik. If I give all these containers host network access, then they would lose access to my other Docker containers.
I'd need to give all my docker containers host network access which is both a security issue and unusable as many of the services want to bind to the same ports.
@emontnemery yes, i'm using Docker in unraid and just recently moved my instance to my letsencrypt/nginx reverse proxy, and therefore changed the network to the same network as the letsencrypt container. I have reset that to "host", and, while losing access through my reverse proxy, has resolved the issue. I'll continue to just use the remote ui through nabu casa instead of my own reverse proxy.
@emontnemery, after recreating the test container with host networking, the devices are still not included and the log is no different. I am with @droans though as this is a security risk and I ran with it previously but then disabled it with the migration to k8s and manually specified all my devices. I do not use discovery.
Edit: Nor can use discovery as my network is segregated into VLANs with HASS on one vlan and media devices on another.
Running Home Assistant on the host network is the only officially supported configuration for Home Assistant in a Docker container as doing otherwise breaks UPnP, mDNS as well as other functionality.
An unsupported alternative to make mDNS work is to setup mDNS forwarding on the host as discussed here https://github.com/home-assistant/core/issues/34874#issuecomment-621507292:
# Install the Avahi-daemon
sudo apt-get install avahi-daemon
# Turn on the reflector. Go into /etc/avahi/avahi-daemon.conf and change the reflector section to:
[reflector]
enable-reflector=yes
reflect-ipv=no
# (re)start the Avahi daemon to reload config
sudo service avahi-daemon restart
@danukefl Please note you must remove the Docker command line parameter -p 8124:8123
because it is not compatible with host networking mode.
@emontnemery Yes I removed the parameter, I use Portainer for general admin and the fact that I had to reconnect to 8123 versus 8124 validated that it was using host networking.
Now what I don't understand is what changed to require mDNS for 109 and why it would be required now, I don't see anything in the changelog. mDNS would not work across different networks anyways so I would be forced to use the forwarder.
Edit: I found the change, make sense so I'll have to either use the forwarder or move stuff around. Thanks.
For future reference - I was unable to get Avahi working as-is with Docker and on a virtual machine as Avahi would crash with all the networks created by VirtualBox.
I was able to get it working by setting allow-interfaces
to include my network docker0, and the networks created by docker (br-***).
I think it would be a good idea to add in the documentation pull request from @hmmbob with a disclaimer that his method is not supported by Home Assistant.
That documentation pull request was rejected.
The problem
Ever since 109, all my Google devices are now showing as unavailable, even though Modifications within the Google Home app (e.g. name changing, removing groups) are being seen by the integration.
Environment
Traceback/Error logs
I enabled debugging, and have multiple speakers. It's difficult to discern which trace goes to what device... So here's a big dump of a couple to insure everything's there.
After casting a station to "Living Room Endtable":
Additional information
I'm running on Unifi Ultimate Dream Machine, majority of my devices are within the same subnet as HomeAssistant. mDNS is enabled; Multicast Filtering is disabled; Audo-Optimize is disabled
I can see in the logs Google is successfully discovering my devices. But they're all coming up as unavailable. I was able to make a name-change modification via the Home app and it did show in the Entities list.
It sees them. Why are they unavailable?