SDR and BME280 Data using Acurite Sensors

161 views
Skip to first unread message

Troy Roberts

unread,
Jun 24, 2020, 11:31:53 AM6/24/20
to weewx-user
So I am currently running weewx version 4.1.1 and collecting data via SDR from an Acurite 5n1, three Acurite Temp/Humidity sensors, and a BME280 sensor for pressure. All data is populating the fields as I would expect them to. I am currently using one of the acurite temp/humidity sensors to populate the "inTemp" and "inHumidity" data fields however, I would like to change those "inTemp" and "inHumidity" data fields to be populated by the BME280 sensor and change the acurite temp/humidity sensor over to "extraTemp3". However, when I edited the weewx.conf file, no data from the BME280 sensor was being uploaded but I was now populating extraTemp3 data. I'm not seeing any errors in the syslog. Below is my weewx.config sensor mapping [SDR] and [BME280] that works and what I edited to switch sensors.

This config sensor map works as I expect it to:

[SDR]
    # This section is for the software-defined radio driver.
    # The driver to use
    driver = user.sdr
    # cmd = rtl_433 -M utc -F json -R 17 -R 44 -R 50
    # cmd = rtl_433 -M utc -F json -G  # you can uncomment this if you have
    # issues - check your logs! 
    path = /usr/local/bin
    ld_library_path = /usr/local/lib
    [[sensor_map]]
        windDir = wind_dir.098A.Acurite5n1PacketV2
        windSpeed = wind_speed.098A.Acurite5n1PacketV2
        outTemp = temperature.098A.Acurite5n1PacketV2
        outHumidity = humidity.098A.Acurite5n1PacketV2
        rain_total = rain_total.098A.Acurite5n1PacketV2 
        inTemp = temperature.258E.AcuriteTowerPacketV2   #Nursery
        inHumidity = humidity.258E.AcuriteTowerPacketV2  #Nursery
        # I have more sensors, so I added them below, you may not.
        #extraTemp1 = temperature_probe.0BF1.Acurite00275MPacket
        #extraTemp2 = temperature.0BF1.Acurite00275MPacket
        extraTemp1 = temperature.169B.AcuriteTowerPacketV2    #Beer Fridge
        extraHumidity1 = humidity.169B.AcuriteTowerPacketV2   #Beer Fridge
        extraTemp2 = temperature.2CE5.AcuriteTowerPacketV2    #Garage
        extraHumidity2 = humidity.2CE5.AcuriteTowerPacketV2   #Garage
        #extraTemp3 = temperature.258E.AcuriteTowerPacketV2    #Nursery
        #extraHumidity3 = humidity.258E.AcuriteTowerPacketV2   #Nursery
    [[deltas]]
        rain = rain_total

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

# Options for extension 'bme280wx'
[Bme280wx]
    temperature_must_have = ""
    humidityKeys = ""
    pressureKeys = pressure
    pressure_must_have = inTemp
    i2c_port = 1
    humidity_must_have = ""
    i2c_address = 0x76
    usUnits = US
    temperatureKeys = ""



This is config sensor map does not work (no BME280 data is populated):

[SDR]
    # This section is for the software-defined radio driver.
    # The driver to use
    driver = user.sdr
    # cmd = rtl_433 -M utc -F json -R 17 -R 44 -R 50
    # cmd = rtl_433 -M utc -F json -G  # you can uncomment this if you have
    # issues - check your logs! 
    path = /usr/local/bin
    ld_library_path = /usr/local/lib
    [[sensor_map]]
        windDir = wind_dir.098A.Acurite5n1PacketV2
        windSpeed = wind_speed.098A.Acurite5n1PacketV2
        outTemp = temperature.098A.Acurite5n1PacketV2
        outHumidity = humidity.098A.Acurite5n1PacketV2
        rain_total = rain_total.098A.Acurite5n1PacketV2 
        # inTemp = temperature.258E.AcuriteTowerPacketV2   #Nursery
        # inHumidity = humidity.258E.AcuriteTowerPacketV2  #Nursery
        # I have more sensors, so I added them below, you may not.
        #extraTemp1 = temperature_probe.0BF1.Acurite00275MPacket
        #extraTemp2 = temperature.0BF1.Acurite00275MPacket
        extraTemp1 = temperature.169B.AcuriteTowerPacketV2    #Beer Fridge
        extraHumidity1 = humidity.169B.AcuriteTowerPacketV2   #Beer Fridge
        extraTemp2 = temperature.2CE5.AcuriteTowerPacketV2    #Garage
        extraHumidity2 = humidity.2CE5.AcuriteTowerPacketV2   #Garage
        extraTemp3 = temperature.258E.AcuriteTowerPacketV2    #Nursery
        extraHumidity3 = humidity.258E.AcuriteTowerPacketV2   #Nursery
    [[deltas]]
        rain = rain_total

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

# Options for extension 'bme280wx'
[Bme280wx]
    temperature_must_have = ""
    humidityKeys = inHumidity
    pressureKeys = pressure
    pressure_must_have = inTemp
    i2c_port = 1
    humidity_must_have = ""
    i2c_address = 0x76
    usUnits = US
    temperatureKeys = inTemp



So I'm trying to figure out why it won't populate the BME280 pressure/temp/humidity. Any ideas?

I'll also attach the syslog.
syslog (1)

gjr80

unread,
Jun 24, 2020, 9:07:52 PM6/24/20
to weewx-user
Hi,

It's worth noting the bme280wx service is not marked as WeeWX 4/python 3 compatible but that should not matter since it is a very simple service and you are running python2 .

Can you try running WeeWX directly. This will cause WeeWX to display the contents of the loop packets (lines starting with Loop:) and archive records (lines starting with REC:) to the console. Could you post the output back here making sure you capture at least one archive record (REC:). Would also help to see a copy of your [Engine] stanza from weewx.conf.

Gary

Gazza

unread,
Jun 25, 2020, 7:41:40 AM6/25/20
to weewx-user

I have just added this sensor to my test system and noticed that the bme280wx extension was updated a few weeks ago to be python3 compatible though I am still running python2.

Mine seems to be working fine, I have an SDR station with extra Onewire sensors and now the BME280 pressure sensor.

The barometer graph and the current conditions text is getting data but I had to edit the skins.conf to add inTemp and inHumidity back in to graphs as I had removed those item as they were not being used.

The only other thing I had to change was the i2c address of my BME280 module, it was set to 0x77.

[Bme280wx]  # Options for extension for BME280 pressure/temperature/humidity sensor


        temperature_must_have
= ""
        humidityKeys
= inHumidity
        pressureKeys
=
pressure
        pressure_must_have
= outTemp
        i2c_port
= 1
        humidity_must_have
= ""
        i2c_address
= 0x77

        usUnits
= US
        temperatureKeys
= inTemp



Another Gary


Gazza

unread,
Jun 25, 2020, 8:12:54 AM6/25/20
to weewx-user

Just a quick followup, this thread was also about a similar issue about missing data: https://groups.google.com/forum/#!topic/weewx-user/MycfgX74P1Y

The solution is to not leave the "*_must_have = " line blank, it needs to have a value.

I have added outTemp to both lines and now the additional temperature and humidity data is showing up.


The other Gary

Troy Roberts

unread,
Jun 25, 2020, 11:20:09 AM6/25/20
to weewx-user
Hopefully I gathered the information needed in the syslog. I ran weewx directly and again it failed to post pressure, temp, and humidity. This was around 10:50 timestamp. Also, below is a copy of my [Engine]:

