Step by step manual for getting started with Shiftr.io (Software), Shiftr.io Pocket and Processing
Step 1 – Set up shiftr.io
Create an acount on shiftr.io, and follow the instructions on the getting started page to create a new namespace and a new token.
Additionally, download and install the desktop app.
Step 2 – Set up Processing
Also you need to make sure that you're running the latest version of Processing. If you have an old version or haven’t Processing installed at all, get it from their website.
Afterwards, download the processing-mqtt library from the GitHub repository. When the download has finished, move the library to your sketch folders libraries
directory. More information about installing a library can be found here.
To verify that everything worked as expected, go to Files > Examples
and open the MQTT > PublishSubscribe
example. This example sketch will connect to the try namespace and send a hello world message on every keypress.
Run the example and check the console for the following line: [MQTT] connected to: broker.shiftr.io
. If you see the connected client and the messages flowing in the real-time graph, you are ready to go!
Step 3 – Shiftr.io Desktop
Please choose your device by clicking on the Shiftr.io icon in your menu bar. In this example it's pocket (p11).
Wifi:
Use the name and password of your connected wifi. In this example, we're using an iPhone hotspot. Don't forget to press Configure.
MQTT:
The Host field needs your IP-adress, the is MQTT Port is usually 1883 and the Client ID is your connected device. Because we're using the try namespace, the Username and Password is both «try».
Device:
Make sure you've got the right Device Name and Base Topic. Usually it's the same as your Client ID.
Parameters:
Here you can choose which sensors should be activated. Remember that having multiple sensors active can make your battery unload faster.
Step XX – Store data (draft)
See the script from Joël