Can not install node-red-contrib-ttn on bluemix


(Elobau) #1

Hallo

I would like to use node-red on IBM bluemix with the TTN node but the installation fails each time. It is possible to install every other node but not the node-red-contrib-ttn from @johan.

node%20red%20fail
node%20red%20fail%20log

Has anybody an idea to fix this?
Thanks in advance!


#2

here is explained howto Configure Node-RED on Bluemix to Receive data from TTN … maybe it helps


(Elobau) #3

Thanks for your quik answer but unfortunately it doesn´t help. It´s the way I´ve done it until the error massages appeared.
Any other possibilities?


#4

Possibly the issue is due to the changes made in the ttn node names, instead of ‘device’ and ‘message’, we now have ‘event’, ‘uplink’ and ‘downlink’. I updated my LABS example to reflect this, but I think that all other examples and tutorials show the original nodes.

Can I suggest you try to install the legacy version of node-red-contrib-ttn?

https://flows.nodered.org/node/node-red-contrib-ttn - “…NOTE: For the deprecated staging environment use version 1.0.0: npm i node-red-contrib-ttn@1.0.0…”


(Elobau) #5

Thanks for that, but:

  1. if I connect to the node-red instance at bluemix via SSH I see that there are node-red files but neither node.js nor npm is installed
  2. To install node.js I would need root rights which I don´t have as far as I know

So this suggestion doesn´t work as well.

Node-Red would be a perfekt start for my projekt so a solution for that problem is important for me…


#6

Can you get the entire error log here? That is basically expanding the errors that Node-RED throws.


#7

The following steps worked for me:

  • Enable Continuous integration of your Cloud Foundry App in IBM BlueMix
  • This gives you ‘git’ access to your code.
  • Starting ‘Git’ will give you the fileset of your instance
  • Change ‘package.json’ and add the ’ “node-red-contrib-ttn”:“2.x” line at the end.
  • Node-Red will be rebuild and restarted (be patient here).
  • 2.0.4 will be available
  • I had to add some memory to my instance (768M was needed), may be because of Worldmap and Dashboard.

I am working on a tuturial with some screenshots, but may be this is a start.


(Elobau) #8

Yes, this works!
Thanks!


#9

image The IBM BlueMix ‘free’ offering only allows 512MB per instance (or 375 GB/hours a month) for free. You may change the 'manifest.yml and use 512MB for your instance. If you clean-up the libraries (remove the unused ones), node-red will run.


(Lucasng) #10

It looks like that IBM changes “free” quotas based on regions.
For example “UK” the “boilerplates” Node-RED starter or Watson IoT starter have 256 Mb of memory free (node.js sdk “lite” plan), but a 1 Gb of disk quota.


#11

Hi, if i change my region I still have this 512mb ‘lite’ offering, UK or US deployment, pricing for different regions just change on the currency. May be a some stop for new customers?image Took me some time to get NodeRed run stable in 512, so 256 would be useless IMO.


(Lucasng) #12

These are the IBM plans for the SDK Node.js that they propose with boilerplate “Internet of Things Platform Starter” = “Internet of Things Platform”, “Cloudant NoSQL database” and “SDK for Node.js” that includes already installed Node-RED + and example tied to their IoT platform.
SDK Node.js plans for UK region -> Italy.
immagine

And the “funny” thing is that, for example, You activate “Continuous delivery” to do the workaround for ttn node installatyion that You posted and launch it (it failed), but than go back and delete that additional line of configuration and commit … the compilation, … goes well, but than it cannot even start the application since goes out of memory :slight_smile:


#13

Hi Lucas, THe pricing plan is obviously the same for every starting user (and region), but changed the last year. You get 256MB. If you register (with your creditcard) it is possible to go to 512MB. But I managed to install Node-RED starter (that was the package I used), 256MB, continuous delivery, TTN and Worldmap, and it works (without credit card :smile:). Will adjust my labs story and create another one for using TTN on Node-RED / Blue Mix
image


#14

image
This is the message IBM Cloud is showing. Great, these ‘unexpected errors’. But there must be something wrong in the NPM package? More info is not given, the workaround works, but is not that easy so would be helpful to have a look at this. Thnx


(Giovanni Comunello Junior) #15

I had the same problem and this tip works for me too!!!

Thanks @galagaking!!!


(Cattlenet) #16

WORKED FOR MEEEEEEE!!! GREAT:grin:


#17

Thanks!
For the benefit of others - I did something like this - hopefully someone can write this up better.

  • Create a Blumix account https://www.ibm.com/cloud/
  • Go to Dashboard
  • Click “Create Resource” (if this is your first app, you won’t see this page, go to next step)
  • In the search bar, enter “node-red” and select “Node-Red starter(lite)”
  • Enter basic details e.g. name and press “create”
  • Goto Dashboard (via top left 3 strike menu bar)
  • Single click your now running Cloud Foundary App (node red)
  • Scroll bottom right and select “continuous delivery”
  • When you are viewing the tool chain, press the “git” option under “code”
  • Maintain “package.json” file by adding "node-red-contrib-ttn":"2.x", near the end
  • Click back until you can get to dashboard again (via top left 3 strike menu bar)
  • Single click your Cloud Foundary App (node red) when it finishes rebooting
  • Click “Visit App url” and set up node red

(Jopr) #19

Thanks for this answer, it is really helpful. A minor addition to the steps is that while creating the GIT repository you’ll have to choose the ‘clone’ option to get the source code in your own repository.