Closed tobihoby closed 7 months ago
The ENOTFOUND
error is a DNS resolution failure for api.home-connect.com
.
I am not seeing that problem myself. I have tried with the same node
, homebridge
, and homebridge-homeconnect
, versions (but on Ubuntu 22.04.4 LTS instead of Debian). Hence, I suspect that the problem is with your own setup or internet connection. Alternatively, it might have been due to a temporary problem that has been rectified.
This plugin isn't even performing the DNS resolution itself - it is just passing the hostname as part of the URL as the first parameter to undici
's new Client
method. If this is actually a bug (which I don't think it is) then it is likely to be in undici
.
From the log you provided it is clear that this plugin installation was working previously. It has a previously saved OAuth token, and is restoring accessories for two appliances, neither of which would be the case if it has not been successfully authorised. You have also raised previous issues (#170 and #228) that demonstrated working installations.
Have you changed anything since it was last working? For example applied any Debian updates, changed your configuration, updated this plugin, etc?
Can you still reproduce the same failure?
What do you get if you try dig api.home-connect.com
or nslookup api.home-connect.com
from a shell prompt on the same system?
With my local DNS I get:
> dig api.home-connect.com
; <<>> DiG 9.18.18-0ubuntu0.22.04.2-Ubuntu <<>> api.home-connect.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 51479
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
; COOKIE: 45ecf977c5f84dea0100000066266ff63a75641a1749eef6 (good)
;; QUESTION SECTION:
;api.home-connect.com. IN A
;; ANSWER SECTION:
api.home-connect.com. 129 IN CNAME api-gateway-lb-414308807.eu-central-1.elb.amazonaws.com.
api-gateway-lb-414308807.eu-central-1.elb.amazonaws.com. 9 IN A 52.59.7.53
api-gateway-lb-414308807.eu-central-1.elb.amazonaws.com. 9 IN A 18.158.166.82
api-gateway-lb-414308807.eu-central-1.elb.amazonaws.com. 9 IN A 3.77.174.102
;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1) (UDP)
;; WHEN: Mon Apr 22 15:11:02 BST 2024
;; MSG SIZE rcvd: 194
> nslookup api.home-connect.com
Server: 127.0.0.1
Address: 127.0.0.1#53
Non-authoritative answer:
api.home-connect.com canonical name = api-gateway-lb-414308807.eu-central-1.elb.amazonaws.com.
Name: api-gateway-lb-414308807.eu-central-1.elb.amazonaws.com
Address: 18.158.166.82
Name: api-gateway-lb-414308807.eu-central-1.elb.amazonaws.com
Address: 3.77.174.102
Name: api-gateway-lb-414308807.eu-central-1.elb.amazonaws.com
Address: 52.59.7.53
I receive the same answers if I force use of Google's DNS:
> dig @8.8.8.8 api.home-connect.com
; <<>> DiG 9.18.18-0ubuntu0.22.04.2-Ubuntu <<>> @8.8.8.8 api.home-connect.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6423
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;api.home-connect.com. IN A
;; ANSWER SECTION:
api.home-connect.com. 75 IN CNAME api-gateway-lb-414308807.eu-central-1.elb.amazonaws.com.
api-gateway-lb-414308807.eu-central-1.elb.amazonaws.com. 14 IN A 18.158.166.82
api-gateway-lb-414308807.eu-central-1.elb.amazonaws.com. 14 IN A 3.77.174.102
api-gateway-lb-414308807.eu-central-1.elb.amazonaws.com. 14 IN A 52.59.7.53
;; Query time: 23 msec
;; SERVER: 8.8.8.8#53(8.8.8.8) (UDP)
;; WHEN: Mon Apr 22 15:27:25 BST 2024
;; MSG SIZE rcvd: 163
> nslookup api.home-connect.com 8.8.8.8
Server: 8.8.8.8
Address: 8.8.8.8#53
Non-authoritative answer:
api.home-connect.com canonical name = api-gateway-lb-414308807.eu-central-1.elb.amazonaws.com.
Name: api-gateway-lb-414308807.eu-central-1.elb.amazonaws.com
Address: 18.158.166.82
Name: api-gateway-lb-414308807.eu-central-1.elb.amazonaws.com
Address: 3.77.174.102
Name: api-gateway-lb-414308807.eu-central-1.elb.amazonaws.com
Address: 52.59.7.53
Thank you very much, that was actually it...
I provided the RaspberryPi with the router's IP via DHCP, including for DNS. Nothing was changed.
I've now entered the DNS manually and it's working again. Very funny.
Thanks!
Description of Issue
Home Connect API Error: ERROR: Error: getaddrinfo ENOTFOUND api.home-connect.com
Expected Behaviour
...
Steps to Reproduce
always
Plugin Version
0.41.4
Environment
Home Connect Appliance(s)
No response
HomeKit App(s)
No response
Diagnostic Checks
Log File
Configuration
Additional Information
No response