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

0 Members and 1 Guest are viewing this topic.

Online nincehelser

  • Forecaster
  • *****
  • Posts: 1966
    • nincehelser.com
Re: ipwx-raspi-weewx station setup questions
« Reply #25 on: April 28, 2015, 11:24:51 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.

It can. With the fileparser extension we're discussing should make it even easier to get it into weewx.

As for wunderground taking additional data (like a second temp and humidity), it doesn't seem to graph additional sensors, even though they've allowed for that data to be sent through their published protocol.  The best I've been able to do is send a second temperature as "soil temp", and it will show on the station page, but unfortunately it won't graph.

Offline mikez104

  • Member
  • *
  • Posts: 41
Re: ipwx-raspi-weewx station setup questions
« Reply #26 on: April 28, 2015, 11:38:52 PM »
Ok, good to know.  Thanks

Offline mikez104

  • Member
  • *
  • Posts: 41
Re: ipwx-raspi-weewx station setup questions
« Reply #27 on: April 29, 2015, 07:03:53 PM »
So the tower sensor showed up.  It is working but I'm really not sure what I have to do to pass the data to weewx.  Can you point me in to correct direction?

Online nincehelser

  • Forecaster
  • *****
  • Posts: 1966
    • nincehelser.com
Re: ipwx-raspi-weewx station setup questions
« Reply #28 on: April 29, 2015, 08:49:13 PM »
So the tower sensor showed up.  It is working but I'm really not sure what I have to do to pass the data to weewx.  Can you point me in to correct direction?

I'm on the road the next week or so and don't have access to my system and code, but I'll try to point you in the right direction.

I assume you're using the beta parser at http://nincehelser.com/ipwxcode/parser

That has code in it to read the temperature and relative humidity from a tower.  The variables are named something like $tower_tempF and $tower_RH.

What you'll need to do is uncomment the lines that write the wxdata file, and then add a couple lines to write the tower data.  I'd suggest using value names that work with the existing database schema.  ('cause that's the way I'll eventually be going)

The file parser extension would make this much easier.  I you want to go that route you're welcome to try it yourself as I won't get to it for a bit.  See Matt's documentation linked above, and the weewx docs about installing the extension.  It should be pretty straight-forward write the wxdata file in the format needed.  It basically pretty close now, but you'd need to change the value names to something that matches the existing schema. 

Or you can try to modify the hacked simulator driver for now.  That shouldn't be too hard either, but you'll still need to figure out what variable names  to use.  I believe there are suitable pre-existing variables in the schema, like the ones for indoor temp and indoor humidity.  I'm not sure what the process is for adding new names to the schema, but I'm sure it's covered somewhere in the weewx docs.  (Personally, I'd try to use something already existing just to keep it simple)

Hope this helps.  I'll still be checking in here while on the road if you have questions.


Offline mikez104

  • Member
  • *
  • Posts: 41
Re: ipwx-raspi-weewx station setup questions
« Reply #29 on: April 29, 2015, 09:52:29 PM »
Thank you sir.  I'll take a look tomorrow.  Too tired and it's too late to do any more thinking today.  Safe travels.

Offline mikez104

  • Member
  • *
  • Posts: 41
Re: ipwx-raspi-weewx station setup questions
« Reply #30 on: April 30, 2015, 12:15:56 AM »
Ok, I wasn't going to touch it until tomorrow but, yeah, I got sucked into it... 

So looking at the parser file I saw that I am using the original one from the instructions at http://nincehelser.com/ipwx/ .  I assumed I should be using the one you referenced above so I switched to that.  It looks like you have changed up some stuff in the newer file. 

I could not get it to work.  It would not update the temp on weewx page.  The other settings didn't seem to move either but I cant say whether they were broke or not because it is a very calm night with like no wind.  The baro didn't seem to move and  I tried comparing the readings with my aculink page.  Aculink temp moved but weewx stayed the same.  I looked at the syslog and it was doing tasks and not complaining but the data seemed to be staying the same.  I though maybe it was because the lines for the wxdata file were commented out so I undid the comments but that did not make a difference.

