TheThingsArchive / nodered-app-node

Node-RED Library for TTN Applications
https://www.thethingsnetwork.org/docs/node-red/
MIT License
21 stars 14 forks source link

uplink node not connecting #45

Closed ismangil closed 6 years ago

ismangil commented 6 years ago

I've configured the TTN app, with access key, and deployed the flow. However it is not showing as connecting, and nothing comes on the debug.

Where can I look further to diagnose this?

johanstokking commented 6 years ago

What does the Node-RED cli output say?

Are you on the right region?

ismangil commented 6 years ago

How do I set the region/tell which region am I in currently?

Node-RED cli:

Welcome to Node-RED
===================

31 May 13:22:10 - [info] Node-RED version: v0.18.7
31 May 13:22:10 - [info] Node.js  version: v10.3.0
31 May 13:22:10 - [info] Darwin 17.5.0 x64 LE
31 May 13:22:10 - [info] Loading palette nodes
31 May 13:22:13 - [warn] ------------------------------------------------------
31 May 13:22:13 - [warn] [node-red/rpi-gpio] Info : Ignoring Raspberry Pi specific node
31 May 13:22:13 - [warn] ------------------------------------------------------
31 May 13:22:13 - [info] Settings file  : /Users/perry/.node-red/settings.js
31 May 13:22:13 - [info] User directory : /Users/perry/.node-red
31 May 13:22:13 - [warn] Projects disabled : set editorTheme.projects.enabled=true to enable
31 May 13:22:13 - [info] Flows file     : /Users/perry/.node-red/flows_Perrys-Air.json
31 May 13:22:13 - [warn] 

---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------

31 May 13:22:13 - [info] Starting flows
31 May 13:22:13 - [info] Started flows
31 May 13:22:13 - [info] Server now running at http://127.0.0.1:1880/
johanstokking commented 6 years ago

It seems like we have problems with Node 10. Can you test on 8 or 9?

ismangil commented 6 years ago

On the app definition my discovery is set to:

discovery.thethingsnetwork.org:1900

Node 8 - still nothing happening

Welcome to Node-RED
===================

1 Jun 14:47:26 - [info] Node-RED version: v0.18.7
1 Jun 14:47:26 - [info] Node.js  version: v8.11.2
1 Jun 14:47:26 - [info] Darwin 17.5.0 x64 LE
1 Jun 14:47:28 - [info] Loading palette nodes
1 Jun 14:47:32 - [warn] ------------------------------------------------------
1 Jun 14:47:32 - [warn] [node-red/rpi-gpio] Info : Ignoring Raspberry Pi specific node
1 Jun 14:47:32 - [warn] ------------------------------------------------------
1 Jun 14:47:32 - [info] Settings file  : /Users/perry/.node-red/settings.js
1 Jun 14:47:32 - [info] User directory : /Users/perry/.node-red
1 Jun 14:47:32 - [warn] Projects disabled : set editorTheme.projects.enabled=true to enable
1 Jun 14:47:32 - [info] Flows file     : /Users/perry/.node-red/flows_Perrys-Air.json
1 Jun 14:47:33 - [info] Server now running at http://127.0.0.1:1880/
1 Jun 14:47:33 - [warn] 

---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------

1 Jun 14:47:33 - [info] Starting flows
1 Jun 14:47:33 - [info] Started flows
1 Jun 14:48:51 - [info] Stopping flows
1 Jun 14:48:51 - [info] Stopped flows
1 Jun 14:48:51 - [info] Starting flows
1 Jun 14:48:51 - [info] Started flows
1 Jun 14:49:16 - [info] Stopping flows
1 Jun 14:49:16 - [info] Stopped flows
1 Jun 14:49:16 - [info] Starting flows
1 Jun 14:49:16 - [info] Started flows
johanstokking commented 6 years ago

@ismangil can you follow these steps and tell me where it fails?

  1. Drop ttn uplink node
  2. Edit the application, use app ID johan-dev and demo key ttn-account-v2.Tcdl-SnfNQMaJvy9htjo3k0YlGFitKac4AH-nrroM9A screen shot 2018-06-04 at 13 40 52
  3. Leave Device ID and Field empty
  4. Connect a debug node to it
  5. Click Deploy
  6. Watch the Debug window
screen shot 2018-06-04 at 13 40 07
ismangil commented 6 years ago

@johanstokking all steps done, result:

screen shot 2018-06-05 at 09 00 24

johanstokking commented 6 years ago

You don't see any debug output?

I can't reproduce this issue unfortunately. Typical case of "it works on my machine" ...

ismangil commented 6 years ago

Yes no debug output, no connected flag. OK I'll explore some other way to get Node RED TTN going instead of on my local machine

On Wed, 6 Jun 2018 at 00:35 Johan Stokking notifications@github.com wrote:

You don't see any debug output?

I can't reproduce this issue unfortunately. Typical case of "it works on my machine" ...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/TheThingsNetwork/nodered-app-node/issues/45#issuecomment-394893532, or mute the thread https://github.com/notifications/unsubscribe-auth/AACcZZFqXCrpg6R9M-oD7CXR5Sp8KpYDks5t5xWpgaJpZM4UTrds .

--

Perry Ismangil

johanstokking commented 6 years ago

Great. Please let me know when we can reopen with additional information to resolve.

mhuelsmann commented 6 years ago

Hello, i have the same problem on my server. For 3 months it works without problems. Today it stops and i have no comments in the logs.

before it stopps i have this logfile entries [ttn app:637eb534.e1xxxxx] Connected to TTN application xxxxx

to fix it i have update node-red and reinstall the ttn app, but it doesnt work.

Michael

johanstokking commented 6 years ago

Please file a new issue with full logs @mhuelsmann

msegura19 commented 6 years ago

@mhuelsmann Hi could you fix the problem'? I have node red working on AWS for long time and today stop working ttn uplink, I restarted and update ttn node but nothing happen, no connection. I'm using the last contrib Please I need some tips to see where is the problem?

johanstokking commented 6 years ago

@mjsegurapromatix please file a new issue.

Also provide contextual information there, i.e. which Node.js version, and try with github.com/TheThingsNetwork/node-app-sdk example to see if that works.

msegura19 commented 6 years ago

thanks johan, it came back to work again without any change. So there should be some connection problem between TTN and AWS, thanks for your time