Closed Scream4Life closed 1 year ago
@Scream4Life do you have any more logging? Seems like some is missing...
Could you also try with showExtraFeatures
set to false
?
Edit: also enable debug logging in Homebridge:
Nothing changed when I toggle this.
And I don't see the debug mode option in my Homebridge Settings
I'm starting the instance with sudo systemctl restart homebridge-cam -l
Or is the Diakin Cloud probably something different than my account in my ONECTA-Daikin App on my iOS device.
No that is correct, it is the account you use to login on the ONECTA-Daikin App
.
Do you have any more logging?
First line was missing...still didn't find the debug mode yet - I loaded it on another instance to avoid any side effects. Same result.
Jul 20 21:27:17 raspberrypi homebridge[27300]: (node:27300) UnhandledPromiseRejectionWarning: RequestError: connect ECONNREFUSED 127.0.0.1:443
Jul 20 21:27:17 raspberrypi homebridge[27300]: at ClientRequest.<anonymous> (/usr/lib/node_modules/homebridge-daikin-cloud/node_modules/got/dist/source/core/index.js:970:111)
Jul 20 21:27:17 raspberrypi homebridge[27300]: at Object.onceWrapper (events.js:520:26)
Jul 20 21:27:17 raspberrypi homebridge[27300]: at ClientRequest.emit (events.js:412:35)
Jul 20 21:27:17 raspberrypi homebridge[27300]: at ClientRequest.origin.emit (/usr/lib/node_modules/homebridge-daikin-cloud/node_modules/@szmarczak/http-timer/dist/source/index.js:43:20)
Jul 20 21:27:17 raspberrypi homebridge[27300]: at TLSSocket.socketErrorListener (_http_client.js:475:9)
Jul 20 21:27:17 raspberrypi homebridge[27300]: at TLSSocket.emit (events.js:400:28)
Jul 20 21:27:17 raspberrypi homebridge[27300]: at emitErrorNT (internal/streams/destroy.js:106:8)
Jul 20 21:27:17 raspberrypi homebridge[27300]: at emitErrorCloseNT (internal/streams/destroy.js:74:3)
Jul 20 21:27:17 raspberrypi homebridge[27300]: at processTicksAndRejections (internal/process/task_queues.js:82:21)
Jul 20 21:27:17 raspberrypi homebridge[27300]: at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1159:16)
Jul 20 21:27:17 raspberrypi homebridge[27300]: (Use `node --trace-warnings ...` to show where the warning was created)
Jul 20 21:27:17 raspberrypi homebridge[27300]: (node:27300) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
Jul 20 21:27:17 raspberrypi homebridge[27300]: (node:27300) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Can you try to install version 1.1.0? You should be able to do that on your pi itself, not via the Homebridge UI.
npm install homebridge-daikin-cloud@1.1.0
Thanks, but look similar to me
Jul 20 23:40:41 raspberrypi homebridge[8051]: (node:8051) UnhandledPromiseRejectionWarning: RequestError: connect ECONNREFUSED 127.0.0.1:443
Jul 20 23:40:41 raspberrypi homebridge[8051]: at ClientRequest.<anonymous> (/usr/lib/node_modules/homebridge-daikin-cloud/node_modules/got/dist/source/core/index.js:970:111)
Jul 20 23:40:41 raspberrypi homebridge[8051]: at Object.onceWrapper (events.js:520:26)
Jul 20 23:40:41 raspberrypi homebridge[8051]: at ClientRequest.emit (events.js:412:35)
Jul 20 23:40:41 raspberrypi homebridge[8051]: at ClientRequest.origin.emit (/usr/lib/node_modules/homebridge-daikin-cloud/node_modules/@szmarczak/http-timer/dist/source/index.js:43:20)
Jul 20 23:40:41 raspberrypi homebridge[8051]: at TLSSocket.socketErrorListener (_http_client.js:475:9)
Jul 20 23:40:41 raspberrypi homebridge[8051]: at TLSSocket.emit (events.js:400:28)
Jul 20 23:40:41 raspberrypi homebridge[8051]: at emitErrorNT (internal/streams/destroy.js:106:8)
Jul 20 23:40:41 raspberrypi homebridge[8051]: at emitErrorCloseNT (internal/streams/destroy.js:74:3)
Jul 20 23:40:41 raspberrypi homebridge[8051]: at processTicksAndRejections (internal/process/task_queues.js:82:21)
Jul 20 23:40:41 raspberrypi homebridge[8051]: at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1159:16)
Jul 20 23:40:41 raspberrypi homebridge[8051]: (Use `node --trace-warnings ...` to show where the warning was created)
Jul 20 23:40:41 raspberrypi homebridge[8051]: (node:8051) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
Jul 20 23:40:41 raspberrypi homebridge[8051]: (node:8051) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
@Scream4Life can you also post the logs from the Homebridge status screen? You also should see info logs like:
[7/22/2022, 2:03:25 PM] ---
[7/22/2022, 2:03:25 PM] Loaded plugin: homebridge-daikin-cloud@1.3.2
[7/22/2022, 2:03:25 PM] Registering platform 'homebridge-daikin-cloud.DaikinCloud'
[7/22/2022, 2:03:25 PM] ---
[7/22/2022, 2:03:25 PM] Disabled plugin: homebridge-fusionsolar-battery@1.0.0
[7/22/2022, 2:03:25 PM] ---
[7/22/2022, 2:03:25 PM] Loading 3 platforms...
[7/22/2022, 2:03:25 PM] [DaikinCloud] Initializing DaikinCloud platform...
[7/22/2022, 2:03:25 PM] [DaikinCloud] Finished initializing platform: undefined
[7/22/2022, 2:03:25 PM] [Config] Initializing config platform...
[7/22/2022, 2:03:25 PM] [Config] Running in Service Mode
[7/22/2022, 2:03:25 PM] [DaikinCloud] Loading accessory from cache: Airco zolder
[7/22/2022, 2:03:25 PM] [DaikinCloud] Loading accessory from cache: Airco keuken
[7/22/2022, 2:03:25 PM] [DaikinCloud] Executed didFinishLaunching callback
[7/22/2022, 2:03:25 PM] [DaikinCloud] Write/read Daikin Cloud tokenset from ...
Jul 22 14:06:43 raspberrypi homebridge[26667]: [22.7.2022, 14:06:43] Loaded plugin: homebridge-config-ui-x@4.50.0
Jul 22 14:06:43 raspberrypi homebridge[26667]: [22.7.2022, 14:06:43] Registering platform 'homebridge-config-ui-x.config'
Jul 22 14:06:43 raspberrypi homebridge[26667]: [22.7.2022, 14:06:43] ---
Jul 22 14:06:44 raspberrypi homebridge[26667]: [22.7.2022, 14:06:44] Loaded plugin: homebridge-daikin-cloud@1.3.1
Jul 22 14:06:44 raspberrypi homebridge[26667]: [22.7.2022, 14:06:44] Registering platform 'homebridge-daikin-cloud.DaikinCloud'
Jul 22 14:06:44 raspberrypi homebridge[26667]: [22.7.2022, 14:06:44] ---
Jul 22 14:06:44 raspberrypi homebridge[26667]: [22.7.2022, 14:06:44] Loaded plugin: homebridge-daikin-local@2022.18.5
Jul 22 14:06:44 raspberrypi homebridge[26667]: [22.7.2022, 14:06:44] Registering accessory 'homebridge-daikin-local.Daikin-Local'
Jul 22 14:06:44 raspberrypi homebridge[26667]: [22.7.2022, 14:06:44] ---
Jul 22 14:07:13 raspberrypi homebridge[26667]: [22.7.2022, 14:07:13] Loading 2 platforms...
Jul 22 14:07:13 raspberrypi homebridge[26667]: [22.7.2022, 14:07:13] [Config] Initializing config platform...
Jul 22 14:07:13 raspberrypi homebridge[26667]: [22.7.2022, 14:07:13] [Config] Spawning homebridge-config-ui-x with PID 26725
Jul 22 14:07:13 raspberrypi homebridge[26667]: [22.7.2022, 14:07:13] [DaikinCloud] Initializing DaikinCloud platform...
Jul 22 14:07:13 raspberrypi homebridge[26667]: [22.7.2022, 14:07:13] Loading 2 accessories...
Jul 22 14:07:13 raspberrypi homebridge[26667]: [22.7.2022, 14:07:13] [Temperature Pool] Initializing mqtt-temperature-tasmota accessory...
Jul 22 14:07:13 raspberrypi homebridge[26667]: [22.7.2022, 14:07:13] [Büro Ventilator] Initializing mqtt-fan-tasmota accessory...
Jul 22 14:07:13 raspberrypi homebridge[26667]: [22.7.2022, 14:07:13] [DaikinCloud] Write/read Daikin Cloud tokenset from /var/homebridge-sonoff/daikincloudtokenset.json
Jul 22 14:07:14 raspberrypi homebridge[26667]: Setup Payload:
Jul 22 14:07:14 raspberrypi homebridge[26667]: X-HM://0023OA6327857
Jul 22 14:07:14 raspberrypi homebridge[26667]: Scan this code with your HomeKit app on your iOS device to pair with Homebridge:
Could you use homebridge-daikin-cloud@1.3.3, I added some catches and extra logging.
Try to find "---------- Daikin info for debugging reasons --------------------" logline and copy paste everything that is bellow please. You can strip other plugin data but [DaikinCloud] lines or anything related can help to debug this.
Jul 22 15:21:18 raspberrypi homebridge[30603]: [22.7.2022, 15:21:18] ---
Jul 22 15:21:19 raspberrypi homebridge[30603]: [22.7.2022, 15:21:19] Loaded plugin: homebridge-daikin-cloud@1.3.3
Jul 22 15:21:19 raspberrypi homebridge[30603]: [22.7.2022, 15:21:19] Registering platform 'homebridge-daikin-cloud.DaikinCloud'
Jul 22 15:21:19 raspberrypi homebridge[30603]: [22.7.2022, 15:21:19] ---Jul 22 15:21:48 raspberrypi homebridge[30603]: [22.7.2022, 15:21:48] [DaikinCloud] ---------- Daikin info for debugging reasons --------------------
Jul 22 15:21:48 raspberrypi homebridge[30603]: [22.7.2022, 15:21:48] [DaikinCloud] Write/read Daikin Cloud tokenset from /var/homebridge-sonoff/daikincloudtokenset.json
Jul 22 15:21:49 raspberrypi homebridge[30603]: [22.7.2022, 15:21:49] [DaikinCloud] Failed to get cloud devices from Daikin Cloud: Failed to login to Daikin Cloud with MYMAILADDRESS: Error trying to reach initial URL: connect ECONNREFUSED 127.0.0.1:443
Jul 22 15:21:49 raspberrypi homebridge[30603]: [22.7.2022, 15:21:49] [DaikinCloud] ---------- End Daikin info for debugging reasons ---------------
Can you post the contents of your hosts file? Does it at least contains:
127.0.0.1 localhost
What is your node and OS version?
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.1.1 raspberrypi
Nodejs is 14.19.3 OS is Raspbian GNU/Linux Stretch (9)
I'm afraid I can't really help. I'm think it might be a system problem. I posted your issue to https://github.com/Apollon77/daikin-controller-cloud. Maybe Apollon has an idea.
Ok. Looking forward to get some feedback on that channel. Thank you very much for your help and quick responses so far.
Please execute
dig daikin-unicloud-prod.auth.eu-west-1.amazoncognito.com
on your host ... FOr me it seems that your DNS somehow has issues with the correct DNS lookup ...
"dig" not known
try
ping dig daikin-unicloud-prod.auth.eu-west-1.amazoncognito.com
Just executed sudo apt-get install dnsutils
Afterwards dig daikin-unicloud-prod.auth.eu-west-1.amazoncognito.com
brings this result
; <<>> DiG 9.10.3-P4-Raspbian <<>> daikin-unicloud-prod.auth.eu-west-1.amazoncognito.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 49673
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;daikin-unicloud-prod.auth.eu-west-1.amazoncognito.com. IN A
;; ANSWER SECTION:
daikin-unicloud-prod.auth.eu-west-1.amazoncognito.com. 60 IN A 63.32.122.247
daikin-unicloud-prod.auth.eu-west-1.amazoncognito.com. 60 IN A 34.250.120.205
daikin-unicloud-prod.auth.eu-west-1.amazoncognito.com. 60 IN A 52.213.195.3
;; Query time: 135 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Fri Jul 22 16:41:24 CEST 2022
;; MSG SIZE rcvd: 130
Now it looks like this
Jul 22 16:42:11 raspberrypi homebridge[6747]: [22.7.2022, 16:42:11] [DaikinCloud] Initializing DaikinCloud platform...
Jul 22 16:42:11 raspberrypi homebridge[6747]: [22.7.2022, 16:42:11] Loading 2 accessories...
Jul 22 16:42:11 raspberrypi homebridge[6747]: [22.7.2022, 16:42:11] [Temperature Pool] Initializing mqtt-temperature-tasmota accessory...
Jul 22 16:42:12 raspberrypi homebridge[6747]: [22.7.2022, 16:42:12] [Büro Ventilator] Initializing mqtt-fan-tasmota accessory...
Jul 22 16:42:12 raspberrypi homebridge[6747]: [22.7.2022, 16:42:12] [DaikinCloud] ---------- Daikin info for debugging reasons --------------------
Jul 22 16:42:12 raspberrypi homebridge[6747]: [22.7.2022, 16:42:12] [DaikinCloud] Write/read Daikin Cloud tokenset from /var/homebridge-sonoff/daikincloudtokenset.json
Jul 22 16:42:13 raspberrypi homebridge[6747]: [22.7.2022, 16:42:13] [DaikinCloud] Failed to get cloud devices from Daikin Cloud: Failed to login to Daikin Cloud with MYMAILADDRESS: Error trying to reach initial URL: connect ECONNREFUSED 127.0.0.1:443
Jul 22 16:42:13 raspberrypi homebridge[6747]: [22.7.2022, 16:42:13] [DaikinCloud] ---------- End Daikin info for debugging reasons ---------------
No change
try
ping dig daikin-unicloud-prod.auth.eu-west-1.amazoncognito.com
ping: dig: Der Name oder der Dienst ist nicht bekannt
I copied wrong so correct would be just ping, but the dig is showing that it looks up good in general.
In fact he tries to reach https://daikin-unicloud-prod.auth.eu-west-1.amazoncognito.com/oauth2/authorize with some parameters
Please install curl and show output of
curl -v https://daikin-unicloud-prod.auth.eu-west-1.amazoncognito.com/oauth2/authorize
(and please do all that - also above - on the host where the homebridge is running!! Not anywhere else!
pi@raspberrypi:~ $ curl -v https://daikin-unicloud-prod.auth.eu-west-1.amazoncognito.com/oauth2/authorize
* Trying 34.250.120.205...
* TCP_NODELAY set
* Connected to daikin-unicloud-prod.auth.eu-west-1.amazoncognito.com (34.250.120.205) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server accepted to use h2
* Server certificate:
* subject: CN=*.auth.eu-west-1.amazoncognito.com
* start date: Feb 27 00:00:00 2022 GMT
* expire date: Mar 28 23:59:59 2023 GMT
* subjectAltName: host "daikin-unicloud-prod.auth.eu-west-1.amazoncognito.com" matched cert's "*.auth.eu-west-1.amazoncognito.com"
* issuer: C=US; O=Amazon; OU=Server CA 1B; CN=Amazon
* SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x5f9ed8)
> GET /oauth2/authorize HTTP/1.1
> Host: daikin-unicloud-prod.auth.eu-west-1.amazoncognito.com
> User-Agent: curl/7.52.1
> Accept: */*
>
* Connection state changed (MAX_CONCURRENT_STREAMS updated)!
< HTTP/2 302
< date: Fri, 22 Jul 2022 16:32:33 GMT
< content-length: 0
< location: https://daikin-unicloud-prod.auth.eu-west-1.amazoncognito.com/error?error=Required+parameters+missing
< set-cookie: XSRF-TOKEN=24cc1ac6-3cd5-4c2d-89c7-6b0332fb27b4; Path=/; Secure; HttpOnly; SameSite=Lax
< x-amz-cognito-request-id: f878028c-1a30-4633-ba23-ed8290e75627
< x-application-context: application:prod:8443
< x-content-type-options: nosniff
< x-xss-protection: 1; mode=block
< cache-control: no-cache, no-store, max-age=0, must-revalidate
< pragma: no-cache
< expires: 0
< strict-transport-security: max-age=31536000 ; includeSubDomains
< x-frame-options: DENY
< server: Server
<
* Curl_http_done: called premature == 0
* Connection #0 to host daikin-unicloud-prod.auth.eu-west-1.amazoncognito.com left intact
This looks as expected ... then honestly I have no idea why he acts that way just for you ... do you have any other computer to try that out?
Other instances on the same raspberry - but with the same result. In the meanwhile I upgraded nodes to 16.16. and python to 3.10.5 and learned a bit about insecure-http-parser in nodejs. But so far no progress here.
Aug 02 15:37:44 raspberrypi homebridge[4943]: [2.8.2022, 15:37:44] [DaikinCloud] Initializing DaikinCloud platform...
Aug 02 15:37:44 raspberrypi homebridge[4943]: [2.8.2022, 15:37:44] [DaikinCloud] ---------- Daikin info for debugging reasons --------------------
Aug 02 15:37:44 raspberrypi homebridge[4943]: [2.8.2022, 15:37:44] [DaikinCloud] Write/read Daikin Cloud tokenset from /var/homebridge-sonoff/daikincloudtokenset.json
Aug 02 15:37:46 raspberrypi homebridge[4943]: [2.8.2022, 15:37:46] [DaikinCloud] Failed to get cloud devices from Daikin Cloud: Failed to login to Daikin Cloud with MYMAILADDRESS: Error trying to reach initial URL: connect ECONNREFUSED 127.0.0.1:443
Aug 02 15:37:46 raspberrypi homebridge[4943]: [2.8.2022, 15:37:46] [DaikinCloud] ---------- End Daikin info for debugging reasons ---------------
Are special characters in the password a problem. I'm using an ' in it. I noticed an issue here in the past with other platforms.
Should normally not because the very first request already fails where the password is not used at all .... but try to change it - then we know for sure.
No effect, you were right.
@Scream4Life FYI: #21 had some similar issue, not being able to connect to the authentication domain. The problem here was that the user had a Pi-Hole running that was blocking the connection.
No PiHole running on my side. But thanks for updating. I will do so as well.
It seems to work now with my two BRP069C4x and one BRP069B4x devices. Actually a separate Raspberry did the job. When I compare the differences via Homebridge UI I see that the "new" instance is logged in with User "pi" whereas by "old" Raspberry with separate instances on it is running with User "root".
Further differences in the homebridge config for sure are the username, port and PIN of the bridge itself. But I don't think that these last points are relevant.
But what do you think about the different user. And I have no idea how to change that.
Actually I would prefer using the old Raspberry so I would not see the issue itself fixed. But for now I can work with that.
Describe Your Problem: There isn't any device showing up from this plugin, unless I have two BRP069C4X and one BRP069B4x (last one with online module) in my account. Any idea why nothing is shown?
Logs: When the home bridge is ready loaded after the QR code this is shown from the plugin
Plugin Config:
Environment: