Expandmenu Shrunk


node-red


 


——————————————————————————————
sudo npm install -g vtop

——————————————————————————————

Log file; /var/log/node-red
node-red.err and node-red.log

——————————————————————————————

Older than 2016 notes. Use with caution. 

Notes on installing and using Node-RED.

Install the latest version of nodejs, this is important.
sudo apt-get update
sudo apt-get install -y python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js[[BR]] sudo apt-get update
sudo apt-get install nodejs

Get the latest node-red
wget  https://github.com/node-red/node-red/archive/0.5.0.zip

unzip 0.5.0.zip

sudo apt-get install npm

sudo git clone  https://github.com/node-red/node-red.git[[BR]] sudo npm install –production
cd nodes/
sudo git clone  https://github.com/node-red/node-red-nodes.git[[BR]]

For the lazy, rip the working version of internetio or beno.id.au
sudo scp -P 2204 -r -v /var/www/nodered/*  ben@beno.id.au:/var/www/nodered

 https://www.meethue.com/api/nupnp


——————————————————————————————
sudo apt-get update sudo apt-get install mosquitto python-mosquitto sudo apt-get install mosquitto-clients

In one putty window: mosquitto_sub -d -t hello/world

In another putty window: mosquitto_pub -d -t hello/world -m “Hello, MQTT. This is my first message.”



——————————————————————————————

sensortag install

apt-get instal libbluetooth-dev bluez

Plug your BTLE USB dongle into your Linux PC.
Check it with ‘lsusb’ and ‘dmesg’ to make sure that the device has loaded Ok.
(One of the USB dongles I got did not load the firmware (the listing on Amazon.com said it was Linux compatiable, its not, well, at least not out of the box. I needed to compile and load a new driver for it on my Ubuntu 12.04 LTS)

Next install the TI SensorTag? app on a compatible Android or iOS device.
Run the app and bind to the device.
Make a note of the UUID of the device.
Have a little play with the device in the app, its pretty cool.

Then sudo node red.js
(You need to run as sudo to get the BTLE drivers to work).

Add the sensortag Node. (I also added a debug Node so I could see the output).
Put the UUID of the device in the sensortag Node (it will not work with it blank).

Press the bind button the side of the tag. Then hit deploy in Node-RED
(Note, you have to do it this way, Node-RED only binds with the device when it is started or deployed).

You should be up and running with a stream of data in the debug tab.