Newbie Question - PurpleAir Notification System
I'm not a programmer but I'm loving Thingspeak!
by way of background: i have been having mysterious PM 2.5 spikes on my PurpleAir several times a day (usually from ~12 ug/m3 to 100 ug/m3!!). i recently figured out what is causing it: i live by a charcoal burger place that sends smoke throughout my neighborhood when they relight their grill at peak hours. it is what it is unfortunately, until these restaurants get properly regulated.
that being said, i like to work in my yard, and id love to be able to just put on an N95 when a charcoal smoke event is happening. so i'm trying to use thingspeak to build a little notification system for me.
the PurpleAir Thingspeak channels are private (by default I believe), so I'm using a Matlab analysis to copy the raw data from the PurpleAir Thingspeak channel over to a channel I can administer.
next i set up TimeControls to run the data update Matlab analysis at 5 minute intervals, and staggered them apart from each other (the channel seems to be updating just about every minute now).
next i set up a React that, upon data insertion of a PM 2.5 value above 35 mg/um3, triggers a ThingHTTP which sends a request to Pushover's API --> so I get text messages and Chrome notifications when there are air events.
this seems to be working great so far -- the air in LA right now is pretty good, so it just captures the transient charcoal smoke events and notifies me of them.
but my concern is --> the air in LA can often get worse for extended periods. Some days, the average will be 40 ug/m3. so when those days inevitably come, will my system just be constantly chirping at me all day about the air values?
if so, is there anything i can do about this? is there a way to tell react to notify me, but then only retest again after an hour, for instance?
thanks for your help, thingspeak community!
2 Comments
Time DescendingVery cool application. So, the way I would do this is to apply some kind of moving mean to the data to determine if the transient is because of the local restaurant turning on their grill. The assumption here is that the changes in LA air quality happen at a very different timescale than your local restaurant turning up their grill. So, your react can trigger a MATLAB analysis which looks at the one week historical average and the current datapoint. If the current datapoint is over 20% of the last weekly average, then it is your local grill and send an alert.