Weewx with Vantage *and* SDR simultaneously?

75 views
Skip to first unread message

Ron M.

unread,
Jun 7, 2020, 8:46:03 PM6/7/20
to weewx-user
Howdy folks,

Been happily using wee for a few years now, and finally trying to get a little dangerous with it now. :)

Running Wee 4.1.1 (just updated today via deb) on a RasPi with a USB connected Vantage station. That part is working great.

I had a couple of RTLSDR modules lying around from my ADSB receiver experiments, and decided to fire one up with rtl_433 just to see what all is around... and I found a couple of LaCrosse sensors and a couple of Acurite sensors nearby from which I could receive temperature and humidity data.  So I decided to try adding that capability into my existing wee instance... yeah that didn't quite work. Glad I saved a backup of the .conf to go back to. :)

If I'm following the logs correctly, it appears I can only have one "station_type" defined for my weewx.conf file... and that's where I'm failing to follow why it's not working. I'm obviously getting all my primary data input from the Vantage, and want to keep that. I just want to pick up the extra temperature and humidity variables I'm seeing via the SDR and add those to my existing weather page without needing to run a separate instance of wee... or at least not a full separate instance... this is where I'm really not clear on the remote service part.

Here's the snippet of the SDR config section... yes I know it's all commented out right now, for obvious reasons.

##############################################################################

#[SDR]
   
# This section is for the software-defined radio driver.

   
# The driver to use
#    driver = user.sdr
#    cmd = rtl_433 -M utc -F json
#    path = /usr/local/bin
#       [[sensor_map]]
#               extraTemp1 = temperature_C.185.LaCrosse-TX141THBv2
#               extraHumid1 = humidity.185.LaCrosse-TX141THBv2
#               extraTemp2 = temperature_C.212.LaCrosse-TX141THBv2
#               extraHumid2 = humidity.212.LaCrosse-TX141THBv2
#               extraTemp3 = temperature_C.99.Acurite-606TX
#               log_unknown_sensors = True
#               log_unmapped_sensors = True

##############################################################################


But this is basically what I'm trying to do, read that data into those "extraTemp#" fields, that way it can be displayed and added to the existing graphs.

Am I going about this the wrong way? Or is this just not within the capability of the software?

Thanks,
   Ron NN5DX


Tom Keffer

unread,
Jun 7, 2020, 8:57:42 PM6/7/20
to weewx-user
In theory you could do this by writing a service which augments the data stream with the data from rtl_433. In practice, that's a lot of work, and prone to some data confusion (for example, which outside temperature?).

Better to run a second instance using the sdr driver, which adds to a separate database. You can then use the data from the 2nd database in your reports.

A little bit of homework:
-tk



--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/e17dc755-d168-4d86-afcf-781972f5a05eo%40googlegroups.com.

Ron M.

unread,
Jun 7, 2020, 9:08:11 PM6/7/20
to weewx-user
Hmmmm, yeah, reading through these, that makes more sense... running a second instance with a different config file is easy enough... it was just wrapping my mind around getting that data from that second instance into the report being generated by the Vantage instance... and that multiple binding thing explains it.

Thank you Tom!!
To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.

Ron M.

unread,
Jun 8, 2020, 6:28:33 PM6/8/20
to weewx-user
OK, getting somewhere, but not quite...

Here's what I have in the sensor_map section of the .conf file (yes, a separate weewx instance):
 
                extraTemp2 = temperature_C.212.LaCrosse-TX141THBv2Packet
                extraTemp3
= temperature_C.99.Acurite-606TXPacket

But looking at debug logs from the instance, I see this: 

Jun  8 16:22:29 wx weewx[20973] DEBUG user.sdr: parse_json: unknown model Acurite-606TX
Jun  8 16:22:29 wx weewx[20973] DEBUG user.sdr: punt unrecognized line '{"time" : "2020-06-08 22:22:22", "model" : "Acurite-606TX", "id" : 99, "battery_ok" : 0, "temperature_C" : 18.400, "mic" : "CHECKSUM"}#012'
Jun  8 16:22:29 wx weewx[20973] DEBUG user.sdr: parse_json: unknown model LaCrosse-TX141THBv2
Jun  8 16:22:29 wx weewx[20973] DEBUG user.sdr: punt unrecognized line '{"time" : "2020-06-08 22:22:26", "model" : "LaCrosse-TX141THBv2", "id" : 212, "channel" : 0, "battery_ok" : 1, "temperature_C" : 19.100, "humidity" : 31, "test" : "No"}#012'


Those lines appear to correctly match the config file, so I'm not following why the "unknown" errors.

This is from the sdr.py module from Matthew Wall... I think he reads this forum.

Thanks,
    Ron

Ron M.

unread,
Jun 8, 2020, 6:51:26 PM6/8/20
to weewx-user
I know just enough programming to be dangerous. I'm a network engineer, not a coder. ;-)

Definitely issues in sdr.py... For example, I changed this:
#    IDENTIFIER = "LaCrosse TX141TH-Bv2 sensor"
    IDENTIFIER
= "LaCrosse-TX141THBv2"


And now the packets are getting recognized.
Jun  8 16:46:39 wx weewx[22556] DEBUG user.sdr: lines=[u'{"time" : "2020-06-08 22:46:36", "model" : "LaCrosse-TX141THBv2", "id" : 212, "channel" : 0, "battery_ok" : 1, "temperature_C" : 19.100, "humidity" : 30, "test" : "No"}\n']
Jun  8 16:46:39 wx weewx[22556] DEBUG user.sdr: packet={u'extraHumid2': 30.0, 'usUnits': 1, 'dateTime': 1591656396}



But still seeing other coding issues that I might be able to figure out, or not. For example, I'm also looking to import that temperature value, but the existing code refers to "temperature" instead of "temperature_C", so guessing that's why it's not importing that field.

At least it's getting somewhere.
Reply all
Reply to author
Forward
0 new messages