Coder Social home page Coder Social logo

Comments (8)

AlCalzone avatar AlCalzone commented on August 26, 2024

could it be, that this error message is wrong?

Maybe. To confirm please run your script with the following command-line and post the logs here:

# on linux:
DEBUG=node-*-client node main.js
# on Windows:
set DEBUG=node-*-client && node main.js

where main.js is your script name.

from node-tradfri-client.

neophob avatar neophob commented on August 26, 2024

jep just did that:

  node-tradfri-client [DEBUG] Attempting connection. Identity = Client_identityfoo, psk = <redacted>, this.requestBase = coaps://gw-a0xx...:5684/ +4ms
  node-coap-client getConnection(coaps://gw-a0xx...:5684) => establishing new connection +4ms
  node-coap-client socket creation for origin coaps://gw-a0xx...:5684 failed: Error: getaddrinfo ENOTFOUND gw-a0xx... +11ms
  node-coap-client socket creation for origin coaps://gw-a0xx...:5684 failed: Error: getaddrinfo ENOTFOUND gw-a0xx... +2ms
  node-coap-client socket creation for origin coaps://gw-a0xx...:5684 failed: Error: getaddrinfo ENOTFOUND gw-a0xx... +1ms
  node-coap-client tryToConnect(coaps://gw-a0xx...:5684) => failed with error: Error: getaddrinfo ENOTFOUND gw-a0xx... +0ms
  node-tradfri-client [DEBUG] Connection failed. Reason: timeout +15ms

The (unconfigured) gateway works - at least the ios app can connect

from node-tradfri-client.

AlCalzone avatar AlCalzone commented on August 26, 2024

Well, the gateway is actually not being found. Try the IP address, afaik some users have trouble connecting by hostname, while some have trouble connecting by IP - might be related to the gateway revision.

from node-tradfri-client.

neophob avatar neophob commented on August 26, 2024

Firmware version is - according to the mdns record v1.3.14.
You was right, connecting with the ip works like a charm.... wtf.

ping the gateway with the name does not work (also not using the .local suffix). now thats weird, i'll check with a second gateway where this worked.

I'll give feedback as soon as I know more.

from node-tradfri-client.

neophob avatar neophob commented on August 26, 2024

Just one wild guess, running discovery, the gateway returns addresses: [ '10.0.0.94', 'fe80::a2cc:2bff:fef8:535d' ] } - it looks like it exposes its link-local ipv6 address, that might be an actual bug on the gateway

from node-tradfri-client.

AlCalzone avatar AlCalzone commented on August 26, 2024

it exposes its link-local ipv6 address, that might be an actual bug on the gateway

Mine does that too, but it only sends that to my PC's IPv6 address, so the current discovery doesn't work. What's the problem with exposing the IPv6 address? I'm not too familiar with that.

from node-tradfri-client.

neophob avatar neophob commented on August 26, 2024

not sure, but the "fe80::" address is a link-local address (think the 127.0.0.1 of ipv6). so it might be that the name is mapped either to the working ipv4 address or to the non working ipv6 address. its not defined who "wins" when you query the name, so name resolution might work or not.
as a current workaround, I guess I stick to using the ipv4 address - then it at least works as long no ip change happens.

from node-tradfri-client.

neophob avatar neophob commented on August 26, 2024

ok, second gateway works without any issues (ping gw-a0cc.. works, so is ping ip).

-> guess thats related to the gateway firmware

from node-tradfri-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.