hi patrick,

unfortunately, every acurite station looks the same - there is no unique 
identifier that lets you distinguish one station from another via the USB 
interface.

if chaney instruments had done it right, they would have burned a serial 
number into each device, not just idProduct and idVendor.

in lieu of an identifier for each device, another approach is to 
distinguish devices based on their locations in the usb tree.  if you could 
do that, then you could conceivably plug them into a usb hub that has ports 
whose addresses are repeatable across reboots (that might even apply to the 
usb 'hub' built in to the computer).

i am not sure whether this is possible, but it would be a fun little 
project to determine the feasibility.  and it is probably easier now that 
libusb is not as volatile as it was 10 years ago.

when you initiate communication with a HID (which is how the acurite and 
other usb-based stations present themselves), you specify idProduct and 
idVendor, then take the first one that shows up.  if a device has a unique 
identifier, you can match on that too (the ws28xx transceviers are an 
example of this.  some, but not all, USB-to-serial converters are too, but 
they are not HID).  it *might* be possible to use the usb tree information 
to distinguish devices.  or maybe the HID interface lets you enumerate them 
- not sure whether the libusb and pyusb layers even let you determine 
whether there are multiple devices that match.

m

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/1ef9de61-4b62-4818-8dd1-eec25bade230n%40googlegroups.com.

Reply via email to