+ All Categories
Home > Technology > Linking Raspberry PI with our device through IBM Bluemix

Linking Raspberry PI with our device through IBM Bluemix

Date post: 21-Jan-2018
Category:
Upload: azilen-technologies-pvt-ltd
View: 2,079 times
Download: 0 times
Share this document with a friend
14
www.azilen.com Linking Raspberry PI with our device through IBM Bluemix
Transcript
Page 1: Linking Raspberry PI with our device through IBM Bluemix

www.azilen.com

Linking Raspberry PI with our device through

IBM Bluemix

Page 2: Linking Raspberry PI with our device through IBM Bluemix

www.azilen.com 01

1. To link the Raspberry PI with your virtual device in IBM Bluemix, first of

all you need to IoT service running in Raspberry pi. Run the below

command to stop it.

sudo service iot stop

2. Type the below command to device configuration file.

sudo nano /etc/iotsample-raspberrypi/device.cfg

Page 3: Linking Raspberry PI with our device through IBM Bluemix

www.azilen.com 02

3. Copy and paste the device information to device.cfg file. You have received this

information while getting registered with IBM Bluemix.

#Device configuration file

org = p29vg0

type = RaspberryPI3

id = PiBrain

auth-method = token

auth-token = 3*)DPXWa+NFQl&Zgjs

#End of Configuration file

Page 4: Linking Raspberry PI with our device through IBM Bluemix

www.azilen.com 02

4. The newer version of Raspberry PI has already come up with Node-RED and

Watson IoT. If you are using the newer version, run following command to update

Raspberry PI

sudo apt-get update

sudo apt-get dist-upgrade

5. Type below command to start Node-RED.

node-red

Page 5: Linking Raspberry PI with our device through IBM Bluemix

www.azilen.com 03

6. Once your node-red server has started, you can see it from below url.

Page 6: Linking Raspberry PI with our device through IBM Bluemix

www.azilen.com 04

7. IBM offers set of nodes that we can use potentially. Open below url and

copy JSON from it.

https://raw.githubusercontent.com/ibm-messaging/iot-device-

samples/master/node-red/device-sample/quickstart.json

Page 7: Linking Raspberry PI with our device through IBM Bluemix

www.azilen.com 05

8. In Node-RED editor go to Menu >> Import >> Clipboard

Page 8: Linking Raspberry PI with our device through IBM Bluemix

www.azilen.com 06

9. Paste JSON value to import nodes

Page 9: Linking Raspberry PI with our device through IBM Bluemix

www.azilen.com 07

10. Double click on Event node

Page 10: Linking Raspberry PI with our device through IBM Bluemix

www.azilen.com 08

11. A pop-up will appear, select “Registered” radio button and click on edit button.

Page 11: Linking Raspberry PI with our device through IBM Bluemix

www.azilen.com 09

12. Add the data which have configured in our device.cfg file.

Page 12: Linking Raspberry PI with our device through IBM Bluemix

www.azilen.com 10

13. Click on “Add” button to save the data which help to connect toIBM Bluemix.14. Click on “Deploy” button to connect your device with IBM.

Page 13: Linking Raspberry PI with our device through IBM Bluemix

www.azilen.com 11

15. Now your device is connected.

Page 14: Linking Raspberry PI with our device through IBM Bluemix

www.azilen.com 12

You can conform the connection status through device listing


Recommended