Air quality monitoring using the M5Stack Air Quality Kit and the Waylay IO IoT platform.
To make the experience fit your profile, pick a username and tell us what interests you.
We found and based on your interests.
We have picked the M5Stack Air Quality Kit based on the PMSA003 Digital laser dust sensor for this application. The M5Stack ecosystem is based on the ESP32 SoC and is beautifully integrated with a big enough screen for a User Interface.
On Linux, make sure your user is part of the dialout group by running:
sudo adduser $USER dialout
Register on Waylay IO if you have not already and log in.
AirQuality
. This resource is practically your device representation in the cloud where you will send the data.customer
key and the Zalmotek
value.tags
key and the [ "AirQualityMonitor" ]
value.AirQualityIngestion
and add the following details in the body:async function handleRequest (req, res) {
if (!req.body) {
// No body found
return
}
// Parse body if needed
let payload = req.body
if (typeof payload === 'string' || payload instanceof String)
payload = JSON.parse(payload)
/*
You can do some processing of the payload over here.
*/
// Post values to our resource
waylay.data.baseUrl = 'https://data-io.waylay.io'
await waylay.data.postSeries('replace_with_resource_id', payload, { store: true, forward: true })
.catch(e => console.error(e.message))
res.sendStatus(200)
}
Be sure to replace thereplace_with_resource_id
placeholder with the actual resource_id
from the above step. Navigate to the resource page to get it. Ours is something like 453472c9-8553-4b12-b24f-fc6e052e8255
. Press Save once you have pasted the correct details.
Create an account to leave a comment. Already have an account? Log In.
Become a member to follow this project and never miss any updates