node-tradfri-client icon indicating copy to clipboard operation
node-tradfri-client copied to clipboard

Retry connection with IP address if hostname does not work and vice versa

Open AlCalzone opened this issue 7 years ago • 3 comments

AlCalzone avatar Jul 08 '18 17:07 AlCalzone

With latest version as of now (2.1.4) I am getting error when trying to connect using hostname:

2020-04-12T19:13:37.487Z Found TRADFRI: TRADFRI-Gateway-4491603161db.local, gw-4491603161db, 1.10.30
2020-04-12T19:13:37.487Z Authenticating with gateway, security code <REDACTED>
2020-04-12T19:13:37.498Z [ERROR] Something went wrong... Error: No security parameters given for the resource at coaps://tradfri-gateway-4491603161db.local:5684

When I resolve the hostname to IP and use it for connecting it works fine and I am getting the credentials. Is this something related to this enhancement?

tomekc avatar Apr 12 '20 19:04 tomekc

Maybe you've found the underlying issue. The params are set for TRADFRI-Gateway-4491603161db.local, but the connection code tries to find them for the lowercase variant tradfri-gateway-4491603161db.local.

AlCalzone avatar Apr 13 '20 09:04 AlCalzone

v2.1.5 will be released in a couple of minutes. Please try that one.

AlCalzone avatar Apr 13 '20 09:04 AlCalzone