Author Topic: ipwx-raspi-weewx station setup questions  (Read 10562 times)

0 Members and 1 Guest are viewing this topic.

Offline mikez104

  • Member
  • *
  • Posts: 41
ipwx-raspi-weewx station setup questions
« on: April 25, 2015, 11:16:53 AM »
Hi all.  This is my first post on this forum.  I had a Davis weather monitor II for about 4 or 5 years and it died.  That was about 5 years ago.  I have always wanted to set up another station but didn't have the $$ to get another Davis so I now have an acurite 02032C and 5in1 and the acurite bridge.

This is my current setup
02032C - Just sits on the desk.  Not attached to anything
Bridge - attached to Raspberry Pi 2 model B via usb ethernet adapter
Raspi - running wheezy 2015-02-16. 
Packet grabbing software (if thats what you call it) - ipwx from nincehelser.com/ipwx
weather software - weewx 2.5.0-1  I should upgrade to the latest version.

Sorry for the long winded intro but wanted to provide as much info as I could.  Here are my questions.
  • I'd like to give the Raspi a static IP so I can open up a port on my router to access the weewx web page but am not familiar with what we did with the port bridging in /etc/network/interfaces.  Here is how it looks.
    auto lo br0

    iface lo inet loopback
    iface eth0 inet manual
    iface eth1 inet manual

    iface br0 inet dhcp
         bridge_ports eth0 eth1


    allow-hotplug wlan0
    iface wlan0 inet manual
    wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
    iface default inet dhcp

    When  I do an ifconfig I see my ip address is assigned to br0.  I'm not sure if I just change br0 to static or what?

  • Second question is can I send my updates to Weather Underground more often?  I see there is a new ipwxLite version out that sends frequent updates to WU directly from that program but in the weewx config file it does not seem to have any adjustment.  It looks like it sends the data every 5 minutes.

Besides that, the system seems to be solid for the couple of days I have had it going.  Any help would be great. 
Thanks
Mike

Online nincehelser

  • Forecaster
  • *****
  • Posts: 1941
    • nincehelser.com
Re: ipwx-raspi-weewx station setup questions
« Reply #1 on: April 25, 2015, 02:52:25 PM »
I haven't tried setting br0 to static, but I can't see why that wouldn't work.

An alternative is to make a reservation in your DHCP server so that the same IP is assigned to that MAC.

As for the latest weewx version, there were some changes made that require a new driver.  I've got one that works on the latest version of weewx, but it's still got a bug I need to fix... basically it's just a file-contention issue... ipwx is writing the file at the same time weewx is trying to read it, so weewx doesn't get a valid reading and aborts.  It's an annoyance that pops up once in a while, but not enough to drive me to sit down and fix it.  :?  Basically a cleaner driver should be written, but my Python needs work.

As to the 5-minute setting, that's a function of weewx.  It can be changed in the weewx.conf file if I remember correctly.  I set mine to 1-minute.  The latest version of weewx has a "rapid-fire" option, but I'm not sure it's compatible with my driver.

« Last Edit: April 25, 2015, 02:54:31 PM by nincehelser »

Offline mikez104

  • Member
  • *
  • Posts: 41
Re: ipwx-raspi-weewx station setup questions
« Reply #2 on: April 25, 2015, 04:22:26 PM »
Yup, that driver definitely didn't work :-). I had upgraded to the newest version of weewx right after I made that post and now it's broke. #-o  Rather than uninstall and try and reinstall an older version, would you be willing to let me use the driver that has the bug?  I can handle an occasional crash.  As for Python, I know nothing.  I can do some scripting but I'm sure it is very ugly by the standards of someone who knows what they are doing but I can usually find a way to make things work by doing workarounds.

I changed br0 to a static ip and it works fine.

Online nincehelser

  • Forecaster
  • *****
  • Posts: 1941
    • nincehelser.com
Re: ipwx-raspi-weewx station setup questions
« Reply #3 on: April 25, 2015, 05:12:37 PM »
I put the beta driver up on my site and you can grab it with:

wget http://nincehelser.com/ipwxcode/simulator.pie

You'll need to rename it "simulator.py".  My web host wants to interpret the ".py" so I had to rename it.

Note that this driver assumes wxdata is at: /home/pi/ipwx/wxdata   If you put yours somewhere else, you'll need to alter it in the driver.

Offline mikez104

  • Member
  • *
  • Posts: 41
Re: ipwx-raspi-weewx station setup questions
« Reply #4 on: April 25, 2015, 06:01:21 PM »
Cool, I'll download it in a bit.  And yeah, I ran into the path thing last time because I put everything in the home directory of user ipwx but that was easy to figure out.  Thanks!  I'll let you know how it goes.

Offline mikez104

  • Member
  • *
  • Posts: 41
Re: ipwx-raspi-weewx station setup questions
« Reply #5 on: April 25, 2015, 08:00:58 PM »
Got it going and it is working fine.  Thanks again. 
I looked in weewx.conf for the upload to WU frequency but only found the rapid fire setting.  I turned that on.  Not sure how that will work out since the 5 in 1 only updates like every 18 seconds.  We'll see.

I have some bad data from today.  Do you know how I can purge that?  I cant tell if it is using mysql or sqlite. 

I'd also like to get a url.  I have to do some looking around I guess.

Online nincehelser

  • Forecaster
  • *****
  • Posts: 1941
    • nincehelser.com
Re: ipwx-raspi-weewx station setup questions
« Reply #6 on: April 25, 2015, 08:48:47 PM »
Got it going and it is working fine.  Thanks again. 
I looked in weewx.conf for the upload to WU frequency but only found the rapid fire setting.  I turned that on.  Not sure how that will work out since the 5 in 1 only updates like every 18 seconds.  We'll see.

I have some bad data from today.  Do you know how I can purge that?  I cant tell if it is using mysql or sqlite. 

I'd also like to get a url.  I have to do some looking around I guess.

What I was thinking of in weewx.conf was archive_interval.  That sets how often data is saved to the database and reported.  Like I said, I don't know if the "rapid fire" option will work with the driver.  Let me know what you find out. 

"Rapid Fire" doesn't have any set frequency.  Wunderground will accept anything down to 2.5 seconds.

I believe it is using sqlite.  Anyway, you can purge the entire database by removing /var/lib/weewx/weewx.sdb.  When you restart weewx, it will start a new database.  This is a quick way to start a fresh database once you've got everything squared away.

I'm not sure what you mean by a URL, but in weewx.conf you can set HTML_ROOT where you want it.  Mine is set to /var/www.

I have avahi and bonjour set up so I can type http://weather.local to be automatically directed to the weewx pages.  It works nicely, but you have to install iTunes on Windows to easily get bonjour functionality.  Apple doesn't have bonjour split out as a stand-alone package.  Oh, you also have to enable ipV6 on the pi for that to work.  I plan to cover that as options on the new write-up.

« Last Edit: April 25, 2015, 08:50:37 PM by nincehelser »

Offline mikez104

  • Member
  • *
  • Posts: 41
Re: ipwx-raspi-weewx station setup questions
« Reply #7 on: April 25, 2015, 09:24:09 PM »
With rapid fire on, I did not see anything saying that it was posting to WU.  IDK, I turned it off anch changes the archive_interval to 60 seconds.  After I did that I can see that it is posting to WU every minute but the weird thing is that WU is only showing that I am updating it at 5 minute intervals.  Do they just throw out the extra data?  That's pretty beat.

I blew out the database and it created the clean new one like you said.  Sounds like you've been doing this for a while and know your stuff.  Thanks for your help.

When I said URL I meant like a domain name.  I just signed up on no-ip.com for the free dynamic DNS.  I still have to set up my router to allow access to the raspi.  I get kinda nervous about that...  Maybe just allow port 80?  I did it a while back for some other projects I was working on and didn't have any problems though.

Online nincehelser

  • Forecaster
  • *****
  • Posts: 1941
    • nincehelser.com
Re: ipwx-raspi-weewx station setup questions
« Reply #8 on: April 25, 2015, 11:16:43 PM »
"Rapid Fire" is Weather Underground terminology.  I'm not sure if they've trademarked it.  They're the only hardware-independent service I know of that accepts data that quickly.

The purpose is to drive animated web widgets with near real-time data, especially for the wind readings.  For archival purposes, it seems they aggregate data to 5-minute intervals as you've already noticed.  I assume the high-resolution data is tossed after it is processed, but I can't say for sure.

You'd want port 80 open for sure.  Perhaps 443 if you plan to do anything with https.  Port 22 is also a good one to open if you need SSH access from the outside.

If you're worried about people having direct access to your interior network, you could have your domain and website hosted by someone else.  Weewx can be configured to send the generated web pages to your external hosting service via ftp or rsync.  That will eliminate the need to open ports into your home network.  It may also be the best option if you have a lot of people accessing your data so as not to swamp your home internet link.
« Last Edit: April 25, 2015, 11:47:55 PM by nincehelser »

Offline mikez104

  • Member
  • *
  • Posts: 41
Re: ipwx-raspi-weewx station setup questions
« Reply #9 on: April 26, 2015, 09:14:25 AM »
I opened up port 80. I may do ssh but I'll move it to a more obscure port. I used no-ip.com and you can see (I hope) my weewx at mikez104.zapto.org/weewx

Offline mwall

  • Contributor
  • ***
  • Posts: 122
Re: ipwx-raspi-weewx station setup questions
« Reply #10 on: April 27, 2015, 03:29:03 PM »
george,

when you rewrite the ipwx extension to weewx, you might want to consider starting with the fileparse extension.  it is much simpler than the simulator.  in fact, you could almost use it as-is. 

it does *not* solve your race condition, but you could solve that by putting the read into a retry loop (see the genLoopPackets in the acurite.py driver for an example of how to do that).

https://raw.githubusercontent.com/weewx/weewx/master/extensions/fileparse/bin/user/fileparse.py

the fileparse extension is a sample driver included in the weewx 3 distribution.  all it does is read name-value pairs from a file.

m

Online nincehelser

  • Forecaster
  • *****
  • Posts: 1941
    • nincehelser.com
Re: ipwx-raspi-weewx station setup questions
« Reply #11 on: April 27, 2015, 03:46:35 PM »
george,

when you rewrite the ipwx extension to weewx, you might want to consider starting with the fileparse extension.  it is much simpler than the simulator.  in fact, you could almost use it as-is. 

it does *not* solve your race condition, but you could solve that by putting the read into a retry loop (see the genLoopPackets in the acurite.py driver for an example of how to do that).

https://raw.githubusercontent.com/weewx/weewx/master/extensions/fileparse/bin/user/fileparse.py

the fileparse extension is a sample driver included in the weewx 3 distribution.  all it does is read name-value pairs from a file.

m

That sounds like it would greatly simplify things.  Is there a list of variable names I need to use?

Offline mwall

  • Contributor
  • ***
  • Posts: 122
Re: ipwx-raspi-weewx station setup questions
« Reply #12 on: April 27, 2015, 04:23:52 PM »
you can use any names you want, then map them using the label_map in the configuration.

but to make it easier (and skip the need for configuration), use the names in the default schema:

weewx.com/docs/customizing.htm#archive_types

these names come from the wview schema (the default schema used by weewx), which in turn are derived from the davis names.

m

Online nincehelser

  • Forecaster
  • *****
  • Posts: 1941
    • nincehelser.com
Re: ipwx-raspi-weewx station setup questions
« Reply #13 on: April 27, 2015, 06:25:28 PM »
you can use any names you want, then map them using the label_map in the configuration.

but to make it easier (and skip the need for configuration), use the names in the default schema:

weewx.com/docs/customizing.htm#archive_types

these names come from the wview schema (the default schema used by weewx), which in turn are derived from the davis names.

m

I think I'll go with those schema names to keep things easy.

I'm fuzzy on the "rain", though.  What time interval is that supposed to cover?  The polling interval set in fileparse?

If I remember correctly, the way I hacked simulator was take the 36 seconds (the reporting rate of the hardware) and divided it by 2.5 seconds (the simulator loop interval) to get 14.4.  I then divided the amount of rain in 36 seconds by 14.4.

So should I set "rain" to the 36-second rain amount divided by 14.4, or is there a better way to do it?

Oh, another issue I have is the initial accumulation of data for weewx.  I'm getting around this now by delaying the start of weewx until 70 seconds after I start collecting data from the bridge to ensure I have a full set of valid data in the file.  With the fileparse extension, is there a particular value I could start with that weewx would understand as not being valid data and pass over it?  Perhaps "Null" or something similar?

Thanks!




Offline mikez104

  • Member
  • *
  • Posts: 41
Re: ipwx-raspi-weewx station setup questions
« Reply #14 on: April 27, 2015, 06:55:50 PM »
Feel free to use me to test.  My system is new so if I loose data or experience a crash, no big deal. 

I do have a question about mounting the 5 in 1 unit.  They say use the bubble level to ensure the thing is level.  If I mount this on a 12 foot pole or something, how are you supposed to see the level?

Offline mikez104

  • Member
  • *
  • Posts: 41
Re: ipwx-raspi-weewx station setup questions
« Reply #15 on: April 27, 2015, 07:04:29 PM »
And no, I don't have a 12 foot ladder...

Online nincehelser

  • Forecaster
  • *****
  • Posts: 1941
    • nincehelser.com
Re: ipwx-raspi-weewx station setup questions
« Reply #16 on: April 27, 2015, 07:08:16 PM »
Feel free to use me to test.  My system is new so if I loose data or experience a crash, no big deal. 

I do have a question about mounting the 5 in 1 unit.  They say use the bubble level to ensure the thing is level.  If I mount this on a 12 foot pole or something, how are you supposed to see the level?

Get a 13-foot ladder. ;)

The unit needs to be level mainly so the rain tipping buckets work properly. 

Also you need to be sure the unit can't sway in the wind, which might also cause the tipping buckets to move and register "phantom rain".

Offline mikez104

  • Member
  • *
  • Posts: 41
Re: ipwx-raspi-weewx station setup questions
« Reply #17 on: April 27, 2015, 08:43:34 PM »
Well, I think I have it like 15 or 16 feet up.  I got a piece of 3/4" metal conduit and mounted that towards the top of the play thing (wooden structure with swings and slide that my kids grew out of years ago).  I guess 7 feet of the pole are in the air and the rest is secured to the structure.  Time will tell if it wobbles in the wind.  I strapped it to the side while one end of the tube was on the ground so I could see the bubble level and when I had it right, I raised it up and tightened it in place.  It should be close enough.  I tried the thin wall conduit but that stuff was flimsy and did not fit snuggly in the bottom of the 5 in 1.  I took that back and got the thick wall galvanized stuff.  That fit perfect and seemed a lot more rigid.

Offline mwall

  • Contributor
  • ***
  • Posts: 122
Re: ipwx-raspi-weewx station setup questions
« Reply #18 on: April 28, 2015, 01:38:30 PM »
I think I'll go with those schema names to keep things easy.

I'm fuzzy on the "rain", though.  What time interval is that supposed to cover?  The polling interval set in fileparse?

If I remember correctly, the way I hacked simulator was take the 36 seconds (the reporting rate of the hardware) and divided it by 2.5 seconds (the simulator loop interval) to get 14.4.  I then divided the amount of rain in 36 seconds by 14.4.

So should I set "rain" to the 36-second rain amount divided by 14.4, or is there a better way to do it?

Oh, another issue I have is the initial accumulation of data for weewx.  I'm getting around this now by delaying the start of weewx until 70 seconds after I start collecting data from the bridge to ensure I have a full set of valid data in the file.  With the fileparse extension, is there a particular value I could start with that weewx would understand as not being valid data and pass over it?  Perhaps "Null" or something similar?

a weewx driver only needs to report raw data from the sensors, in one of METRIC, METRICWX, or US systems (see the weewx customization guide for details about unit systems and conversions).

quality control, filtering, calculation of derived quantities, unit conversions, data storage, reporting, and uploading are all done in other weewx services.  the driver should be simple; its job is simply to collect raw data from the hardware.  this lets us share code, features, and extensibility across many different types of hardware and hardware architectures.

the fileparse driver has a polling_interval parameter - that determines how often it will read the file.  assuming that data from the sensors are written to the file on every sensor read, set the polling_interval to the shortest sensor update interval, which would be 18 seconds for the acurite hardware.

the observation 'rain' is a 'delta' reading - it is the amount of rain since the last observation.  rainRate is automatically calculated by the StdWXCalculate service, as are other derived quantities such as dewpoint, windchill, cloudbase, etc.  so if your hardware reports a cumulative value for rain, call it rain_total, then the driver should remember the last rain_total and report 'rain' as the difference between last rain_total and current rain_total.

temperature, pressure, and most other observations are 'gauge' readings.

any rainfall totals happen in the reporting layer, typically by querying the database.  for example, if you want to answer "how much rain fell last week" you simply do an sql query.  the sql query has been simplified for many common meterological reports in the weewx report template system.  in this case, the expression:

$week.rain

would do that sql query and return the amount of rainfall in the past week.  the template syntax enables you to optionally display/convert units, format the numeric value, etc.  its pretty powerful for creating web pages, json data, xml, raw text reports.  once again, see the weewx customization guide for many, many, more options and heaps of examples.

finally, if you start using weewx in april, but you know that you have had 100 inches of rain since january 1 and you want that included in your reports, just do something like this:

#set $totalrain = 100 + $year.rain.inch.raw
rain this year: $totalrain

m

Online nincehelser

  • Forecaster
  • *****
  • Posts: 1941
    • nincehelser.com
Re: ipwx-raspi-weewx station setup questions
« Reply #19 on: April 28, 2015, 02:18:55 PM »
I think I'll go with those schema names to keep things easy.

I'm fuzzy on the "rain", though.  What time interval is that supposed to cover?  The polling interval set in fileparse?

If I remember correctly, the way I hacked simulator was take the 36 seconds (the reporting rate of the hardware) and divided it by 2.5 seconds (the simulator loop interval) to get 14.4.  I then divided the amount of rain in 36 seconds by 14.4.

So should I set "rain" to the 36-second rain amount divided by 14.4, or is there a better way to do it?

Oh, another issue I have is the initial accumulation of data for weewx.  I'm getting around this now by delaying the start of weewx until 70 seconds after I start collecting data from the bridge to ensure I have a full set of valid data in the file.  With the fileparse extension, is there a particular value I could start with that weewx would understand as not being valid data and pass over it?  Perhaps "Null" or something similar?

a weewx driver only needs to report raw data from the sensors, in one of METRIC, METRICWX, or US systems (see the weewx customization guide for details about unit systems and conversions).

quality control, filtering, calculation of derived quantities, unit conversions, data storage, reporting, and uploading are all done in other weewx services.  the driver should be simple; its job is simply to collect raw data from the hardware.  this lets us share code, features, and extensibility across many different types of hardware and hardware architectures.

the fileparse driver has a polling_interval parameter - that determines how often it will read the file.  assuming that data from the sensors are written to the file on every sensor read, set the polling_interval to the shortest sensor update interval, which would be 18 seconds for the acurite hardware.

the observation 'rain' is a 'delta' reading - it is the amount of rain since the last observation.  rainRate is automatically calculated by the StdWXCalculate service, as are other derived quantities such as dewpoint, windchill, cloudbase, etc.  so if your hardware reports a cumulative value for rain, call it rain_total, then the driver should remember the last rain_total and report 'rain' as the difference between last rain_total and current rain_total.

temperature, pressure, and most other observations are 'gauge' readings.

any rainfall totals happen in the reporting layer, typically by querying the database.  for example, if you want to answer "how much rain fell last week" you simply do an sql query.  the sql query has been simplified for many common meterological reports in the weewx report template system.  in this case, the expression:

$week.rain

would do that sql query and return the amount of rainfall in the past week.  the template syntax enables you to optionally display/convert units, format the numeric value, etc.  its pretty powerful for creating web pages, json data, xml, raw text reports.  once again, see the weewx customization guide for many, many, more options and heaps of examples.

finally, if you start using weewx in april, but you know that you have had 100 inches of rain since january 1 and you want that included in your reports, just do something like this:

#set $totalrain = 100 + $year.rain.inch.raw
rain this year: $totalrain

m

OK.  So if I set the polling interval to 18 seconds, how does weewx know that the "rain" data represents 36 seconds?  Is that programmed into a hardware profile somewhere?

Offline mwall

  • Contributor
  • ***
  • Posts: 122
Re: ipwx-raspi-weewx station setup questions
« Reply #20 on: April 28, 2015, 02:47:46 PM »
OK.  So if I set the polling interval to 18 seconds, how does weewx know that the "rain" data represents 36 seconds?  Is that programmed into a hardware profile somewhere?

lets say that ipwx reads the acurite bridge every 30 seconds.  the first time it runs it spits out a text file like this:

Code: [Select]
outTemp = 72.5
inTemp = 68.0
rain_total = 22
pressure = 30.18

the driver reads this file and creates this dictionary:

Code: [Select]
packet = {"dateTime":xxxxxx, "usUnits":weewx.US, "outTemp": 72.5, "inTemp": 68.0, "rain": None, "pressure": 30.18}

the value xxxxxx is a unix epoch - number of seconds since 1 january 1970 GMT.  the value "rain" is undefined because we have only the current cumulative count, 22.  we need another cumulative rain reading to get a delta.  but the driver retains the value 22:

Code: [Select]
    self.last_rain = 22

30 seconds later, ipwx spits out this:

Code: [Select]
outTemp = 72.4
inTemp = 68.0
rain_total = 22
pressure = 30.19

from which the driver creates this packet:

Code: [Select]
packet = {"dateTime":xxxxxx, "usUnits":weewx.US, "outTemp": 72.4, "inTemp": 68.0, "rain": 0, "pressure": 30.19}

and does this assignment:

Code: [Select]
    self.last_rain = 22

30 seconds later, ipwx spits out this:

Code: [Select]
outTemp = 72.8
inTemp = 68.0
rain_total = 24
pressure = 30.15

from which the driver creates this packet:

Code: [Select]
packet = {"dateTime":xxxxxx, "usUnits":weewx.US, "outTemp": 72.8, "inTemp": 68.0, "rain": 0.02, "pressure": 30.15}

the value for rain was calculated like this:

Code: [Select]
    rain = (total_rain - self.last_rain) * inches_per_count
    self.last_rain = total_rain

so that after this read we have:

Code: [Select]
    self.last_rain = 24

note that it does not matter how often you poll the file.  however, since the file only changes every 30 seconds, there is no need to poll it more often than that.

since the 5-in-1 sensors report every 18 and 36 seconds, you could just have ipwx spit out the file every 18 seconds and have the driver read the file every 18 seconds.  use a retry during the read just in case the read is attempted while ipwx is writing to the file.

m

Online nincehelser

  • Forecaster
  • *****
  • Posts: 1941
    • nincehelser.com
Re: ipwx-raspi-weewx station setup questions
« Reply #21 on: April 28, 2015, 04:10:35 PM »
Ok... I'm confused.

The bridge hardware puts out a time-delta value for rain. 

Are you suggesting instead of passing the hardware-reported value to weewx through "rain", I change it to an accumulated value (i.e "rain_total") instead?

I don't see "rain_total" in that list you linked, but I assume it's a variable that would be understood by the fileparse extension?



Offline mwall

  • Contributor
  • ***
  • Posts: 122
Re: ipwx-raspi-weewx station setup questions
« Reply #22 on: April 28, 2015, 04:32:49 PM »
Ok... I'm confused.

The bridge hardware puts out a time-delta value for rain. 

Are you suggesting instead of passing the hardware-reported value to weewx through "rain", I change it to an accumulated value (i.e "rain_total") instead?

I don't see "rain_total" in that list you linked, but I assume it's a variable that would be understood by the fileparse extension?

oh.  i assumed that the bridge reports a rain total, not a rain delta.  (the acurite console reports a cumulative counter - number of bucket tips)

you could simply report the rain delta that you get from the bridge, but that might be prone to error (e.g., if you miss a packet from the bridge, or if the driver polls the file much less often than ipwx writes to it).

can ipwx keep a total count (based on what it hears from the bridge), or is it stateless?

does the bridge spit out a complete set of observations each time it sends data?  or is it more like the console, which sends out "partial packets" - for example, R1a messages contain wind speed, wind direction, cumulative rain, R1b messages contain wind speed, out temp, out humidity, and R2 messages contain pressure and inside temperature.

m

Online nincehelser

  • Forecaster
  • *****
  • Posts: 1941
    • nincehelser.com
Re: ipwx-raspi-weewx station setup questions
« Reply #23 on: April 28, 2015, 07:59:38 PM »
Ok... I'm confused.

The bridge hardware puts out a time-delta value for rain. 

Are you suggesting instead of passing the hardware-reported value to weewx through "rain", I change it to an accumulated value (i.e "rain_total") instead?

I don't see "rain_total" in that list you linked, but I assume it's a variable that would be understood by the fileparse extension?

oh.  i assumed that the bridge reports a rain total, not a rain delta.  (the acurite console reports a cumulative counter - number of bucket tips)

you could simply report the rain delta that you get from the bridge, but that might be prone to error (e.g., if you miss a packet from the bridge, or if the driver polls the file much less often than ipwx writes to it).

can ipwx keep a total count (based on what it hears from the bridge), or is it stateless?

does the bridge spit out a complete set of observations each time it sends data?  or is it more like the console, which sends out "partial packets" - for example, R1a messages contain wind speed, wind direction, cumulative rain, R1b messages contain wind speed, out temp, out humidity, and R2 messages contain pressure and inside temperature.

m

The 5n1 sensor sends data every 18 seconds, alternating between (wind speed, temp, humidity) and (wind speed, wind direction, rain in the last 36 seconds).  These are received by the bridge then forwarded to acu-link.com as corresponding http statements.  In other words, the 5n1 sensor generates 2 different http messages, very similar in content to R1a and R1b.

The rain data is not cumulative, though.  If a packet is missed, that data is gone forever.  The rain data is also sent (at least on the http side) in mm/1000 rather than tips, which I found surprising.  I convert that to inches in ipwx.

As far as ipwx goes, I can keep a cumulative count.  In my current beta version I'm keeping "dailyrainin" already for use with wunderground, so it would easy enough to write that to the file.

Sending cumulative rain seems easier to think about.  It's hard to explain why I'm chopping up the 36-second rain data into 14.4 pieces to fit a 2.5-second polling rate.  Sending cumulative rain is, like you say, probably less prone to error as it is immune to variances in the polling rate.

Offline mikez104

  • Member
  • *
  • Posts: 41
Re: ipwx-raspi-weewx station setup questions
« Reply #24 on: April 28, 2015, 11:09:57 PM »
Hi, I ordered an additional temp sensor.  I guess I should have asked you before I ordered but will ipwx push that data through to weewx?  And does it move that to weather underground also?  I'd like to have it be my interior temp and humidity or maybe put it in the shade when it starts getting hot and compare that with the temp on the 5 in 1.