I put back the original parser file and weewx and WU seem to updating normally now.

From the way I see it, the listener basically sniffs the packets coming from the bridge that are on their way to the aculink site and takes that data and passes it off to the parser through the pipe.  The parser then takes the data and arranges it with the correct names and corrects the units and reformats it then makes some kind of handoff to the weewx driver.  Then weewx takes that data and makes the web page, archives the data in the db and, for me, uploads to WU.  How does parser make that handoff?  Via that wxdata textfile?  I think that's where I'm confused.

Keep in mind that I don't know python.  I can follow a lot of whats going to a point but I don't know the syntax.  And I'm no programmer.  Everything I know, I just taught myself.

Now, I'm throwing in the towel.  g'night.

Online nincehelser

  • Forecaster
  • *****
  • Posts: 1966
    • nincehelser.com
Re: ipwx-raspi-weewx station setup questions
« Reply #31 on: April 30, 2015, 12:30:51 AM »
Ok, I wasn't going to touch it until tomorrow but, yeah, I got sucked into it... 

So looking at the parser file I saw that I am using the original one from the instructions at http://nincehelser.com/ipwx/ .  I assumed I should be using the one you referenced above so I switched to that.  It looks like you have changed up some stuff in the newer file. 

I could not get it to work.  It would not update the temp on weewx page.  The other settings didn't seem to move either but I cant say whether they were broke or not because it is a very calm night with like no wind.  The baro didn't seem to move and  I tried comparing the readings with my aculink page.  Aculink temp moved but weewx stayed the same.  I looked at the syslog and it was doing tasks and not complaining but the data seemed to be staying the same.  I though maybe it was because the lines for the wxdata file were commented out so I undid the comments but that did not make a difference.

I put back the original parser file and weewx and WU seem to updating normally now.

From the way I see it, the listener basically sniffs the packets coming from the bridge that are on their way to the aculink site and takes that data and passes it off to the parser through the pipe.  The parser then takes the data and arranges it with the correct names and corrects the units and reformats it then makes some kind of handoff to the weewx driver.  Then weewx takes that data and makes the web page, archives the data in the db and, for me, uploads to WU.  How does parser make that handoff?  Via that wxdata textfile?  I think that's where I'm confused.

Keep in mind that I don't know python.  I can follow a lot of whats going to a point but I don't know the syntax.  And I'm no programmer.  Everything I know, I just taught myself.

Now, I'm throwing in the towel.  g'night.

You've got a pretty good handle on it.  Yes, the parser writes the text file, wxdata, and that is then read by weewx.

I suspect the problem might be the path where wxdata is written.  Originally I started with /home/ipwx/wxdata, but with the new beta I started using /home/pi/ipwx/wxdata.  Where wxdata is written isn't particularly important, but the paths used by "parser" and the hacked "simulator.py" must be in agreement.

Offline mikez104

  • Member
  • *
  • Posts: 41
Re: ipwx-raspi-weewx station setup questions
« Reply #32 on: April 30, 2015, 12:41:57 AM »
Dang it.  That bit me before but I figured it out then.  I think that I figured it out before because there was an error in the syslog about the file not existing. This time the wxdata already existed because it was written by the earlier version of the parser so no errors in syslog.  Guess the beers I enjoyed this evening clouded my memory.   #-o
I'll check it out tomorrow. 

Offline mikez104

  • Member
  • *
  • Posts: 41
Re: ipwx-raspi-weewx station setup questions
« Reply #33 on: April 30, 2015, 06:28:44 PM »
Ok, fixed the path and that made it not crash.  So, I added two lines to the parser that reverenced $tower_tempF and $tower_RH.  Looks like this

Code: [Select]
print MYFILE "item = $tower_tempF\n";
print MYFILE "ihum = $tower_RH\n";


That created the lines in the wxdata file but they were empty.  So I ran the listener by itself and saw that it was not greping for the tower sensor so I fixed that.  So it's piping the data to the parser but the parser was set to look for "tower" and the data from the listener program was tagged as "tower&humidity" so I changed those and now it saves the data to the wxdata file.

