loading

Sensly is a portable pollution sensor capable of detecting the pollution levels in the air using its onboard gas sensors to collect information about the various gases present. This information can be fed directly to your smartphone for real-time push notification updates. Sensly uses industrial sensors that assure an accurate reading of the office, home, or work environment. Being aware of this data helps you to take action and bring the pollution levels down around you.
Our team at Altitude Tech LTD are big fans of the Raspberry Pi mini computer. We’re really keen to help the Raspberry Pi community develop their own Sensly device and start working on experiments whilst learning about different types of gases. We’ve developed the Sensly Hat for the Raspberry Pi.

This is the section for all you graph lovers out there.

To buy or find out more https://store.altitude.tech/

To set up your Sensly head over to our first instructables and follow the instructions up till step 6. Once calibrated run the update.sh script to take Sensly out of calibration mode.

  • $ cd /path/to/Sensly_Install
  • $ sudo ./update.sh

Step 1: Creating a Plotly Account and Getting Your Credentials

Next we need to create a plotly account. Head over to plot.ly to do this.

Once you’re done you need to head over to the settings to get your username, API key and streaming tokens. You’ll need 11 streaming tokens.

Step 2: Update the Config.json File

To set up Sensly to log directly to plotly we need to first of all download the required files. These can be found at https://github.com/Altitude-Tech/Sensly_Plotly, to download these files on your pi, open the terminal and type the command

Once you get your API Keys and Streaming Tokens we need to put these into your config.json file which is found in the Sensly Plotly file you downloaded at the start of this instructable.

  • $ sudo nano /Path/To/Sensly_Plotly/config.json

Add your username, API_Key and streaming tokens to the file

Step 3: Run the Sensly_Plotly Script

Next, we need to ensure that you have put the R0 values you obtained during calibration into the Sensly_Plotly.py script you put them in the area shown in the first picture.

Make sure you are connected to the internet then press f5 to run the script, if successful your pi should open a web browser and start logging Sensly data to the web. The graph on the left hand side is the gases being detected and the graph on the right hand side is the particulate matter being detected.

Step 4: Finishing Up

Finally if you would like this script to run at boot then we run the crontab command.

  • $ crontab -e

Add this to the bottom of the file.

  • $ @reboot python /path/to/Sensly_Plotly.py
<p>Hello! I was trying to follow along with this tutorial but in Step 3 I am getting a 404 error from Plot.ly. Attached is a picture of my error. Please Help!</p>
<p>Hi SruthiK2, Do you get an error from the python script? and have you tried logging on to your Plot.ly account on another computer?</p>
<p>Dear AltitudeTech,</p><p>Yes I have gotten an error from the Python Script which is the error I posted earlier and I have tried to logon to my Plot.ly account from another computer.</p>
Hi, using the Sensly image for raspberry pi and installed Sensly Plotly. I think i've configured everything properly, but I get the 404 error (see photo). I've double checked all the stream tokens and even replaced the PPM one. But still it keeps giving this error. Can you help me debug it?
<p>Both of the instructables for Sensly I am having issues with the crontab step. I follow the instructions to add the commands to run the calibration or the Plotly python script at reboot but neither one is working. What am I doing wrong? I am using the Sensly.img that was provided.</p>
<p>Hi jbrannon80 could you please post the exact command you put in cron tab and also the path to the Sensly_plotly file </p>
<p>I am having the same issue with the 404 error returned by Plot.ly as mentioned below. I have verified that my streamtoken is correct but I still receive this error. </p>
<p>Hi jbrannon80, Do you get an error from the python script? and have you <br>tried logging on to your Plot.ly account on another computer?</p>

About This Instructable

568views

4favorites

License:

Bio: Altitude Tech LTD is founded by professionals and students in the area of robotics, electronics and product design, which makes the team the heart of ... More »
More by AltitudeTech:Plotly Graph for Sensly The Raspberry Pi Hat PiAnywhere 4G & LTE Hat for the Raspberry Pi  Sensly Hat For The Raspberry Pi Air Quality & Gas Detector  
Add instructable to: