SDR Help

96 views
Skip to first unread message

dave.sp...@gmail.com

unread,
Sep 29, 2021, 6:55:30 PM9/29/21
to weewx...@googlegroups.com

Ok, after playing around with the interceptor driver and not being able to make it work, I have decided to go the SDR route. I have been following the documentation from https://github.com/matthewwall/weewx-sdr. I was able to get the driver install and configured for weewx but when I run the driver directly using the command sudo PYTHONPATH=bin python bin/user/sdr.py –cmd”rtl_433 -M utc -F json” I get the following python error:

 

Traceback (most recent call last):

  File "bin/user/sdr.py", line 92, in <module>

    import weewx.units

  File "/home/weewx/bin/weewx/units.py", line 24, in <module>

    import weeutil.weeutil

  File "/home/weewx/bin/weeutil/weeutil.py", line 27, in <module>

    from weeutil.config import accumulateLeaves, search_up

  File "/home/weewx/bin/weeutil/config.py", line 11, in <module>

    import configobj

ImportError: No module named configobj

 

To make that says that configobj library is not install but it is.

 

This is a brand-new install of Raspbian 10 and everything else.

 

I can sudo rtl_433 -M utc -F json and I do get output from my weather station.

 

Anyone know how to fix the sdr.py issue that I stated above?

 

Thanks

Dave

gjr80

unread,
Sep 29, 2021, 7:24:33 PM9/29/21
to weewx-user
Hi,

Likely a python 2/3 problem. When you run the driver directly you need to use the same major python version that WeeWX uses, ie python2 or python3. The python version run when using the command ‘python’ varies from system to system. Check the WeeWX log (assuming you have run WeeWX) and just after startup it should log the python version used by WeeWX. If it’s python 3.x try using ‘python3’ instead of ‘python’ in the above command. Otherwise try ‘python2’. If you haven’t started WeeWX yet have a look at the first line of any of the WeeWX utilities, say wee_databae, and see what the shebang is. wee_database will be in /home/weewx/bin or /usr/share/weewx.

Gary

dave.sp...@gmail.com

unread,
Sep 29, 2021, 7:27:50 PM9/29/21
to weewx...@googlegroups.com

Thanks for the help. I can’t believe that I didn’t catch on to that. It is working now.

 

Thanks again

Dave

--
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/8c005628-3505-499e-845d-057dc92da6b7n%40googlegroups.com.

dave.sp...@gmail.com

unread,
Sep 30, 2021, 9:12:03 PM9/30/21
to weewx...@googlegroups.com

Ok, I have another issue that I am hoping that someone can help me out with. I am getting data if I run the rtl_433 outside of weewx, but once I try to run it from weewx, I get the following error. Does anyone have any idea on how to fix this?

 

Thanks

Dave

 

Oct  1 02:00:22 raspberrypi weewx[737] ERROR weewx.engine: Import of driver failed: failed to start process 'rtl_433 -M utc -F json': [Errno 2] No such file or directory: 'rtl_433': 'rtl_433' (<class 'weewx.WeeWxIOError'>)

Oct  1 02:00:22 raspberrypi weewx[737] CRITICAL weewx.engine:     ****  Traceback (most recent call last):

Oct  1 02:00:23 raspberrypi weewx[737] CRITICAL weewx.engine:     ****    File "/home/weewx/bin/user/sdr.py", line 198, in startup

Oct  1 02:00:23 raspberrypi weewx[737] CRITICAL weewx.engine:     ****      stderr=subprocess.PIPE)

Oct  1 02:00:23 raspberrypi weewx[737] CRITICAL weewx.engine:     ****    File "/usr/lib/python3.7/subprocess.py", line 775, in __init__

Oct  1 02:00:23 raspberrypi weewx[737] CRITICAL weewx.engine:     ****      restore_signals, start_new_session)

Oct  1 02:00:23 raspberrypi weewx[737] CRITICAL weewx.engine:     ****    File "/usr/lib/python3.7/subprocess.py", line 1522, in _execute_child

Oct  1 02:00:23 raspberrypi weewx[737] CRITICAL weewx.engine:     ****      raise child_exception_type(errno_num, err_msg, err_filename)

Oct  1 02:00:23 raspberrypi weewx[737] CRITICAL weewx.engine:     ****  FileNotFoundError: [Errno 2] No such file or directory: 'rtl_433': 'rtl_433'

Oct  1 02:00:23 raspberrypi weewx[737] CRITICAL weewx.engine:     ****

Oct  1 02:00:23 raspberrypi weewx[737] CRITICAL weewx.engine:     ****  During handling of the above exception, another exception occurred:

Oct  1 02:00:23 raspberrypi weewx[737] CRITICAL weewx.engine:     ****

Oct  1 02:00:23 raspberrypi weewx[737] CRITICAL weewx.engine:     ****  Traceback (most recent call last):

Oct  1 02:00:23 raspberrypi weewx[737] CRITICAL weewx.engine:     ****    File "/home/weewx/bin/weewx/engine.py", line 119, in setupStation

Oct  1 02:00:23 raspberrypi weewx[737] CRITICAL weewx.engine:     ****      self.console = loader_function(config_dict, self)

Oct  1 02:00:23 raspberrypi weewx[737] CRITICAL weewx.engine:     ****    File "/home/weewx/bin/user/sdr.py", line 147, in loader

Oct  1 02:00:23 raspberrypi weewx[737] CRITICAL weewx.engine:     ****      return SDRDriver(**config_dict[DRIVER_NAME])

Oct  1 02:00:23 raspberrypi weewx[737] CRITICAL weewx.engine:     ****    File "/home/weewx/bin/user/sdr.py", line 2674, in __init__

Oct  1 02:00:23 raspberrypi weewx[737] CRITICAL weewx.engine:     ****      self._mgr.startup(cmd, path, ld_library_path)

Oct  1 02:00:23 raspberrypi weewx[737] CRITICAL weewx.engine:     ****    File "/home/weewx/bin/user/sdr.py", line 207, in startup

Oct  1 02:00:23 raspberrypi weewx[737] CRITICAL weewx.engine:     ****      (cmd, e))

Oct  1 02:00:23 raspberrypi weewx[737] CRITICAL weewx.engine:     ****  weewx.WeeWxIOError: failed to start process 'rtl_433 -M utc -F json': [Errno 2] No such file or directory: 'rtl_433': 'rtl_433'

Oct  1 02:00:23 raspberrypi weewx[737] CRITICAL __main__: Unable to load driver: failed to start process 'rtl_433 -M utc -F json': [Errno 2] No such file or directory: 'rtl_433': 'rtl_433'

Oct  1 02:00:23 raspberrypi weewx[737] CRITICAL __main__:     ****  Exiting...

vince

unread,
Sep 30, 2021, 9:17:38 PM9/30/21
to weewx-user
You don't have rtl_433 in a location in the weewx $PATH.  This one comes up sooooooooo often.

Read through https://www.mail-archive.com/weewx...@googlegroups.com/msg35938.html for a recent discussion and solution.

dave.sp...@gmail.com

unread,
Sep 30, 2021, 10:13:15 PM9/30/21
to weewx...@googlegroups.com

Thank you. That help out a lot

 

Thanks

Dave

 

From: weewx...@googlegroups.com <weewx...@googlegroups.com> On Behalf Of vince
Sent: Thursday, September 30, 2021 7:18 PM
To: weewx-user <weewx...@googlegroups.com>

--

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.

Reply all
Reply to author
Forward
0 new messages