It looks like near the top of the parser file, you might be setting the variables initial values?  Like RH   = '999';   I don't see a line in there for the tower sensor but there seems to be a line for everything else.  Not sure if tower should be added there.

So on the the simulator.py.  I found the part where it looks like you are reading the data from the wxdata file and I think it would need some info added there for the tower sensor.  I did that but the program would not run and complained about using a float or something.  I think it may be because I can't just add that to area where you are reading the file.  Maybe it needs set up before that section?  Here is the section I speak of.  I took my lines out because I wanted to get it back up and running.
Code: [Select]
print(wxdata)

            _packet['outTemp'] = wxdata['temp']
            _packet['outHumidity'] = wxdata['humi']
            _packet['barometer'] = wxdata['baro']
            _packet['windSpeed'] = wxdata['wspd']


And I also found out how to get into the databases for weewx and see the data although I have not tried to edit anything yet.  So any ideas on the driver?  It seems to be good until there.

Online nincehelser

  • Forecaster
  • *****
  • Posts: 1966
    • nincehelser.com
Re: ipwx-raspi-weewx station setup questions
« Reply #34 on: May 02, 2015, 07:44:08 PM »
Ok, fixed the path and that made it not crash.  So, I added two lines to the parser that reverenced $tower_tempF and $tower_RH.  Looks like this

Code: [Select]
print MYFILE "item = $tower_tempF\n";
print MYFILE "ihum = $tower_RH\n";


That created the lines in the wxdata file but they were empty.  So I ran the listener by itself and saw that it was not greping for the tower sensor so I fixed that.  So it's piping the data to the parser but the parser was set to look for "tower" and the data from the listener program was tagged as "tower&humidity" so I changed those and now it saves the data to the wxdata file.

It looks like near the top of the parser file, you might be setting the variables initial values?  Like RH   = '999';   I don't see a line in there for the tower sensor but there seems to be a line for everything else.  Not sure if tower should be added there.

So on the the simulator.py.  I found the part where it looks like you are reading the data from the wxdata file and I think it would need some info added there for the tower sensor.  I did that but the program would not run and complained about using a float or something.  I think it may be because I can't just add that to area where you are reading the file.  Maybe it needs set up before that section?  Here is the section I speak of.  I took my lines out because I wanted to get it back up and running.
Code: [Select]
print(wxdata)

            _packet['outTemp'] = wxdata['temp']
            _packet['outHumidity'] = wxdata['humi']
            _packet['barometer'] = wxdata['baro']
            _packet['windSpeed'] = wxdata['wspd']


And I also found out how to get into the databases for weewx and see the data although I have not tried to edit anything yet.  So any ideas on the driver?  It seems to be good until there.

It sounds like you're using the original version of the listener.  The new one at http://nincehelser.com/ipwxcode/listener just greps for "mt=".  That apparently stands for model type, and any valid AcuLink message will contain one.  So what's happening is the listener is forwarding any message that contains a model type, be it tower, 5n1, pressure (the bridge), or even 3n1.

I just set some initial values for some variables that cause trouble if you don't.  For example, I set RH to 999 to flag it doesn't have a legitimate value yet (a legal value would be something like 0 to 99).    I think the reason I did that is the dewpoint calculation goes nuts if RH isn't reasonable because of the natural log function.  I didn't calculate dewpoint for the tower so it wasn't an issue.

The "float" problem may have occurred if weewx didn't understand a value.  That might occur if weewx starts too soon after the listener.  Give the listener a good minute or so to fully populate wxdata, then start weewx.

Before doing that, though, you should look at the values in wxdata and make sure they are properly updating.  (use cat wxdata to list the data)  Once your're satisfied they are updating, you can start weewx.

Basically the "float" error occurs because weewx is trying to read the file and is expecting a floating point number value, but is getting nothing or something different.

Offline mikez104

  • Member
  • *
  • Posts: 41
Re: ipwx-raspi-weewx station setup questions
« Reply #35 on: May 02, 2015, 10:14:15 PM »
Yeah, everything is good up until the driver reads wxdata.  I took out my additions to the driver before I fixed the other stuff so it make senses that weewx didn't like the value it read from wxdata because the value was empty.  Before I fixed listener, parser was not populating the the lines I had added for the extra sensors.  I will set them up again and give it another try.  I haven't touched it today, I took another old raspberry pi and am going to set it up as an outdoor weather webcam.  I was having issues with the wireless adapter I was using but got that all working.  So, tomorrow maybe I'll try the driver again.

Offline mikez104

  • Member
  • *
  • Posts: 41
Re: ipwx-raspi-weewx station setup questions
« Reply #36 on: May 03, 2015, 10:31:19 PM »
Well, I just put my variables back in the driver and it is now adding the inHumidty and inTemp to the database.  It also added the inside temp to the web page but not the humidity.  I have to dig around a little to find where to add that one.

Offline mikez104

  • Member
  • *
  • Posts: 41
Re: ipwx-raspi-weewx station setup questions
« Reply #37 on: May 04, 2015, 06:27:55 PM »
Ok, I found a new skin that I like and it includes the inside temp and humidity BUT, the values are going all weird.  The humidity was saying 76% when the sensor is reading 43%.  I checked the wxdata file and it matches the 43% so the difference is coming from the driver I think.

I went in and started moving values for " 'inHumidity' : Observation(magnitude=30.0,  average=50.0" and they seem to make the humidity value change but nothing consistent.  I ended up putting them back to where they were and the reading was normal.  No clue why.  But now, the reading is climbing again.  In the last two hours, it went up 5% over the correct reading.

Code: [Select]
# The following doesn't make much meteorological sense, but it is easy to program!
        self.observations = {'inTemp'     : Observation(magnitude=20.0,  average= 50.0, period=24.0, phase_lag=14.0, start=start_ts),
                             'inHumidity' : Observation(magnitude=30.0,  average=50.0, period=48.0, phase_lag=14.0, start=start_ts),
                             'outTemp'    : Observation(magnitude=20.0,  average= 50.0, period=24.0, phase_lag=14.0, start=start_ts),
                             'barometer'  : Observation(magnitude=1.0,   average= 30.1, period=48.0, phase_lag= 0.0, start=start_ts),
                             'windSpeed'  : Observation(magnitude=10.0,  average=  5.0, period=48.0, phase_lag=24.0, start=start_ts),
                             'windDir'    : Observation(magnitude=360.0, average=180.0, period=48.0, phase_lag= 0.0, start=start_ts),
                             'humidity'   : Observation(magnitude=30.0,  average= 50.0, period=48.0, phase_lag= 0.0, start=start_ts),
                             'rain'       : Rain(rain_start=0, rain_length=3, total_rain=0.2, loop_interval=self.loop_interval)}

 
  Do you know what could be happening?  And could you explain what the values are for and how they work?

Online nincehelser

  • Forecaster
  • *****
  • Posts: 1966
    • nincehelser.com
Re: ipwx-raspi-weewx station setup questions
« Reply #38 on: May 04, 2015, 06:41:23 PM »
Ok, I found a new skin that I like and it includes the inside temp and humidity BUT, the values are going all weird.  The humidity was saying 76% when the sensor is reading 43%.  I checked the wxdata file and it matches the 43% so the difference is coming from the driver I think.

I went in and started moving values for " 'inHumidity' : Observation(magnitude=30.0,  average=50.0" and they seem to make the humidity value change but nothing consistent.  I ended up putting them back to where they were and the reading was normal.  No clue why.  But now, the reading is climbing again.  In the last two hours, it went up 5% over the correct reading.

Code: [Select]
# The following doesn't make much meteorological sense, but it is easy to program!
        self.observations = {'inTemp'     : Observation(magnitude=20.0,  average= 50.0, period=24.0, phase_lag=14.0, start=start_ts),
                             'inHumidity' : Observation(magnitude=30.0,  average=50.0, period=48.0, phase_lag=14.0, start=start_ts),
                             'outTemp'    : Observation(magnitude=20.0,  average= 50.0, period=24.0, phase_lag=14.0, start=start_ts),
                             'barometer'  : Observation(magnitude=1.0,   average= 30.1, period=48.0, phase_lag= 0.0, start=start_ts),
                             'windSpeed'  : Observation(magnitude=10.0,  average=  5.0, period=48.0, phase_lag=24.0, start=start_ts),
                             'windDir'    : Observation(magnitude=360.0, average=180.0, period=48.0, phase_lag= 0.0, start=start_ts),
                             'humidity'   : Observation(magnitude=30.0,  average= 50.0, period=48.0, phase_lag= 0.0, start=start_ts),
                             'rain'       : Rain(rain_start=0, rain_length=3, total_rain=0.2, loop_interval=self.loop_interval)}

 
  Do you know what could be happening?  And could you explain what the values are for and how they work?

Ah.  What you're looking at there is the original simulator code.  The original purpose of the simulator was to simulate data when you had no device.

So what's going on in that code snippet is the generation of data based some mathematical function, like a sine wave, based on those parameters.

What I did later on in the code was over-rode those synthesized values with actual values... you'll need to do the same in inTemp and inHumidity.

I think those additions should occur in this area of the driver:

Code: [Select]
print(wxdata)

            _packet['outTemp'] = wxdata['temp']
            _packet['outHumidity'] = wxdata['humi']
            _packet['barometer'] = wxdata['baro']
            _packet['windSpeed'] = wxdata['wspd']

Offline mikez104

  • Member
  • *
  • Posts: 41
Re: ipwx-raspi-weewx station setup questions
« Reply #39 on: May 04, 2015, 07:31:47 PM »
Ok, I didn't know what the heck that was.  I also added my stuff below like you said. They are the lines  with inHumidity and inTemp.  The temp works fine but the humitity is increasing for some reason.

Code: [Select]
print(wxdata)

            _packet['outTemp'] = wxdata['temp']
            _packet['outHumidity'] = wxdata['humi']
            _packet['barometer'] = wxdata['baro']
            _packet['windSpeed'] = wxdata['wspd']

            if wxdata['wspd'] >=1:
                    _packet['windDir'] = wxdata['wdir']
            else:
                    _packet['windDir'] = None

            _packet['rain'] = wxdata['rain'] / 14.4
            _packet['inTemp'] = wxdata['item']
            _packet['inHumitity'] = wxdata['ihum']

            _packet['windGust'] = None

Online nincehelser

  • Forecaster
  • *****
  • Posts: 1966
    • nincehelser.com
Re: ipwx-raspi-weewx station setup questions
« Reply #40 on: May 04, 2015, 07:38:27 PM »

Code: [Select]
            _packet['inHumitity'] = wxdata['ihum']



Check your spelling of "humidity" in the above line.  ;)

Offline mikez104

  • Member
  • *
  • Posts: 41
Re: ipwx-raspi-weewx station setup questions
« Reply #41 on: May 04, 2015, 07:52:20 PM »
 :shock: :oops:
Derp
Hey, lookie there, works like a charm now... Thanks man, that was driving me nuts!

Offline mikez104

  • Member
  • *
  • Posts: 41
Re: ipwx-raspi-weewx station setup questions
« Reply #42 on: May 05, 2015, 12:20:24 PM »
I caught it throwing that error again about the converting a string to a float. Any clue?

Code: [Select]
May  5 12:17:16 weatherPi weewx[2288]: engine: Shutting down StdReport thread
May  5 12:17:16 weatherPi weewx[2288]: engine: StdReport thread has been terminated
May  5 12:17:16 weatherPi weewx[2288]: engine: Caught unrecoverable exception in engine:
May  5 12:17:16 weatherPi weewx[2288]:     ****  could not convert string to float:
May  5 12:17:16 weatherPi weewx[2288]:     ****  Traceback (most recent call last):
May  5 12:17:16 weatherPi weewx[2288]:     ****    File "/usr/share/weewx/weewx/engine.py", line 836, in main
May  5 12:17:16 weatherPi weewx[2288]:     ****      engine.run()
May  5 12:17:16 weatherPi weewx[2288]:     ****    File "/usr/share/weewx/weewx/engine.py", line 187, in run
May  5 12:17:16 weatherPi weewx[2288]:     ****      for packet in self.console.genLoopPackets():
May  5 12:17:16 weatherPi weewx[2288]:     ****    File "/usr/share/weewx/weewx/drivers/simulator.py", line 149, in genLoopPackets
May  5 12:17:16 weatherPi weewx[2288]:     ****      number = float(line[eq_index + 1:].strip())
May  5 12:17:16 weatherPi weewx[2288]:     ****  ValueError: could not convert string to float:
May  5 12:17:16 weatherPi weewx[2288]:     ****  Exiting.

Online nincehelser

  • Forecaster
  • *****
  • Posts: 1966
    • nincehelser.com
Re: ipwx-raspi-weewx station setup questions
« Reply #43 on: May 05, 2015, 07:35:26 PM »
I caught it throwing that error again about the converting a string to a float. Any clue?

Code: [Select]
May  5 12:17:16 weatherPi weewx[2288]: engine: Shutting down StdReport thread
May  5 12:17:16 weatherPi weewx[2288]: engine: StdReport thread has been terminated
May  5 12:17:16 weatherPi weewx[2288]: engine: Caught unrecoverable exception in engine:
May  5 12:17:16 weatherPi weewx[2288]:     ****  could not convert string to float:
May  5 12:17:16 weatherPi weewx[2288]:     ****  Traceback (most recent call last):
May  5 12:17:16 weatherPi weewx[2288]:     ****    File "/usr/share/weewx/weewx/engine.py", line 836, in main
May  5 12:17:16 weatherPi weewx[2288]:     ****      engine.run()
May  5 12:17:16 weatherPi weewx[2288]:     ****    File "/usr/share/weewx/weewx/engine.py", line 187, in run
May  5 12:17:16 weatherPi weewx[2288]:     ****      for packet in self.console.genLoopPackets():
May  5 12:17:16 weatherPi weewx[2288]:     ****    File "/usr/share/weewx/weewx/drivers/simulator.py", line 149, in genLoopPackets
May  5 12:17:16 weatherPi weewx[2288]:     ****      number = float(line[eq_index + 1:].strip())
May  5 12:17:16 weatherPi weewx[2288]:     ****  ValueError: could not convert string to float:
May  5 12:17:16 weatherPi weewx[2288]:     ****  Exiting.

That's likely the bug I mentioned early-on.  wxdata is in the process of being re-written, but weewx tries to read it before it is ready, getting garbled results. 

Offline mikez104

  • Member
  • *
  • Posts: 41
Re: ipwx-raspi-weewx station setup questions
« Reply #44 on: May 05, 2015, 08:12:12 PM »
Got ya. I totally blew it up today. Tried messing with the skin, couldn't get forecasts to work, changed a bunch of stuff and it blew up. I'm starting over.  :roll:  at least I will take care of some stuff that I wanted to change. After messing with all this, I went back and read the posts between you and the other guy again. I may try that file parser. I looked at it and it is very small and simple but I have the same questions about the rain. I may experiment with that combined with the listener/parser programs.

Online nincehelser

  • Forecaster
  • *****
  • Posts: 1966
    • nincehelser.com
Re: ipwx-raspi-weewx station setup questions
« Reply #45 on: May 05, 2015, 08:22:13 PM »
Got ya. I totally blew it up today. Tried messing with the skin, couldn't get forecasts to work, changed a bunch of stuff and it blew up. I'm starting over.  :roll:  at least I will take care of some stuff that I wanted to change. After messing with all this, I went back and read the posts between you and the other guy again. I may try that file parser. I looked at it and it is very small and simple but I have the same questions about the rain. I may experiment with that combined with the listener/parser programs.

Yeah.  Fileparser does look like the easiest way to go.  The only catch with rain is how you want to report it.  If you use the 36-second delta as it comes from the bridge, then you'll need to divide it as appropriate for the polling rate.  For example, if you poll every 18 seconds, then you'll have to cut that 36-second value in half.

Or you could calculate an accumulation.  The "dailiyrainin" I use in the beta parser may be good for that.  Using an accumulation makes things simpler and less prone to error, too.

Interestingly, Acurite stated on their forum that the rain value should be a rolling counter.  That makes a lot of sense as it seems to explain the operation of the consoles, however, that's not how it's being reported by the bridge.  A rolling counter would make much more sense and be more robust to data loss with respect to rain, so I wonder why they made that change?


Offline mikez104

  • Member
  • *
  • Posts: 41
Re: ipwx-raspi-weewx station setup questions
« Reply #46 on: May 05, 2015, 09:01:26 PM »
Idk.  Maybe the console has the ability to store data (a few weeks worth I think) and make calculations.  The bridge seems like it is just a dumb relay of sorts that just receives the data from the 5&1 and 2 others and just spits it to the aculink site and lets the site do all the calculations.  For them, it would be easier to make any changes in code that would do calculations and what not on their site instead of trying to push firmware out. Ha, or I could be totally off base!  Just a thought.

Well, I have to thank you for those instructions on your site.  I was able to install a new image of Raspbian, install weewx and get apache installed in record time.  If I had to rethink all the steps, it would of taken quite some time.

This time, I am going to image the SD card at this point so if I blow it up again, I wont wate a bunch of time rebuilding the base system.  I kept telling myself that I have to image this SD card just in case and bam.  Well, I guess thats how it goes.

Online nincehelser

  • Forecaster
  • *****
  • Posts: 1966
    • nincehelser.com
Re: ipwx-raspi-weewx station setup questions
« Reply #47 on: May 05, 2015, 10:11:20 PM »
Idk.  Maybe the console has the ability to store data (a few weeks worth I think) and make calculations.  The bridge seems like it is just a dumb relay of sorts that just receives the data from the 5&1 and 2 others and just spits it to the aculink site and lets the site do all the calculations.  For them, it would be easier to make any changes in code that would do calculations and what not on their site instead of trying to push firmware out. Ha, or I could be totally off base!  Just a thought.

Well, I have to thank you for those instructions on your site.  I was able to install a new image of Raspbian, install weewx and get apache installed in record time.  If I had to rethink all the steps, it would of taken quite some time.

This time, I am going to image the SD card at this point so if I blow it up again, I wont wate a bunch of time rebuilding the base system.  I kept telling myself that I have to image this SD card just in case and bam.  Well, I guess thats how it goes.

The big question is what data the 5n1 is actually sending out the radio link.  I don't know of anyone who has decoded it that far.  Basically the 5n1 has a counter to count the bucket tips.  It doesn't necessarily have to reset that counter after each transmission (as it seems to do from the bridge point-of-view).  It could just keep incrementing the counter and let software figure out the change in rainfall as necessary.  The beauty of that scheme is that it becomes fairly immune to data packet loss.  If connectivity was lost during a huge rainstorm, then you could still tell how much rain did fall once you re-acquired the signal by comparing the change in the counter.

The consoles do seem to behave as if they might be reading a counter.  I've tried to block them from receiving rain data when messing with the gauge, but it still seems they pick up readings once communications are restored.  That seems to make sense if the 5n1 really has a rolling counter.  Someone might do a controlled experiment to see if that behavior holds true.

Offline mikez104

  • Member
  • *
  • Posts: 41
Re: ipwx-raspi-weewx station setup questions
« Reply #48 on: May 05, 2015, 11:35:34 PM »
Oh, don't get me going.  I'll be up the yard tearing down my 5&1 to find out...  That would make sense though.  All i'd have to do is loosen 4 screws and....

Offline mikez104

  • Member
  • *
  • Posts: 41
Re: ipwx-raspi-weewx station setup questions
« Reply #49 on: May 05, 2015, 11:46:30 PM »
I was getting weird dewpoint readings of like 2000+ degrees.  I think it was because listener/parser was not running long enough to put valid data in the wxdata file before the driver read it.  I think I solved that.  I put a single line script that starts the listener/parser in /etc/rc.local then added sleep 65 to the beginning of /etc/init.d/weewx.  Weewx seemed to wait a decent amount of time to start after I rebooted.  And no crazy readings.