madchicken / comelit-client

Simple CLI to interact with Comelit HUB, Vedo and Comelit Serial Bus
Apache License 2.0
23 stars 6 forks source link

https issue v2.2.2 #16

Closed zerostress99 closed 3 years ago

zerostress99 commented 4 years ago

Hi Pierpaolo, just re-tried and it seems that version 2.2.2 not even solved the problem of reachability of the module in HTTPS protocol :-(

C:\Users\zero>comelit-sb --version 2.2.2

C:\Users\zero>comelit-sb -p 443 -h https://192.168.1.252 rooms --list Executing command rooms - {"_":["rooms"],"p":443,"port":443,"h":"https://192.168.1.252","host":"https://192.168.1.252","list":true,"$0":"AppData\\Roaming\\npm\\node_modules\\comelit-client\\dist\\bin\\comelit-sb-cli.js"} (node:16244) UnhandledPromiseRejectionWarning: Error: timeout of 3000ms exceeded at createError (C:\Users\zero\AppData\Roaming\npm\node_modules\comelit-client\node_modules\axios\lib\core\createError.js:16:15) at RedirectableRequest.handleRequestTimeout (C:\Users\zero\AppData\Roaming\npm\node_modules\comelit-client\node_modules\axios\lib\adapters\http.js:264:16) at Object.onceWrapper (events.js:421:28) at RedirectableRequest.emit (events.js:315:20) at Timeout._onTimeout (C:\Users\zero\AppData\Roaming\npm\node_modules\comelit-client\node_modules\follow-redirects\index.js:166:13) at listOnTimeout (internal/timers.js:554:17) at processTimers (internal/timers.js:497:7) (Use node --trace-warnings ... to show where the warning was created) (node:16244) 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: 2) (node:16244) [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.

If I omit the port number leaving just the explicit host name in https format I got these errors because of default port (80)

C:\Users\zero>comelit-sb -h https://192.168.1.252 rooms --list Executing command rooms - {"_":["rooms"],"h":"https://192.168.1.252","host":"https://192.168.1.252","list":true,"port":80,"p":80,"$0":"AppData\\Roaming\\npm\\node_modules\\comelit-client\\dist\\bin\\comelit-sb-cli.js"} (node:10592) UnhandledPromiseRejectionWarning: Error: write EPROTO 8092:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:332:

at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:94:16)

(Use node --trace-warnings ... to show where the warning was created) (node:10592) 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: 2) (node:10592) [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.