Air quality sensors ...

119 views
Skip to first unread message

Yves Martin

unread,
Aug 12, 2022, 2:41:50 PM8/12/22
to weewx-user
Hi, I'm using weewx since a couple of years now and I will be happy to add some sensors for the air quality. What is the simplest way and device to use for this?

YMartin.com/meteo

p q

unread,
Aug 12, 2022, 3:15:06 PM8/12/22
to weewx...@googlegroups.com
I don't know if this is the simplest, this is what I did. 

SDS011 with USB interface

I found some python code online and modified it to read the sensor every 5 minutes and send the data out via MQTT. This is running on a old Raspberry Pi 2 in my backyard.

I have another Raspbery PI running mosquitto as the MQTT broker, though this easily could be the same machine as is running Weewx.

On the machine running Weewx, I wrote another tiny piece of python that subscribes to the MQTT messages and when it gets one, it writes the data to a file.
I modified my Weewx driver to look for that file and put the data in the PM10 and PM2_5 fields. Then, everything else in Weewx is normal.

You can find the code for the service that stuffs the data from MQTT into a file here: https://github.com/PeterQuinn925/weewx_skin in the MQTT_sensor.py
The code for that talks to the sensor is in the aq-sensor folder.

Like I said, I don't know if this is the simplest, but it's working for me. There's probably a more official way to do it with MQTT, that doesn't require mucking with the driver. I had already modified the heck out of mine, so it was the easiest for me.



On Fri, Aug 12, 2022 at 11:41 AM Yves Martin <ve2...@gmail.com> wrote:
Hi, I'm using weewx since a couple of years now and I will be happy to add some sensors for the air quality. What is the simplest way and device to use for this?

YMartin.com/meteo

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/139ac3f4-8aff-47e2-9f93-10cb76a6b82cn%40googlegroups.com.


--
Peter Quinn
(415)794-2264

vince

unread,
Aug 12, 2022, 7:01:29 PM8/12/22
to weewx-user
I bought a Purple Air and use that via the purpleair extension.

f4n...@gmail.com

unread,
Aug 16, 2022, 12:25:17 AM8/16/22
to weewx-user
Is there an extension for the uHoo Air Sensor too? Their app is really painfully slow, each graph has to be loaded individually, zooming is full of bugs, good sensors but horrible usability.. To be able to watch the data in weewx would be a relief, really.
Reply all
Reply to author
Forward
0 new messages