wh23xx driver and weewx 4.6.2

380 views
Skip to first unread message

f4n...@gmail.com

unread,
Feb 26, 2022, 9:32:42 AM2/26/22
to weewx-user
Is anyone using the wh23xx driver (https://github.com/matthewwall/weewx-wh23xx) on weewx 4.6.2? I can't choose the driver after installation. Or is only one user driver per installation possible?

Thanks for any help or idea

Tom Keffer

unread,
Feb 26, 2022, 11:04:56 AM2/26/22
to weewx-user
Unfortunately, WeeWX can only use one driver at a time. The price we pay for avoiding a complex, asynchronous engine.

On Sat, Feb 26, 2022 at 6:32 AM f4n...@gmail.com <f4n...@gmail.com> wrote:
Is anyone using the wh23xx driver (https://github.com/matthewwall/weewx-wh23xx) on weewx 4.6.2? I can't choose the driver after installation. Or is only one user driver per installation possible?

Thanks for any help or idea

--
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/92917d38-d7ff-457c-868d-1a99da2c30aan%40googlegroups.com.

f4n...@gmail.com

unread,
Feb 26, 2022, 11:55:42 AM2/26/22
to weewx-user
But could it work with weewx-multi? 

f4n...@gmail.com

unread,
Feb 27, 2022, 2:18:39 AM2/27/22
to weewx-user
Just to clarify what i'm trying to do:

Reading out a WH65 -> 2 weewx instances (SDR, Interceptor)* -> this works so far 
Reading out a WH2310 -> 3rd weewx instance (wh23xx driver) -> doesn't show up in driver menu if i do wee_config -reconfigure weewx-3.conf

Hope this is possible without using multiple devices. Do i have to run the 3rd weewx instance in docker or which ways to achieve this are possible?

* [SDR for redundancy because of possible network downtimes with the Interceptor solution when the wifi/router is down, loss of power or rebooting]

gjr80

unread,
Feb 27, 2022, 4:30:19 AM2/27/22
to weewx-user
Regards the WH23xx driver, have you actually installed the WH23xx driver? Is the file wh23xx.py in the /home/weewx/user directory? If not you need to install the driver, if the file exists then something else is amiss. I note the wh23xx driver has not yet been ported to python 3, if the driver is installed what version of python are you running WeeWX under?

Gary

f4n...@gmail.com

unread,
Mar 1, 2022, 5:38:50 AM3/1/22
to weewx-user
I tried to install it several times, and i have the wh23xx.py in /usr/share/weewx/user
but not sure if i copied it there by myself, as i couldn't see it after installation. But i have install.py for sure in the installer directory in the wh23xx directory

Still, after wee_config -- reconfigure /etc/weewx/weewx.conf i just get: 

Installed drivers include:
  0) Interceptor     (user.interceptor)        
  1) SDR             (user.sdr)                
  2) AcuRite         (weewx.drivers.acurite)  
  3) CC3000          (weewx.drivers.cc3000)    
  4) FineOffsetUSB   (weewx.drivers.fousb)    
  5) Simulator       (weewx.drivers.simulator)
  6) TE923           (weewx.drivers.te923)    
  7) Ultimeter       (weewx.drivers.ultimeter)
  8) Vantage         (weewx.drivers.vantage)  
  9) WMR100          (weewx.drivers.wmr100)    
 10) WMR300          (weewx.drivers.wmr300)    
 11) WMR9x8          (weewx.drivers.wmr9x8)    
 12) WS1             (weewx.drivers.ws1)      
 13) WS23xx          (weewx.drivers.ws23xx)    
 14) WS28xx          (weewx.drivers.ws28xx)

(I named my instances weewx-sdr, weewx-interceptor and the 3rd instance for the local usb stations i just wanted to leave named weewx so weewx.conf.)

Regarding python versions, this is the output i get:
root@raspi-wsdi1b:/# python --version
Python 2.7.16
root@raspi-wsdi1b:/# python3 --version
Python 3.7.3
root@raspi-wsdi1b:/# ps aux | grep weewx
root       696  8.5  3.6  72104 34164 ?        Sl   Feb27 287:07 python /usr/share/weewx/weewxd --daemon --log-label weewx-weewx-sdr --pidfile=/var/run/weewx-weewx-sdr.pid /etc/weewx/weewx-sdr.conf
root      7766  9.5  3.6  62912 34240 ?        Sl   11:05   2:26 python /usr/share/weewx/weewxd --daemon --log-label weewx-weewx-interceptor --pidfile=/var/run/weewx-weewx-interceptor.pid /etc/weewx/weewx-interceptor.conf
root      8088  0.0  0.0   7360   524 pts/6    S+   11:30   0:00 grep weewx


Shouldn't there be python2 or python3 before the weewx path? Or does this mean it's running on python 1?

gjr80

unread,
Mar 2, 2022, 8:22:38 PM3/2/22
to weewx-user
I should have tweaked before; whilst I realised the wh23xx driver had not been ported to python3 for some reason I had assumed it would still function under python2 and WeeWX4, this is not the case. I have done a quick port of the current wh23xx driver to python3/WeeWX 4 and it should now be compatible with WeeWX 4.x under python2 or python3. Could you try this version by replacing your current /usr/share/weewx/user/wh23xx.py with the attached file. Let me know how you go, in particular whether the driver functions correctly under WeeWX and I will submit a PR to the author.

Gary
wh23xx.py

f4n...@gmail.com

unread,
Mar 3, 2022, 5:47:08 AM3/3/22
to weewx-user
Thanks a lot for the port! Now it appears in the drivers list! 

Whether it works correctly I'll find out when I'll be on site to plug it in, as I have it still connected to another system until this installation is completely ready, but I will definitely try it out in the next few days.

f4n...@gmail.com

unread,
Mar 8, 2022, 6:59:55 AM3/8/22
to weewx-user
Unfortunately it didn't work:

CRITICAL __main__:
line 252, in <module>
import usb
ImportError: No module named usb

Screenshot_2022-03-07-18-43-51-84_cr.jpg

vince

unread,
Mar 8, 2022, 1:23:17 PM3/8/22
to weewx-user
For python3
sudo apt install python3-usb

For python2
    sudo apt install python-usb


f4n...@gmail.com

unread,
Mar 17, 2022, 11:11:31 AM3/17/22
to weewx-user
It is now running flawlessly, as far as I can tell, since 4 days on my new weewx system. 

My weewx instances on that system all seem to run on python2 and I'm also still on weewx 4.6.2. I will try to run it with python3 and update weewx to 4.7 and see how it goes, next time when I find some time for it.

Thanks so far for all the help

st

unread,
Mar 17, 2024, 7:05:42 AM3/17/24
to weewx-user
  Gary Thank you very much; I installed your driver version, and it works flawlessly on Weewx 5.0.2.
Reply all
Reply to author
Forward
0 new messages