I have a fineoffset weather station and a yepkit usb switchable hub running 
weewx version 3.7.2 on ubuntu 17.04.

The usb hub is at bus 001, device 004 and the weather station on port 1.

don@wee:~$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 04d8:f2f7 Microchip Technology, Inc. 
Bus 001 Device 011: ID 1941:8021 Dream Link WH1080 Weather Station / USB 
Missile Launcher
Bus 001 Device 004: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 007: ID 04ca:3007 Lite-On Technology Corp. 
Bus 001 Device 002: ID 0483:5020 STMicroelectronics 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

don@wee:~$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/8p, 480M
    |__ Port 2: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 
12M
    |__ Port 2: Dev 2, If 1, Class=Human Interface Device, Driver=usbhid, 
12M
    |__ Port 2: Dev 2, If 2, Class=Human Interface Device, Driver=usbhid, 
12M
    |__ Port 4: Dev 7, If 1, Class=Wireless, Driver=btusb, 12M
    |__ Port 4: Dev 7, If 0, Class=Wireless, Driver=btusb, 12M
    |__ Port 6: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 1: Dev 11, If 0, Class=Human Interface Device, Driver=, 
1.5M
        |__ Port 4: Dev 6, If 0, Class=Human Interface Device, Driver=, 12M

The relevant parts of the wee configuration are as follows.

[FineOffsetUSB]
    # This section is for the Fine Offset series of weather stations.
    
    # The station model, e.g., WH1080, WS1090, WS2080, WH3081
    model = WH3081
    
    # How often to poll the station for data, in seconds
    polling_interval = 60
    
    # The driver to use:
    driver = weewx.drivers.fousb

    power_cycle_hub = 001:004
    power_cycle_port = 1

When a lockup occurs (about every two or three weeks) the following is 
shown in the logs.

Jun 04 06:05:25 wee weewx[1729]: fousb: Attempting to power cycle
Jun 04 06:05:25 wee weewx[1729]: engine: Caught unrecoverable exception in 
engine:
Jun 04 06:05:25 wee weewx[1729]:     ****  %d format: a number is required, 
not NoneType
Jun 04 06:05:25 wee weewx[1729]:     ****  Traceback (most recent call 
last):
Jun 04 06:05:25 wee weewx[1729]:     ****    File 
"/usr/share/weewx/weewx/engine.py", line 865, in main
Jun 04 06:05:25 wee weewx[1729]:     ****      engine = 
engine_class(config_dict)
Jun 04 06:05:25 wee weewx[1729]:     ****    File 
"/usr/share/weewx/weewx/engine.py", line 77, in __init__
Jun 04 06:05:25 wee weewx[1729]:     ****      
self.loadServices(config_dict)
Jun 04 06:05:25 wee weewx[1729]:     ****    File 
"/usr/share/weewx/weewx/engine.py", line 141, in loadServices
Jun 04 06:05:25 wee weewx[1729]:     ****      
self.service_obj.append(weeutil.weeutil._get_object(svc)(self, config_dict))
Jun 04 06:05:25 wee weewx[1729]:     ****    File 
"/usr/share/weewx/weewx/engine.py", line 466, in __init__
Jun 04 06:05:25 wee weewx[1729]:     ****      if software_interval != 
self.engine.console.archive_interval:
Jun 04 06:05:25 wee weewx[1729]:     ****    File 
"/usr/share/weewx/weewx/drivers/fousb.py", line 991, in archive_interval
Jun 04 06:05:25 wee weewx[1729]:     ****      return 
self._archive_interval_minutes() * 60
Jun 04 06:05:25 wee weewx[1729]:     ****    File 
"/usr/share/weewx/weewx/drivers/fousb.py", line 1006, in 
_archive_interval_minutes
Jun 04 06:05:25 wee weewx[1729]:     ****      
power_cycle_station(self.pc_hub, self.pc_port)
Jun 04 06:05:25 wee weewx[1729]:     ****    File 
"/usr/share/weewx/weewx/drivers/fousb.py", line 715, in power_cycle_station
Jun 04 06:05:25 wee weewx[1729]:     ****      devid = "%s:%03d" % 
(bus.dirname, dev.devnum)
Jun 04 06:05:25 wee weewx[1729]:     ****  TypeError: %d format: a number 
is required, not NoneType
Jun 04 06:05:25 wee weewx[1729]:     ****  Exiting.


Also of interest, 

on@wee:~$ python2 usb_control-0.6.py --scan
Traceback (most recent call last):
  File "usb_control-0.6.py", line 190, in <module>
    main()
  File "usb_control-0.6.py", line 187, in main
    scan()
  File "usb_control-0.6.py", line 72, in scan
    print "device at %s:%03d" % (bus.dirname, dev.devnum)
TypeError: %d format: a number is required, not NoneType

Using the yepkit software I can turn the port on and off successfully.

Any one with any thoughts?

Thanks heaps,
Don




-- 
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.

Reply via email to