[weewx-user] Re: fineoffset usb lockup and Yepkit USB Switchable Hub

2017-06-07 Thread Don
Thanks for that. 

I tried downgrading pyusb but it seemed difficult.
I tried changing fousb.py to use the new version of pyusb but it seemed 
difficult. 
I tried making fousb.py use the legacy interface to pyusb but that turned 
into a black hole of pain.

So I hacked fousb.py to execute the yepkit command directly. yuck! but it 
seems to work.

Thanks,
Don

On Tuesday, 6 June 2017 13:32:21 UTC+10, Don wrote:
>
> 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 
> 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?

[weewx-user] Re: Steel Series Gauges and RealTime update - 2.5 second interval - how?

2017-06-07 Thread stefano siega

Hi
I have integrated the update to 2.5 seconds for steelseries gauges using 
the same system that uses Mesowx.
I read from mysql database just the values ​​that make sense to be updated 
every two seconds. All other values ​​are read in the gauge-data.txt file

Here my page at 2.5 second update: 
http://www.flysohigh.net/weather/weewx/oseacco/steelseries/index

Here my station: http://www.flysohigh.net/meteo-val-resia/


Il giorno lunedì 2 gennaio 2017 14:12:43 UTC+1, Devonian ha scritto:
>
> I have just invested in a Davis Vantage Pro2, which replaced my WS2300 and 
> have installed Weewx 3.6.2 on Debian ver8 replacing my previous weewx ver 
> 2.7 for the WS2300.
>
> I would like to get the Steel Series gauges performing real time updates 
> at the Davis loop interval of 2.5 seconds.
> I have them installed OK, but it uses my current archive interval of 5 
> minutes - not quite real time!
>
> I tried mesowx, but can't get the data to display - the page appears, but 
> no graphs.  Data is getting saved into my MySQL 'raw' database at regular 
> 2.5 second loop intervals.  I'll continue trying to figure this one out.
>
> So, my thoughts turned to using the raw database for Steel Series and to 
> use raw data instead of archive data.
> I'm primarily interested in wind speed/direction, so if I could only get 
> that to update @ 2.5 seconds, I'd be happy with the others at 5 minutes.
>
> Anyone got any ideas on how to use this raw data instead of archive?
> Maybe there's a better/simpler way to achieve this 2.5 second update?
>
> Regards,
>
> Nigel.
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.