rickymarcon / homebridge-daikin

A Homebridge plugin for Daikin.
https://www.npmjs.com/package/homebridge-daikin-unofficial
MIT License
13 stars 2 forks source link

BRP072C42 not connecting #5

Open mirzanurkic opened 4 years ago

mirzanurkic commented 4 years ago

Hi there!

I have a BRP071C42 that I can't get to connect. I've registered the UUID with the key from the back of the unit, and that's worked fine. I'm also able to access the API endpoints from my terminal, but Homebridge gives me this error:

(node:2559) UnhandledPromiseRejectionWarning: RequestError: Error: Invalid URI "192.168.1.30/aircon/get_model_info" at new RequestError (/homebridge/node_modules/homebridge-daikin-unofficial/node_modules/request-promise-core/lib/errors.js:14:15) at Request.plumbing.callback (/homebridge/node_modules/homebridge-daikin-unofficial/node_modules/request-promise-core/lib/plumbing.js:87:29) at Request.RP$callback [as _callback] (/homebridge/node_modules/homebridge-daikin-unofficial/node_modules/request-promise-core/lib/plumbing.js:46:31) at self.callback (/homebridge/node_modules/homebridge-daikin-unofficial/node_modules/request/request.js:185:22) at Request.emit (events.js:315:20) at Request.init (/homebridge/node_modules/homebridge-daikin-unofficial/node_modules/request/request.js:273:17) at Request.RP$initInterceptor [as init] (/homebridge/node_modules/homebridge-daikin-unofficial/node_modules/request-promise-core/configure/request2.js:45:29) at new Request (/homebridge/node_modules/homebridge-daikin-unofficial/node_modules/request/request.js:127:8) at request (/homebridge/node_modules/homebridge-daikin-unofficial/node_modules/request/index.js:53:10) at DaikinApi.getModelInfo (/homebridge/node_modules/homebridge-daikin-unofficial/dist/index.js:88:32) at DaikinAccessory.getModelInfo (/homebridge/node_modules/homebridge-daikin-unofficial/dist/index.js:274:42) at new DaikinAccessory (/homebridge/node_modules/homebridge-daikin-unofficial/dist/index.js:266:14) at /usr/local/lib/node_modules/homebridge/src/server.ts:357:50 at Array.forEach (<anonymous>) at Server._loadAccessories (/usr/local/lib/node_modules/homebridge/src/server.ts:330:29) at Server.start (/usr/local/lib/node_modules/homebridge/src/server.ts:156:12) at cli (/usr/local/lib/node_modules/homebridge/src/cli.ts:80:10) at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22) at Module._compile (internal/modules/cjs/loader.js:1138:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10) at Module.load (internal/modules/cjs/loader.js:986:32) at Function.Module._load (internal/modules/cjs/loader.js:879:14) (node:2559) 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) (node:2559) [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.

It's weird, because I can access the get_model_info endpoint manually just fine:

➜ curl --insecure -X GET "https://192.168.1.30/aircon/get_model_info" \ -H "X-Daikin-uuid:[my-uuid-here]" ret=OK,model=0C87,type=N,pv=2,cpv=2,cpv_minor=00,mid=NA,humd=0,s_humd=0,acled=0,land=0,elec=0,temp=1,temp_rng=0,m_dtct=1,ac_dst=--,disp_dry=0,dmnd=0,en_scdltmr=1,en_frate=1,en_fdir=1,s_fdir=3,en_rtemp_a=0,en_spmode=0,en_ipw_sep=0,en_mompow=0,en_patrol=0,en_fdir2=0,en_filter_sign=0%

Any ideas why this might be? Even a pointer or two would be greatly appreciated. Thank you! :)

jl-tech commented 3 years ago

If you haven't resolved this yet, I managed to fix this by adding https:// before the host IP address.

vhardono commented 3 years ago

@jl-tech thanks, it works but i noticed that the process getting the value from AC take a while resulting frequent "No Response" in Homekit. Is there a workaround to prolong the wait time to avoid getting "No Response" in Homekit?

mirzanurkic commented 3 years ago

@jl-tech thank you, that was just the ticket!