Closed tomasz8w closed 2 years ago
dlna_dmr documentation dlna_dmr source (message by IssueLinks)
Hey there @stevenlooman, @chishm, mind taking a look at this issue as it has been labeled with an integration (dlna_dmr
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
i have the same error with the LIFX platform.
Error importing platform config_flow from integration lifx to set up lifx configuration entry: cannot import name 'determine_source_target' from 'async_upnp_client.ssdp' (/srv/homeassistant/lib/python3.9/site-packages/async_upnp_client/ssdp.py)
Same issue here with my LG TV. Went back to core_2022.3.8 and it works fine again.
This is a complicated IPv6 problem, related to the ssdp component and the async-upnp-client library. @StevenLooman you're probably interested in this too.
I have a few questions to help narrow down the cause:
[async_upnp_client.traffic.ssdp] Sending SSDP packet, target: ('FF02::C', 1900, 0, 2)
tells me that it's interface 2 that it's trying to use. If you run ip link show | grep -hE '^2:'
at a command line, can you please tell me what it tells you? This will be an interface name, and I'm curious if it's your normal network interface, a virtual interface, or something else.@mr-orange:
That looks like a different issue. The determine_source_target
function was introduced in async-upnp-client 0.24.0 (and is still there), and Home Assistant 2022.4.0 needs async-upnp-client 0.27.0. So first thing to check is that you have async-upnp-client==0.27.0 in whatever Python environment Home Assistant is running in.
I have few ufw rules, this two are relevant i guess:
To Action From
[ 2] Anywhere ALLOW IN 192.168.0.0/16
[ 4] Anywhere ALLOW IN 172.30.32.0/23
172.30.32.0 is a subnet with HA containers.
Interface 2 is a physical Interface:
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
Yes, auto configure is checked. eno1 interface is detected.
It started working after few hours, but after HA restart it is unavailable again.
Very interesting. Does that mean you have HA running in a Docker container with host networking? And IPv6 too?
Here's another thing to test: can you successfully run ping6 FF02::C%2
from within the HA container and also the host machine?
I suspect there's something interfering with IPv6 multicast traffic. The physical interface has "MULTICAST" enabled, so that's probably not it. More likely is a firewall -- Docker likes to install its own iptables rules that ufw might not show. Also, the iptables --list
command will only show you the IPv4 rules. For IPv6, you'll need ip6tables --list
(possibly with sudo
).
I also realise that the log messages are not helpful for diagnosing a misconfigured network. This might need some kind of better warning message from Home Assistant when IPv6 socket multicasts fail.
Very interesting. Does that mean you have HA running in a Docker container with host networking? And IPv6 too?
Driver for HA stack is bridge
Here's another thing to test: can you successfully run
ping6 FF02::C%2
from within the HA container and also the host machine?I suspect there's something interfering with IPv6 multicast traffic. The physical interface has "MULTICAST" enabled, so that's probably not it. More likely is a firewall -- Docker likes to install its own iptables rules that ufw might not show. Also, the
iptables --list
command will only show you the IPv4 rules. For IPv6, you'll needip6tables --list
(possibly withsudo
).I also realise that the log messages are not helpful for diagnosing a misconfigured network. This might need some kind of better warning message from Home Assistant when IPv6 socket multicasts fail.
I'm able to ping FF02::C%2 from host and container after disabling ufw. I checked and default ufw policy is to drop ipv6 traffic. After changing this option in /etc/default/ufw
I'm able to ping FF02::C%2 either from host and container. Looks that this issue is fixed, I don't observe errors mentioned here anymore. Thanks for help, I'll observe logs for a while but I guess that was it.
However I'm still getting errors described in #57240 sometimes, I mean:
Error during call async_play_media: UpnpConnectionError('[Errno None] Can not write request body for http://192.168.8.95:49152/upnp/control/rendertransport1', None)
The problem
After upgrading to 2022.4.1 I started getting errors like below:
I have two DLNA Digital Media Renderers and DLNA Digital Media Server configured.
Edit: problem seems to be related with DLNA dmr, every two minutes my soundbar is switching between unavailable and idle state.
What version of Home Assistant Core has the issue?
core-2022.4.1
What was the last working version of Home Assistant Core?
core-2022.3.5
What type of installation are you running?
Home Assistant Supervised
Integration causing the issue
DLNA Digital Media Renderer
Link to integration documentation on our website
https://www.home-assistant.io/integrations/dlna_dmr/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information
No response