2 harware sources one database how to?

225 views
Skip to first unread message

Greg from Oz

unread,
Mar 11, 2024, 1:49:59 AM3/11/24
to weewx-user
Hi,
I have spent hours trying to figure out how to have 2 hardware sources (sdr and fineoffset USB console) and get most data from the sdr and just the barometer and inside temperature from the fine offset USB console.

I just want all the data from both devices to go into the one database.

Is this even possible?

I have found examples of 2 hardware devices and 2 databases but I don't want that.

The reason I want to do this is because the console is showing a lot of :
ERROR weewx.drivers.fousb: get_observations failed: [Errno 19] No such device (it may have been disconnected)

The only way to fix those errors is to turn the console on and off which I have automated but it is doing it a lot lately and and it is even showing up on my graphs.

If I can't get the barometer and inside temperature I won't be heartbroken but it would be nice to be able to do that.

If I can get it to work I can just reset the console when it stops working and not have the barometer and inside temp but I should be able to at least get the majority of the data.

Is there any documentation with examples anywhere? I did find something about creating a service but that looked way to complicated for my paygrade.

Thanks

bell...@gmail.com

unread,
Mar 11, 2024, 7:44:15 PM3/11/24
to weewx-user
My solution was to run rtl_433 as a separate service that publishes to MQTT. I then run MQTTSubscribe to augment the station/driver data. I already had the MQTT infrastructure, so it was a minor lift for me.
Some more information is here, https://groups.google.com/g/weewx-user/c/svsbOxWvPZc/m/eLA6lhyJAAAJ.
rich

Greg from Oz

unread,
Mar 11, 2024, 9:51:38 PM3/11/24
to weewx-user
Yeah I think I will do the same . I was leaning that way because everything else looked too hard.
I have MQTT already set up.
Thanks

Greg from Oz

unread,
Mar 12, 2024, 4:14:53 AM3/12/24
to weewx-user
I have a question:
What happens if I get the same records from the SDR and the USB?
Is there a way to filter out the USB fineoffset data fields I don't need because they will be coming from the SDR?
I only need inside temperature and pressure from the USB.
I tried to comment out all the fields I didn't need in the fine offset driver but that failed.
/opt/weewx/weewx-venv/lib/python3.11/site-packages/weewx/drivers/fousb.py

Back to the drawing board.

tarob...@gmail.com

unread,
Mar 12, 2024, 10:06:48 AM3/12/24
to weewx-user
If all you are looking for is pressure and inside temp, depending on your setup, you could add a BME280 sensor (pressure, temp, and humidity). It used these instructions: https://github.com/bdwilson/acurite/blob/master/Pressure.md

And then add the bme280 weewx extension. Then you can run SDR as your driver and the bme280 data will be added as a service call.

Greg from Oz

unread,
Mar 12, 2024, 5:31:28 PM3/12/24
to weewx-user
Good idea.
I am getting the USB drop offs about 20 times a day so the USB console is failing. I have 3 USB consoles and they are all suspect, so time to do the SDR thing.

Jimi Lawson

unread,
Mar 12, 2024, 9:22:05 PM3/12/24
to weewx-user
I ran a Maplin  N96GY (rebadged F.O. WH1081) on Cumulus for over 10 years virtually trouble free, apart from the occasional usb lockup that a reboot sorted.  Last year I encountered the same problem with the usb connection, it got that bad I was lucky to maintain a connection for 20 minutes.
I tried setting up WEEEWX on a spare Pi 3B but got the same problem.  I had a spare SDR receiver which I used to prove the sensor array was ok.  I bought a BME280, connected that to the Pi  I2C Interface, instructions here https://pypi.org/project/RPi.bme280/ 
I use bme280wx (https://gitlab.com/wjcarpenter/bme280wx/-/archive/master/bme280wx-master.zip), it combines the sdr readings for rain, wind speed/direction, temp, humidity with the bme280 pressure,  temp/humidity into the main loop.  Been working fine for the last 10 months or so.
Jimi

Greg from Oz

unread,
Mar 14, 2024, 1:03:38 AM3/14/24
to weewx-user
Many thanks to all for suggestions.
It wasn't easy getting the bme280 to work. In the end I put the sensor on my sonoff SV which operates the garage door and upgraded the firmware to the one that supports sensors.....soldering and firmware  had to be done.
Because the shed/garage is so hot I decided to get the inside temperature and humidity from a zigbee device inside the house. That worked. (eventually)

I did spend a bit of time trying to work out the sub topic part for the bme280 and finally found an example that showed me I had to use underscores if the topic had embedded data which this one did in the tasmota firmware.

I will see what happens overnight as I had 30 emails telling me the USB failed overnight.


Hopefully it won't crash and burn.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages