Author Topic: Dealing with PM2.5 data or power outage with GW1000 - Meteobridge  (Read 617 times)

0 Members and 1 Guest are viewing this topic.

Offline galfert

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 6822
Dealing with PM2.5 data or power outage with GW1000 - Meteobridge
« on: September 15, 2019, 09:10:04 AM »
If you have a PM2.5 you may realized that you need to keep a close eye on the battery charge. The PM2.5 has a solar panel to keep the batteries charged but depending on your PM2.5 location it may not get sufficient charge. Where I have my PM2.5 I seem to only get about 6 weeks of battery power. It is almost like the solar does charge the battery but not as fast as it is being used. I'm sure if I put it in direct sun it would be better, but I'm also trying to prolong the PM2.5 life by not having it in direct sun, so I have it in a covered outdoor patio and it gets indirect sun.

Solution for those with a Meteobridge

If you are supplying data to your Meteobridge with a GW1000 then I have a solution to be alerted exactly when your PM2.5 stops sending data due to power loss (battery depleted)...

What you do is create an alert email notification on the Meteobridge. This alert will notify you if the PM2.5 data is not updated. If you are uploading your data to SQL this is particularly important. Because if your PM2.5 stops sending data then your SQL stops receiving ALL DATA! The SQL upload fails if one sensor is not providing data. It wouldn't be so terrible if you just missed out on PM2.5 data but sadly that isn't he case.

Here is how to craft the email notification in the Meteobridge for outdated PM2.5 data:
First create a one time alarm by selecting the following:
 [ You are not allowed to view attachments ]

Then fill in the rest, which checks for no data for 15 minutes::
 [ You are not allowed to view attachments ]
Full subject/body line does not fit in the screenshot so here it is:
PM2.5 Stopped Reporting # Check battery charge on PM2.5: {*[air0pm-age]/60*1} mins old \ Uptime: {*[mbsystem-uptime.0:0]/60*1} mins

or if you prefer more details (system time and uptime with days/hours/minutes):
PM2.5 Stopped Reporting # Check battery charge on PM2.5: {*[air0pm-age]/60*1} mins old \  Date: [MMM]-[D] @ [HH]:[mm][APM], Uptime: {*[mbsystem-uptime.0:0]/86400*t}d {*([mbsystem-uptime.0:0]%86400)/3600*t}h  {*([mbsystem-uptime.0:0]%3600)/60*1}m

900 refers to the number of seconds since the sensor sent out new data. 900 seconds = 15 minutes. So we are checking if the sensor data is older than 15 minutes to then send out an alert. The reason for setting it to 15 minutes is because it takes about 10 minutes between PM2.5 broadcasts and if we just powered up the GW1000 it could take a while to get the first transmission and we don't want to be alerted every time it reboots. The alert is cleared once the sensor sends out new data as the age of the data would be less than 30 seconds.

* this requires that you have also configured your Meteobridge to properly send out email alerts. You need to configure your outbound email SMTP settings on the Meteobridge. I recommend using a dummy Yahoo email that has had its SMTP account setting changed to allow it to be used to send SMTP outbound messages:
 [ You are not allowed to view attachments ]
« Last Edit: September 19, 2019, 08:16:31 AM by galfert »
Ecowitt GW1000 | Meteobridge on Raspberry Pi
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Weather Underground Issue Tracking
Tele-Pole

Offline Lighty269

  • Senior Member
  • **
  • Posts: 54
Re: Dealing with PM2.5 data or power outage with GW1000 - Meteobridge
« Reply #1 on: September 15, 2019, 11:26:54 AM »
Nice!  Just set it up.

 [tup]

Offline galfert

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 6822
Re: Dealing with PM2.5 data or power outage with GW1000 - Meteobridge
« Reply #2 on: September 18, 2019, 06:11:41 AM »
As nice as this alert is to know when to recharge there is still a problem if you have an SQL upload. The problem is that your SQL is failing to upload all other data while the PM2.5 is not providing data. So it is good to be alerted but it would also be nice if you didn't miss all the other data into your SQL database while your PM2.5 is down.

Yes I'm saying that an SQL upload will fail if you don't set it up so that a particular data is optional. After all it may be a while before you notice the alert email and it could be an even longer while before you can actually charge the PM2.5. There is no reason to miss out on all data just because the PM2.5 is down.

Solution: Modify your SQL upload so that PM2.5 data is optional.
https://www.wxforum.net/index.php?topic=37851.0

If you have any other battery operated sensors like extra room sensors or soil sensors you may want to implement these techniques to those sensors too.
« Last Edit: September 18, 2019, 06:29:56 AM by galfert »
Ecowitt GW1000 | Meteobridge on Raspberry Pi
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Weather Underground Issue Tracking
Tele-Pole

 

anything