maxnorth Posted October 24, 2023 Posted October 24, 2023 Bob, I've just got a new eisy and PG3 up and running and am trying to decifer how this is working. I have previous experience with the PurpleAir api and calculating AQI myself using PM2.5_10minute. A couple of questions: 1. On startup, the server retrieves and sets the values for all variables (e.g., GV0-GV12). But I notice the log for the server does not report the updating of all values for each subsequent 10-minute polling interval. For example, it might report only GV0, GV3 and GV4, or something. I have tried it with different sensors and get similar results. Comparing this to results I get when I poll the api directly, it appears that your log is only reporting values that are updated/different than the previous values. Is this correct? I ask because my log also shows "error sensor: poll:loading stats" at each poll. I want to make sure it is operating as expected. 2. Are you pulling the stats only from the "stats_b" dictionary returned by the sensor? 3. The "EPA AQI" stat, or GV10, is not returned by the sensor but is calculated by the node server: Is that correct? I assume the calculation is derived from the PM2.5_10minute stat. What can you share about the calculation?
Geddy Posted October 24, 2023 Posted October 24, 2023 @maxnorth If you're trying to get a member's attention please use the mention process to get a notification to show on their forum pages or sometimes send them an email. Just start a name with @ then type the name and SELECT it from the list that appears below where you're typing. It will put the highlight around the name like with your name above. I'm assuming you're trying to get @bpwwer's attention.
bpwwer Posted October 24, 2023 Posted October 24, 2023 1. Your assumption is correct in that it only updates values that have changed. The goal was to reduce the load on the ISY by only sending changed values instead of them all. The "loading stats" message should be a debug message, not an error message. Thanks for pointing that out. 2. No, I'm only looking at the "stats" info which I believe is an average of the the stats_a and stats_b data. 3. Yes, it is calculated. I use the pm2.5_10minute value. I'm using the EPA https://www.airnow.gov/sites/default/files/2020-05/aqi-technical-assistance-document-sept2018.pdf
maxnorth Posted October 26, 2023 Author Posted October 26, 2023 Thanks, Bob. This is very helpful. A couple of remaining points: 1. When EPA AQI is recalculated, which should happen each time GV0 changes, should I also expect to see the updated GV10 value in the log at that time? I don't. 2. My EPA AQI values are not always correct, either not updating when they should or miscalculating (I don't have enough data to tell which). Example: Over the last few cycles, I've seen PM values of 2.3, 2.4, 2.7, and 3.3, all with an AQI value of 12 and none with a GV10 value in the log. The correct values are 10, 10, 11, and 14. Just now, the PM value updated to 2.6 and I finally saw a GV10 value in the log of 11, which is correct. So, I guess my suggestion to you is that GV10 is not updating reliably when it should be.
maxnorth Posted October 26, 2023 Author Posted October 26, 2023 Screenshot of unsuccessful and successful GV10 updates
bpwwer Posted October 26, 2023 Posted October 26, 2023 3 hours ago, maxnorth said: Thanks, Bob. This is very helpful. A couple of remaining points: 1. When EPA AQI is recalculated, which should happen each time GV0 changes, should I also expect to see the updated GV10 value in the log at that time? I don't. No, it's using the PM 2.5 10 minute average which is GV3. This is probably changing less often that GV0 which may explain what your seeing for AQI values.
maxnorth Posted October 27, 2023 Author Posted October 27, 2023 Thanks, Bob, for pointing out my error. And then updated GV10 values are not showing in the log because they are not different than the previous values. Thank you!
Recommended Posts