RPI Air Quality Sensor

I have a C-5, upgrading to a C-8 pro this week (hopefully)
I have set-up a RPI with a PM Air Quality Sensor
It's output is like {'PM25': 9.8, 'PM10': 18.1}
I set-up a Virtual Multi Sensor Device
I have been trying to send the data to HE but I keep getting a 405 error
I have tried many methods, without success, including Python and Curl

I'm a Linux user

Anyone got any pointers

Thanks
Ger

You need to be more explicit on what you have tried there.

One way of doing this would be to use Maker API and send the data to a virtual device. Easy peasy.

Yea, I tried the Maker API, obviously, but no joy

I suspect i'm not doing something right

Couldn't tell you, since you still aren't posting exactly what you tried. :person_shrugging:

  1. Maker API needs to be added to the hub as an app
  2. The virtual device you want to write to has to be enabled in the Maker API app
  3. Maker API takes an HTTP GET, with all needed info in the header (as shown in the examples). The token can be found in the Maker API app instance.

So for my hub if I wanted to set the Temperature on a virtual omni sensor it would look like:

http://[hub IP address>]/apps/api/[app number for Maker API instance]/devices/[Device ID of virtual Omni sensor]/setTemperature/[temperature value]?access_token=[my Maker API token]

replacing anything in brackets with their appropriate values.

So something like this (with made up IP, add#, device#, token):

http://127.0.0.1/apps/api/10/devices/52/setTemperature/72?access_token=12345

I coded my own driver for this if you want to try it out. You need to install mosquito in the rpi for it to work.

I'm assuming you are using the PM Sensor SDS011 and the http webpage that goes along with that device ??

Groovy
I checked all that but no joy
In this case is setTemperature a command that will store a value?
Does it get stored in InfluxDB, if the deice is configured?
I suspect I need to write my own driver. Big job for me
If I want to ser the pm25 readings, I need to have a command setPM25 to send the data and get it stored. Am I understanding things correctly?
Thanks
Ger

Yes, I am using a SDS011
I didn't know about the webpage. I'll get my best man on it directly
I would like to have a look at you driver
Thanks
Ger

The file I use is called aqi.py -- I found it on google but I modified mine a little - the default does both webpages and mqtt. If you cant find it let me know cause you will need it for my driver.

This is what the aqi.py creates as a webpage -- http://aqi.borgnet.us/

I have developed a driver based in the driver for AwAir Elements devices.
On the RPI side, I gather all the data and create a Json payload.
The HE driver reads the payload and parses the values from it.
It works
Still more work to do but I'm very happy with the progress of my first driver.

1 Like