Saturday, April 25, 2015

Connecting my personal Raspberry Pi to IoT Foundation !

As  a startup to my experiments with Raspberry Pi which I bought over the weekend,  I installed the IoT as a service on my home Raspberry Pi as described in this wiki

https://developer.ibm.com/iot/recipes/raspberry-pi/

Notes in red below are outputs after I ran the Foundation's commands /instructions.




On my Raspberry Pi : I first started off with this command.

curl -LO https://github.com/ibm-messaging/iot-raspberrypi/releases/download/1.0.2/iot_1.0-1_armhf.deb
(source code is also available).
Install the package with:
sudo dpkg -i iot_1.0-1_armhf.deb
[
pi@raspberrypi /tmp $ sudo dpkg -i iot_1.0-1_armhf.deb
Selecting previously unselected package iot.
(Reading database ... 77373 files and directories currently installed.)
Unpacking iot (from iot_1.0-1_armhf.deb) ...
Setting up iot (1.0-1) ...
Starting the iot program
]




The iot process starts and publishes events to the IBM Internet of Things Foundation Quickstart.

The process runs as a system service, and starts whenever Raspberry Pi starts.

To verify the process is running, use the command:

service iot status
[
pi@raspberrypi /tmp $ service iot status
[ ok ] iot is running.
]


To visualize

service iot getdeviceid
[
pi@raspberrypi /tmp $ service iot getdeviceid
The device ID is b827eb984666
For Real-time visualization of the data, visit http://quickstart.internetofthings.ibmcloud.com/?deviceId=b827eb984666
]


I entered this device id



and FINALLY !  the Raspberry Pi was identified by the foundation visually.
Below, is my output.





You can stop the iot process with the following command:

sudo service iot stop