[Engine]
    
    [[Services]]
        # This section specifies the services that should be run. They are
        # grouped by type, and the order of services within each group
        # determines the order in which the services will be run.
        prep_services = weewx.engine.StdTimeSynch
        # data_services = user.bme280.bme
        data_services = user.bme280wx.Bme280wx,
        process_services = weewx.engine.StdConvert, weewx.engine.StdCalibrate, weewx.engine.StdQC, weewx.wxservices.StdWXCalculate
        archive_services = weewx.engine.StdArchive
        restful_services = weewx.restx.StdStationRegistry, weewx.restx.StdWunderground, weewx.restx.StdPWSweather, weewx.restx.StdCWOP, weewx.restx.StdWOW, weewx.restx.StdAWEKAS
        report_services = weewx.engine.StdPrint, weewx.engine.StdReport
syslog (2)

Troy Roberts

unread,
Jun 25, 2020, 11:20:42 AM6/25/20
to weewx-user
I tried filling in the "must_have" sections with "inTemp" and it still didn't work.

Gazza

unread,
Jun 26, 2020, 3:53:24 AM6/26/20
to weewx-user

I have no idea what is going on then, mine is working as expected with the following in weewx.conf.

[Bme280wx]  # Options for extension for BME280 pressure/temperature/humidity sensor


        temperature_must_have
= outTemp
        humidityKeys
= inHumidity
        pressureKeys
= pressure
        pressure_must_have
= outTemp
        i2c_port
= 1
        humidity_must_have
= outTemp
        i2c_address
= 0x77

        usUnits
= US
        temperatureKeys
= inTemp

The other Gary
              

Troy Roberts

unread,
Jun 26, 2020, 7:22:04 AM6/26/20
to weewx-user
Just want to post that I resolved the issue. Looks like the [Bme280wx] section was the culprit. The "_must_have" section needed to equal a variable that was already being read by the SDR section. So, when I was defining "temperatureKeys=inTemp" and also defining the "_must_have=inTemp" this was causing the issue. Changing the "_must_have" to equal a variable that was already populated via the SDR section finally got it to work. So my [Bme280wx] now looks like this:

# Options for extension 'bme280wx'
[Bme280wx]
    temperature_must_have = outTemp
    humidityKeys = inHumidity
    pressureKeys = pressure
    pressure_must_have = extraTemp3 #my previous inTemp now an extraTemp3
    i2c_port = 1
    humidity_must_have = outTemp

Gazza

unread,
Jun 26, 2020, 7:59:28 AM6/26/20
to weewx-user

Hi Troy,

Is your bme280 producing lots of entries in the syslog ??

I'm currently running my test system manually and I'm getting a 'bme280:' entry in the syslog time a loop is generated.



Gary


Troy Roberts

unread,
Jun 26, 2020, 8:11:57 AM6/26/20
to weewx-user
I don't know what is considered a lot but here is a snipit from the syslog:
Jun 25 11:13:23 raspberrypi weewxd: bme280: BME280 data compensated_reading(id=7294ec37-8442-42eb-86bf-b93e8a0197c9, timestamp=2020-06-25 11:13:23.612755, temp=25.346 °C, pressure=1016.60 hPa, humidity=44.90 % rH)
Jun 25 11:13:23 raspberrypi weewxd: bme280: {u'pressure': 1016.597318819161, u'inHumidity': 48.0, u'inTemp': 25.1, 'usUnits': 16, 'dateTime': 1593098000}
Jun 25 11:13:23 raspberrypi weewxd: bme280: BME280 data compensated_reading(id=9acfec49-7635-4436-84b7-e829c01e1ea3, timestamp=2020-06-25 11:13:23.640299, temp=25.335 °C, pressure=1016.58 hPa, humidity=44.89 % rH)
Jun 25 11:13:23 raspberrypi weewxd: bme280: {u'pressure': 1016.5805200043127, u'inHumidity': 48.0, u'inTemp': 25.1, 'usUnits': 16, 'dateTime': 1593098000}
Jun 25 11:13:23 raspberrypi weewxd: bme280: BME280 data compensated_reading(id=9a3d02a1-3f22-48f1-8881-7be3e03dad38, timestamp=2020-06-25 11:13:23.671867, temp=25.346 °C, pressure=1016.60 hPa, humidity=44.89 % rH)
Jun 25 11:13:23 raspberrypi weewxd: bme280: {u'pressure': 1016.597318819161, u'inHumidity': 48.0, u'inTemp': 25.1, 'usUnits': 16, 'dateTime': 1593098000}
Jun 25 11:13:28 raspberrypi weewxd: bme280: BME280 data compensated_reading(id=ab2cb5a4-b9f7-4c8b-9613-11e77ee0b4b1, timestamp=2020-06-25 11:13:28.841409, temp=25.335 °C, pressure=1016.66 hPa, humidity=44.90 % rH)
Jun 25 11:13:28 raspberrypi weewxd: bme280: {'dateTime': 1593098003, u'extraHumidity1': 57.0, 'usUnits': 16, u'extraTemp1': 7.4}
Jun 25 11:13:28 raspberrypi weewxd: bme280: BME280 data compensated_reading(id=020f6fdb-dfaa-44f5-986d-b009eec3d080, timestamp=2020-06-25 11:13:28.897755, temp=25.330 °C, pressure=1016.63 hPa, humidity=44.89 % rH)
Jun 25 11:13:28 raspberrypi weewxd: bme280: {'dateTime': 1593098005, u'extraTemp2': 29.0, 'usUnits': 16, u'extraHumidity2': 64.0}
Jun 25 11:13:34 raspberrypi weewxd: bme280: BME280 data compensated_reading(id=7ed7258a-0165-493e-bec7-1ccc8f8ce84e, timestamp=2020-06-25 11:13:34.086541, temp=25.325 °C, pressure=1016.59 hPa, humidity=44.96 % rH)
Jun 25 11:13:34 raspberrypi weewxd: bme280: {u'rain': 0.0, 'dateTime': 1593098010, u'windDir': 270.0, u'windSpeed': 3.483, u'rain_total': 37.08, 'usUnits': 1}
Jun 25 11:13:34 raspberrypi weewxd: bme280: BME280 data compensated_reading(id=9bba44ff-121c-4545-bfc7-b2eba8fd03eb, timestamp=2020-06-25 11:13:34.122262, temp=25.325 °C, pressure=1016.62 hPa, humidity=44.95 % rH)
Jun 25 11:13:34 raspberrypi weewxd: bme280: {u'rain': 0.0, 'dateTime': 1593098010, u'windDir': 270.0, u'windSpeed': 3.483, u'rain_total': 37.08, 'usUnits': 1}
Jun 25 11:13:34 raspberrypi weewxd: bme280: BME280 data compensated_reading(id=b8d811b5-ac19-4589-9890-56cf36e1e8e2, timestamp=2020-06-25 11:13:34.159437, temp=25.340 °C, pressure=1016.62 hPa, humidity=44.96 % rH)
Jun 25 11:13:34 raspberrypi weewxd: bme280: {u'rain': 0.0, 'dateTime': 1593098010, u'windDir': 270.0, u'windSpeed': 3.483, u'rain_total': 37.08, 'usUnits': 1}
Jun 25 11:13:39 raspberrypi weewxd: bme280: BME280 data compensated_reading(id=511e9754-e346-4e5a-a0e5-61c73998423a, timestamp=2020-06-25 11:13:39.876641, temp=25.320 °C, pressure=1016.67 hPa, humidity=44.95 % rH)
Jun 25 11:13:39 raspberrypi weewxd: bme280: {u'pressure': 1016.666862188656, u'inHumidity': 48.0, u'inTemp': 25.1, 'usUnits': 16, 'dateTime': 1593098016}
Jun 25 11:13:39 raspberrypi weewxd: bme280: BME280 data compensated_reading(id=e6b206f1-4b48-457f-bf4e-cbca2d0e5f52, timestamp=2020-06-25 11:13:39.916447, temp=25.320 °C, pressure=1016.64 hPa, humidity=44.95 % rH)
Jun 25 11:13:39 raspberrypi weewxd: bme280: {u'pressure': 1016.6389771098443, u'inHumidity': 48.0, u'inTemp': 25.1, 'usUnits': 16, 'dateTime': 1593098016}
Jun 25 11:13:39 raspberrypi weewxd: bme280: BME280 data compensated_reading(id=7a923b2b-bd64-4fb1-9898-bf47be8d7dd9, timestamp=2020-06-25 11:13:39.953676, temp=25.330 °C, pressure=1016.68 hPa, humidity=44.96 % rH)
Jun 25 11:13:39 raspberrypi weewxd: bme280: {u'pressure': 1016.683662694853, u'inHumidity': 48.0, u'inTemp': 25.1, 'usUnits': 16, 'dateTime': 1593098016}
Jun 25 11:13:45 raspberrypi weewxd: bme280: BME280 data compensated_reading(id=58f88e82-3d30-479e-a9ee-da912aef20be, timestamp=2020-06-25 11:13:45.079439, temp=25.294 °C, pressure=1016.68 hPa, humidity=45.06 % rH)
Jun 25 11:13:45 raspberrypi weewxd: bme280: {'dateTime': 1593098019, u'extraHumidity1': 57.0, 'usUnits': 16, u'extraTemp1': 7.3}
Jun 25 11:13:45 raspberrypi weewxd: bme280: BME280 data compensated_reading(id=dd2d66f2-ea70-421f-96a1-0a6353ef9649, timestamp=2020-06-25 11:13:45.130684, temp=25.304 °C, pressure=1016.64 hPa, humidity=45.06 % rH)
Jun 25 11:13:45 raspberrypi weewxd: bme280: {'dateTime': 1593098021, u'extraTemp2': 29.0, 'usUnits': 16, u'extraHumidity2': 64.0}
Jun 25 11:13:52 raspberrypi weewxd: bme280: BME280 data compensated_reading(id=a577bc09-0692-4c4f-8a24-b4cb0dfc9c0d, timestamp=2020-06-25 11:13:52.953672, temp=25.310 °C, pressure=1016.62 hPa, humidity=45.14 % rH)
Jun 25 11:13:52 raspberrypi weewxd: bme280: {u'outHumidity': 80.0, u'outTemp': 82.6, u'windSpeed': 1.828, 'usUnits': 1, 'dateTime': 1593098029}
Jun 25 11:13:52 raspberrypi weewxd: bme280: BME280 data compensated_reading(id=11f6d301-a705-4e86-bad1-a77493003ebd, timestamp=2020-06-25 11:13:52.990584, temp=25.310 °C, pressure=1016.68 hPa, humidity=45.12 % rH)
Jun 25 11:13:52 raspberrypi weewxd: bme280: {u'outHumidity': 80.0, u'outTemp': 82.6, u'windSpeed': 1.828, 'usUnits': 1, 'dateTime': 1593098029}
Jun 25 11:13:53 raspberrypi weewxd: bme280: BME280 data compensated_reading(id=ae2d8f64-8eb7-46c6-a736-43f11c2d676a, timestamp=2020-06-25 11:13:53.029326, temp=25.310 °C, pressure=1016.62 hPa, humidity=45.14 % rH)
Jun 25 11:13:53 raspberrypi weewxd: bme280: {u'outHumidity': 80.0, u'outTemp': 82.6, u'windSpeed': 1.828, 'usUnits': 1, 'dateTime': 1593098029}


It seems bme280 is reading more times but not much more than the SDR. i noticed the "bme280" tag is showing for all of the SDR readings as well. The only data I am reading from bme280 is pressure, inTemp, and inHumidity. Everything else is coming via SDR.
Reply all
Reply to author
Forward
0 new messages