andyjayh Posted January 6, 2023 Share Posted January 6, 2023 I'm running Home Assistant Core as a Docker and I would like to connect to my Thread based devices, Eve Energy plugs mainly. Currently I have a fully setup Thread network with my Apple TV running as the border router. When I connect an Eve plug that has been removed from my HomeKit Home and still has a Thread network, Home Assistant picks it up immediately as available but reports and error connecting to it. I believe this is to do with routing back via ipv6. Logger: homeassistant.components.homekit_controller.config_flow Source: components/homekit_controller/config_flow.py:491 Integration: HomeKit Controller (documentation, issues) First occurred: 14:16:30 (2 occurrences) Last logged: 14:17:24 Pairing attempt failed with an unhandled exception Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/aiohomekit/controller/coap/connection.py", line 288, in do_pair_setup response = await self.pair_setup_client.request(request).response asyncio.exceptions.CancelledError During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/homekit_controller/config_flow.py", line 491, in async_step_pair self.finish_pairing = await discovery.async_start_pairing(self.hkid) File "/usr/local/lib/python3.10/site-packages/aiohomekit/controller/coap/discovery.py", line 57, in async_start_pairing salt, srpB = await self.connection.do_pair_setup( File "/usr/local/lib/python3.10/site-packages/aiohomekit/controller/coap/connection.py", line 287, in do_pair_setup async with asyncio_timeout(16.0): File "/usr/local/lib/python3.10/site-packages/async_timeout/__init__.py", line 129, in __aexit__ self._do_exit(exc_type) File "/usr/local/lib/python3.10/site-packages/async_timeout/__init__.py", line 212, in _do_exit raise asyncio.TimeoutError asyncio.exceptions.TimeoutError Spoiler I'm running UnRaid 6.11.5 My Home Assistant container is running on Host network. I have stopped my Docker service and added ipv6 to my network configuration. This has picked up an address but not a gateway. From my Mac if I ping6 one of my plugs using this; ping6 Eve-Energy-7821.local I get a response immediately If I do the same from my unraid terminal I get "Network is unreachable" So I assume the first step is to resolve IPv6 for unraid so I can connect to the existing devices? Then I need to configure my Docker network to use ipv6? Custom network rather than Host? I've been trying to find answers for this but limited success and there have been a few updates over the last few unraid releases I believe so I thought I would ask now I am on the latest build. Quote Link to comment
MAM59 Posted January 6, 2023 Share Posted January 6, 2023 15 minutes ago, andyjayh said: ping6 Eve-Energy-7821.local I get a response immediately can you tell us what address (V6) is associated with the plug? if it starts with fe80:... you can forget it. These are "interface local" addresses only. So they would be reachble only directly from the UNRAID LAN, not from a docker. Dockers and V6 are currently not very bright... Quote Link to comment
andyjayh Posted January 6, 2023 Author Share Posted January 6, 2023 1 hour ago, MAM59 said: can you tell us what address (V6) is associated with the plug? if it starts with fe80:... you can forget it. These are "interface local" addresses only. So they would be reachble only directly from the UNRAID LAN, not from a docker. Dockers and V6 are currently not very bright... Sure, fd7e:37b8:e809:465c:4d8:9400:bd1:c05f It seems like a routing issue. HA detects the Eve plug as it is powered on, just can't route back. The HA docker has an ipv6 address, unraid has an ipv6 address.... Quote Link to comment
MAM59 Posted January 6, 2023 Share Posted January 6, 2023 Ahh, "fdxX::" is an ULA (universal local address). It should be routeable within your lan if you have a properly configured gateway/router for it. You need to add a manual route to unraid for getting to the plug. Looks like you are running into the strange V6 effect that a device annouces itself through a multicast address, but wants real communication back only on the ULA address. Find the gateway, add a route and it should work. (if there is no gateway, we have a little problem, because it will be hard to give unraid an additional address in the fd7e:: net... Normally "more than one V6 address" is no problem, but UNRAID is not really V6 ready yet and only allows a single address through the gui. there should be special tricks to add more, but I dont now how to do it properly. I would add an "ifconfig eth0 ... alias" line into the go file, but I'm sure, somebody else her in the forum knows a more legal way) Quote Link to comment
andyjayh Posted January 6, 2023 Author Share Posted January 6, 2023 Ahh, "fdxX::" is an ULA (universal local address). It should be routeable within your lan if you have a properly configured gateway/router for it. You need to add a manual route to unraid for getting to the plug. Looks like you are running into the strange V6 effect that a device annouces itself through a multicast address, but wants real communication back only on the ULA address. Find the gateway, add a route and it should work. (if there is no gateway, we have a little problem, because it will be hard to give unraid an additional address in the fd7e:: net... Normally "more than one V6 address" is no problem, but UNRAID is not really V6 ready yet and only allows a single address through the gui. there should be special tricks to add more, but I dont now how to do it properly. I would add an "ifconfig eth0 ... alias" line into the go file, but I'm sure, somebody else her in the forum knows a more legal way) Thanks, that behaviour seems to be correct, multicast first. Gateway address, assume that will be the address of my boarder router? Which is my ATV4. When you say add a route, do I do that via the network section once I’ve stopped Docker? Assume not in the gateway section but as an additional route?Sent from my iPhone using Tapatalk Pro Quote Link to comment
MAM59 Posted January 7, 2023 Share Posted January 7, 2023 (edited) 7 hours ago, andyjayh said: Gateway address, assume that will be the address of my boarder router? Which is my ATV4. When you say add a route, do I do that via the network section once I’ve stopped Docker? Assume not in the gateway section but as an additional route? As I said: UNRAID is not the brightest place for this. The best way would be to add the address and router to your ATV4 (dunno what this is), so it can relay the packets to UNRAID. Or have a different machine that can easily be configured for multiple addresses and V6 routing on your LAN (any normal Linux / BSD / even Windows / PI or something alike will do, just UNRAID is very castrated in this ) ATV4? just googled around and found "Apple TV 4" ?!?!?!? Naaaah, that would be not the solution, Apple devices usually are even more problems. I hope you have something real at home. Edited January 7, 2023 by MAM59 Quote Link to comment
andyjayh Posted January 8, 2023 Author Share Posted January 8, 2023 ATV4, yep Apple TV so probably not the best place to add routing info, don't think you can tbh.... It is only Unraid that is not playing ball in my network, although I am heavily Apple products, they are all working with Thread and therefore ipv6. My network is UniFi based, router is a Dream Machine, switches and AP's are all UniFi. Assume I should be able to do something on the router then? Thanks for your assistance but this is well out of my comfort zone... I have read for other Linux based Docker setups people needed to run the following commands for routing; set net.ipv6.conf.br0.accept_ra=2, set net.ipv6.conf.bond0.accept_ra=2 Didn't want to do that blindly on my Unraid as I have no idea if that is needed and what damage it may do if I get it wrong. However, I think they are incorrect for me as they are setting the route and bonding (?) to br0 whereas I think I'm currently using eth0. I found in some other threads that running the following commands would show the routing; ip -6 route ::1 dev lo proto kernel metric 256 pref medium fd7e:37b8:e809:465c::/64 dev shim-eth0 proto kernel metric 256 expires 1763sec pref medium fd7e:37b8:e809:465c::/64 dev eth0 proto ra metric 1003 pref medium fe80::/64 dev eth0 proto kernel metric 256 pref medium fe80::/64 dev shim-eth0 proto kernel metric 256 pref medium fe80::/64 dev veth9465acf proto kernel metric 256 pref medium fe80::/64 dev docker0 proto kernel metric 256 pref medium fe80::/64 dev veth5d89a13 proto kernel metric 256 pref medium fe80::/64 dev veth25d3a49 proto kernel metric 256 pref medium fe80::/64 dev vetha3240f7 proto kernel metric 256 pref medium fe80::/64 dev veth3936fc8 proto kernel metric 256 pref medium fe80::/64 dev veth8339b73 proto kernel metric 256 pref medium fe80::/64 dev veth95b1fdc proto kernel metric 256 pref medium ip -6 a s 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 state UNKNOWN qlen 1000 inet6 ::1/128 scope host valid_lft forever preferred_lft forever 3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000 inet6 fd7e:37b8:e809:465c:dabb:c1ff:fe9f:a4c5/64 scope global dynamic mngtmpaddr noprefixroute valid_lft 1715sec preferred_lft 1715sec inet6 fe80::dabb:c1ff:fe9f:a4c5/64 scope link valid_lft forever preferred_lft forever 4: docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP inet6 fe80::42:5eff:fe05:c4d3/64 scope link valid_lft forever preferred_lft forever 5: shim-eth0@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UNKNOWN qlen 1000 inet6 fd7e:37b8:e809:465c:d8bb:c100:19f:a4c5/64 scope global dynamic mngtmpaddr valid_lft 1715sec preferred_lft 1715sec inet6 fe80::d8bb:c100:19f:a4c5/64 scope link valid_lft forever preferred_lft forever 7: veth9465acf@if6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP inet6 fe80::9443:aeff:fe70:13e1/64 scope link valid_lft forever preferred_lft forever 11: veth5d89a13@if10: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP inet6 fe80::ac9a:61ff:fea3:c3b8/64 scope link valid_lft forever preferred_lft forever 13: veth25d3a49@if12: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP inet6 fe80::984c:4aff:fe7b:9262/64 scope link valid_lft forever preferred_lft forever 17: vetha3240f7@if16: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP inet6 fe80::a426:4eff:feb2:9cdc/64 scope link valid_lft forever preferred_lft forever 19: veth3936fc8@if18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP inet6 fe80::b4b1:33ff:fea6:cfd/64 scope link valid_lft forever preferred_lft forever 21: veth8339b73@if20: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP inet6 fe80::48d9:5ff:fe81:c4d/64 scope link valid_lft forever preferred_lft forever 28: veth95b1fdc@if27: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP inet6 fe80::3891:70ff:fe0e:830e/64 scope link valid_lft forever preferred_lft forever But I don't know what that is telling me.... Quote Link to comment
MAM59 Posted January 8, 2023 Share Posted January 8, 2023 20 minutes ago, andyjayh said: t is only Unraid that is not playing ball in my network, although I am heavily Apple products, they are all working with Thread and therefore ipv6. Sorry to say, but its Apple that does not like to play along with other brands. They want you to buy only their stuff and that stuff just does the things that it is released with. New stuff never comes with updates but forces you to buy the next machine. Thats not my world, sorry, I don't waste my money on Apple anymore (After real bad expieriences with Lisa, Mac (original) and Newton). I even did not allow any iphones in my neighborhood lan because Apple is bold enough to use a kind of vpn to connect to their servers even through firewalls). They dont care about their customers, they just want the money. (just my 2cents) I can't help you with this stuff, sorry. Quote Link to comment
andyjayh Posted January 9, 2023 Author Share Posted January 9, 2023 I sense your dislike for that brand, won't go any further on that one 😇 So, for anyone else who might like to help... I'm trying to enable Thread support for a Home Assistant Core Docker container so my Eve Energy plugs can be integrated to Home Assistant and taken out of the evil Apple empire 😆 Currently it looks like I will have to remove Home Assistant away from Unraid just so I can get Thread/Matter working... seems like a backward step due to the increasing support for these protocols. Quote Link to comment
0xvisualiris Posted July 22 Share Posted July 22 Hey, did you resolved your problem? I got the same error at my side, that I can ping these link local addresses easily from my windows machine, Mac and any other devices but not in my HA docker container on my Unraid server. A Gateway is setup in my UniFi network and everything IPv6 related works seamlessly outside of unraid. Thanks for your answer. Cheers Quote Link to comment
MAM59 Posted July 23 Share Posted July 23 6 hours ago, 0xvisualiris said: I got the same error at my side, that I can ping these link local addresses easily from my windows machine Its not an error, its a feature 😁 "link local" do what their name implies, they only work link local. In UNRAID the dockers are implemented in their own virtual networks (these vetah.... thingies), so each of them has its own local link. You cannot access link locals from other links. If you run the docker in "host" mode, it has access to the main networks, including the correct link locals!!! Edit the docker file and restart the docker. Quote Link to comment
0xvisualiris Posted July 23 Share Posted July 23 4 hours ago, MAM59 said: Its not an error, its a feature 😁 "link local" do what their name implies, they only work link local. In UNRAID the dockers are implemented in their own virtual networks (these vetah.... thingies), so each of them has its own local link. You cannot access link locals from other links. If you run the docker in "host" mode, it has access to the main networks, including the correct link locals!!! Edit the docker file and restart the docker. I'm running the Homeassistant Docker container in host mode. So it should work, but it doesn't. Hm Hm. I get the same problems as the other forum members told Quote Link to comment
MAM59 Posted July 23 Share Posted July 23 does your device not have a "real" v6 address? Link locals are reservered for certain services like ndp and so on. They should not be used for general services. Quote Link to comment
andyjayh Posted July 26 Author Share Posted July 26 On 7/22/2024 at 9:58 PM, 0xvisualiris said: Hey, did you resolved your problem? I got the same error at my side, that I can ping these link local addresses easily from my windows machine, Mac and any other devices but not in my HA docker container on my Unraid server. A Gateway is setup in my UniFi network and everything IPv6 related works seamlessly outside of unraid. Thanks for your answer. Cheers No I didn't and gave up on working with unRaid for IPv6, Thread/Matter. My conclusion is unRaid isn't mature yet in this area so as long as I retain Home Assistant in a container on unRaid, I won't try to get Thread or Matter working. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.