Unable to add MSZ-AP50VGD
Closed this issue ยท 6 comments
I am currently running home assistant in Docker on a Windows machine. After adding echonet Lite to my install, I am unable to add the heatpump. When adding the static IP of the heatpump, I get an error "Failed to connect."
The logs also show:
2022-12-09 10:03:11.602 DEBUG (MainThread) [custom_components.echonetlite.config_flow] Beginning ECHONET node discovery
2022-12-09 10:03:51.904 DEBUG (MainThread) [custom_components.echonetlite.config_flow] ECHONET Node Discovery Failed!
Is there any other form of logging I can add to get more details? From looking at the code base, it simply isn't getting a response on the discover endpoint.
I have confirmed I can ping the device from the container.
Added additional logging found in another closed case. My results are
homeassistant | s6-rc: info: service s6rc-oneshot-runner successfully started
homeassistant | s6-rc: info: service fix-attrs: starting
homeassistant | s6-rc: info: service fix-attrs successfully started
homeassistant | s6-rc: info: service legacy-cont-init: starting
homeassistant | s6-rc: info: service legacy-cont-init successfully started
homeassistant | s6-rc: info: service legacy-services: starting
homeassistant | services-up: info: copying legacy longrun home-assistant (no readiness notification)
homeassistant | s6-rc: info: service legacy-services successfully started
homeassistant | 2022-12-10 00:47:05.379 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration echonetlite which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
homeassistant | 2022-12-10 00:47:06.085 WARNING (Recorder) [homeassistant.components.recorder.util] The system could not validate that the sqlite3 database at //config/home-assistant_v2.db was shutdown cleanly
homeassistant | 2022-12-10 00:47:06.532 WARNING (Recorder) [homeassistant.components.recorder.util] Ended unfinished session (id=7 from 2022-12-09 23:52:34.728505)
homeassistant | 2022-12-10 00:48:36.829 DEBUG (MainThread) [custom_components.echonetlite.config_flow] IP address is 192.168.68.103
homeassistant | 2022-12-10 00:48:36.830 DEBUG (MainThread) [custom_components.echonetlite.config_flow] Beginning ECHONET node discovery
homeassistant | 2022-12-10 00:48:36.847 DEBUG (MainThread) [custom_components.echonetlite.config_flow] ECHONETLite Message Received from 172.20.0.1 - Raw data is b'\x10\x81\x00\x01\x0e\xf0\x01\x05\xff\x01r\x03\x8a\x03\x00\x00\x06\x83\x11\xfe\x00\x00\x06\x01\x05pa\xbe\xff\xfe\x83KJ\x0e\xf0\x01\xd6\x04\x01\x010\x01'
homeassistant | 2022-12-10 00:48:36.847 DEBUG (MainThread) [custom_components.echonetlite.config_flow] ECHONETLite Message Received from 172.20.0.1 - Processed data is {'EHD1': 16, 'EHD2': 129, 'TID': 1, 'SEOJGC': 14, 'SEOJCC': 240, 'SEOJCI': 1, 'DEOJGC': 5, 'DEOJCC': 255, 'DEOJCI': 1, 'ESV': 114, 'OPC': [{'EPC': 138, 'PDC': 3, 'EDT': b'\x00\x00\x06'}, {'EPC': 131, 'PDC': 17, 'EDT': b'\xfe\x00\x00\x06\x01\x05pa\xbe\xff\xfe\x83KJ\x0e\xf0\x01'}, {'EPC': 214, 'PDC': 4, 'EDT': b'\x01\x010\x01'}]}
homeassistant | 2022-12-10 00:48:36.847 DEBUG (MainThread) [custom_components.echonetlite.config_flow] ECHONETLite Message Received from 172.20.0.1 - tid_data is {}
homeassistant | 2022-12-10 00:48:36.847 DEBUG (MainThread) [custom_components.echonetlite.config_flow] Unknown ECHONETLite node has been identified - 172.20.0.1
homeassistant | 2022-12-10 00:49:17.127 DEBUG (MainThread) [custom_components.echonetlite.config_flow] ECHONET Node Discovery Failed!
homeassistant | 2022-12-10 00:58:44.702 DEBUG (MainThread) [custom_components.echonetlite.config_flow] IP address is [Auto Discovery].k,um ๐๐๐+++++000+0+33++++++++++++++++++++++++++++++++++++++++++++++++++ hhhhh 6nnnn5hy4ttttttttttttttq``````````````.........................................0
homeassistant | 2022-12-10 00:58:44.703 DEBUG (MainThread) [custom_components.echonetlite.config_flow] Beginning ECHONET node discovery
homeassistant | 2022-12-10 00:58:44.705 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
homeassistant | Traceback (most recent call last):
homeassistant | File "/usr/local/lib/python3.10/site-packages/pychonet/lib/udpserver.py", line 113, in _send_periodically
homeassistant | bytes_sent = await self._sock_send(data, addr)
homeassistant | File "/usr/local/lib/python3.10/site-packages/pychonet/lib/udpserver.py", line 92, in _sock_send
homeassistant | bytes_sent = self._sock.sendto(data, addr)
homeassistant | TypeError: encoding of hostname failed
homeassistant | 2022-12-10 00:59:24.948 DEBUG (MainThread) [custom_components.echonetlite.config_flow] ECHONET Node Discovery Failed!
homeassistant | 2022-12-10 06:21:48.157 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from 172.20.0.1 (172.20.0.1). Requested URL: '/auth/login_flow/d5bdc93575acbc9dfdc06e75d3655b01'. (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36)
homeassistant | 2022-12-10 06:22:13.526 DEBUG (MainThread) [custom_components.echonetlite.config_flow] IP address is 192.168.68.103
homeassistant | 2022-12-10 06:22:13.529 DEBUG (MainThread) [custom_components.echonetlite.config_flow] Beginning ECHONET node discovery
homeassistant | 2022-12-10 06:22:13.552 DEBUG (MainThread) [custom_components.echonetlite.config_flow] ECHONETLite Message Received from 172.20.0.1 - Raw data is b'\x10\x81\x00\x01\x0e\xf0\x01\x05\xff\x01r\x03\x8a\x03\x00\x00\x06\x83\x11\xfe\x00\x00\x06\x01\x05pa\xbe\xff\xfe\x83KJ\x0e\xf0\x01\xd6\x04\x01\x010\x01'
homeassistant | 2022-12-10 06:22:13.552 DEBUG (MainThread) [custom_components.echonetlite.config_flow] ECHONETLite Message Received from 172.20.0.1 - Processed data is {'EHD1': 16, 'EHD2': 129, 'TID': 1, 'SEOJGC': 14, 'SEOJCC': 240, 'SEOJCI': 1, 'DEOJGC': 5, 'DEOJCC': 255, 'DEOJCI': 1, 'ESV': 114, 'OPC': [{'EPC': 138, 'PDC': 3, 'EDT': b'\x00\x00\x06'}, {'EPC': 131, 'PDC': 17, 'EDT': b'\xfe\x00\x00\x06\x01\x05pa\xbe\xff\xfe\x83KJ\x0e\xf0\x01'}, {'EPC': 214, 'PDC': 4, 'EDT': b'\x01\x010\x01'}]}
homeassistant | 2022-12-10 06:22:13.552 DEBUG (MainThread) [custom_components.echonetlite.config_flow] ECHONETLite Message Received from 172.20.0.1 - tid_data is {}
homeassistant | 2022-12-10 06:22:13.552 DEBUG (MainThread) [custom_components.echonetlite.config_flow] Unknown ECHONETLite node has been identified - 172.20.0.1
homeassistant | 2022-12-10 06:22:53.790 DEBUG (MainThread) [custom_components.echonetlite.config_flow] ECHONET Node Discovery Failed!
It looks like 192.168.68.103 was detected and sent a request, but the reply comes from 172.20.0.1. Please check of IP address mapping for UDP communication between host/Docker container.
Please note that Echonet Lite uses UDP communication.
@wroof echonet lite uses port number 3610 for UDP communication, so try port forwarding port 3610 in Docker settings. Ask the Docker community how to do that.
Thanks @nao-pon , sorry for the late reply, I have been on holiday the last few weeks and not at my computer.
I guess I should have posted my docker-compose file. I already have port 3610 mapped for UDP and TCP. Not sure how to stop the remapping of IP addresses though. I will ask around on some Docker forums unless you know how?
services:
homeassistant:
container_name: homeassistant
image: "ghcr.io/home-assistant/home-assistant:stable"
volumes:
- E:\Docker Config\Home Assistant\Config:/config
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
privileged: true
ports:
- 8123:8123
- 3610:3610/udp
- 3610:3610/tcp
Docker seems to have a method to fix the IP address of the container to the same network segment as the host, so I think that method is also effective.
I really don't want to be "that guy" but running Home Assistant in a Windows Docker environment is not really an officially recommended method. The recommended methods for a Windows environment are running HAOS in a VM (eg Hyper-V) or running Home Assistant Core directly in a WSL Python environment. https://www.home-assistant.io/installation/windows
Putting my network engineering hat on here and there is some sort of weird NAT thing going on where the HVAC 192.168.x.x address is being natted inbound to the Docker environment 172.20.x.x range; and that is not an issue being caused by this custom component, that is an issue with your environment setup.
This is really a corner case here and traditionally I have closed off these sorts of issues because the expectation is that the Home Assistant environment at the very least resembles an officially recommended installation method appropriate for the bare metal operating system. Yes Docker container deployments of Core are supported and yes Windows environments are supported, but not really the two in combination...