XMPP (sleekxmpp) using IPv6 leads to "DNS: Use of IPv6 has been disabled."

Hi guys,

I’ve successfully setup prosody, connected my mobile to it and also created a notify in HA (using tls: true and verify:false due to currently self-signed cert).

Unfortunately I cannot send any messages using HA. Looking at the prosody log shows at least, that it doesn’t connect at all, so I’ve enabled the logger component and find this block in the HA log

2018-06-29 09:50:42 DEBUG (Thread-11) [sleekxmpp.xmlstream.resolver] DNS: Use of IPv6 has been disabled.
2018-06-29 09:50:42 DEBUG (Thread-11) [sleekxmpp.xmlstream.resolver] DNS: Querying SRV records for myhost
2018-06-29 09:50:42 DEBUG (Thread-11) [sleekxmpp.xmlstream.resolver] DNS: No SRV records for myhost
2018-06-29 09:50:42 DEBUG (Thread-11) [sleekxmpp.xmlstream.resolver] DNS: Querying myhost
2018-06-29 09:50:42 DEBUG (Thread-11) [sleekxmpp.xmlstream.resolver] DNS: No A records for myhost
2018-06-29 09:50:42 DEBUG (Thread-11) [sleekxmpp.xmlstream.xmlstream] No remaining DNS records to try.
2018-06-29 09:50:42 DEBUG (Thread-11) [sleekxmpp.xmlstream.xmlstream] Waiting 3.7525511392756385 seconds before connecting.

So, I’ve looked into [sleekxmpp.xmlstream.resolver] but here IPv6 is enabled on default, so there must be a parameter in HA disabling it. Is anyone familiar with this component and might help me out?

Thanks in advance :slight_smile:

I’ve found the solution now by myself :slight_smile:

In “./lib/python3.5/site-packages/homeassistant/components/notify/xmpp.py” in line 80:

        self.use_ipv6 = False

Setting this to:

        self.use_ipv6 = True

solves the problem and uses IPv6 :grinning:

Since this is probably overwritten on an update of HA, can we please have this setting in the component settings to have it configurable?