Ive managed to get it working by doing the same as Berhard has explained in his post:
Then to fix error with backend driver missing you need to help the /home/ weewx/bin/weewx/drivers/ws28xx.py driver file find the installed usb driver: import usb.backend.libusb1 backend = usb.backend.libusb1.get_backend(find_library=lambda x: "/usr/lib/libusb-1.0.so") I have changed the file /home/weewx/bin/weewx/drivers/ws28xx.py in the following way before: import usb import weewx.drivers after: import usb import usb.backend.libusb1 backend = usb.backend.libusb1.get_backend(find_library=lambda x: "/usr/lib/ libusb-1.0.so <http://www.google.com/url?q=http%3A%2F%2Flibusb-1.0.so&sa=D&sntz=1&usg=AFQjCNG8hxm34VxHmJU_T8SZr1lt2jYJ-w> ") import weewx.drivers weewx starts and collects data from Op zondag 17 juni 2018 09:51:20 UTC+2 schreef Hiljo Lodewijk: > > Hello everyone, > > I’ve been running Weewx on my Synology NAS DS216+II for about 4 years now. > I always used the attached manual to install Weewx. This worked great. > Untill a recent update of the OS. Suddenly Weewx cannot find the USB device > of my TFA Primus anymore.. > > The USB device is attached. The command lsusb shows: > Bus 001 Device 002: ID 6666:5555 > Bus 001 Device 003: ID f400:f400 > Bus 001 Device 001: ID 1d6b:0002 > Bus 002 Device 001: ID 1d6b:0003 > > When I run weewx I get exception 'No backend available'. More users have > had this error. The problem of most users is that python cannot find the > USB modules. > > The strange thing is that if I run python on the command line, it cannot > find the libUSB library first, but if I import it manually (import > usb.backend.libusb01), it does work. See below: > > $ python > Python 2.7.12 (default, May 15 2018, 03:33:53) > [GCC 4.9.3 20150311 (prerelease)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import usb > >>> usb.core.find() > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/usr/lib/python2.7/site-packages/usb/core.py", line 829, in find > raise ValueError('No backend available') > ValueError: No backend available > >>> import usb.backend.libusb01 > >>> usb.core.find() > <usb.core.Device object at 0x7f3d511fb250> > > So my question is that if it is possible to import the > usb.backend.libusb01 library somewhere in the Weewx core (or driver) to > make it run correctly again. > I already tried to import it in the WS28xx.py file, but that doesn’t work > unfortunately. Any ideas for help? > > Thanks in advance! > -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
