There is probably a better way, and I'm not there yet, but here are the
changes:
$ diff /usr/share/weewx/weewx/drivers/te923.py{,-20220826}
1503c1503
< ENDPOINT_IN = 0x81
---
> ENDPOINT_IN = 0x83 # 0x81
1513c1513,1514
< def __init__(self, vendor_id=0x1130, product_id=0x6801,
---
> #def __init__(self, vendor_id=0x1130, product_id=0x6801,
> def __init__(self, vendor_id=0x1130, product_id=0x0829,
Still only get a timeout.
Aug 26 15:04:43 hostname systemd[1]: Starting LSB: weewx weather
system...
Aug 26 15:04:43 hostname weewx[40158]: * Starting weewx weather system
weewx
Aug 26 15:04:43 hostname weewx[40169] INFO __main__: Initializing weewx
version 4.8.0
Aug 26 15:04:43 hostname weewx[40169] INFO __main__: Using Python
3.10.4 (main, Jun 29 2022, 12:14:53) [GCC 11.2.0]
Aug 26 15:04:43 hostname weewx[40169] INFO __main__: Platform
Linux-5.15.0-46-generic-x86_64-with-glibc2.35
Aug 26 15:04:43 hostname weewx[40169] INFO __main__: Locale is
'LC_CTYPE=en_US.UTF-8;LC_NUMERIC=nb_NO.UTF-8;LC_TIME=nb_NO.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=nb_NO.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=nb_NO.UTF-8;LC_NAME=nb_NO.UTF-8;LC_ADDRESS=nb_NO.UTF-8;LC_TELEPHONE=nb_NO.UTF-8;LC_MEASUREMENT=nb_NO.UTF-8;LC_IDENTIFICATION=nb_NO.UTF-8'
Aug 26 15:04:43 hostname weewx[40169] INFO __main__: Using
configuration file /etc/weewx/weewx.conf
Aug 26 15:04:43 hostname weewx[40169] INFO __main__: Debug is 0
Aug 26 15:04:43 hostname weewx[40169] INFO __main__: PID file is
/var/run/weewx.pid
Aug 26 15:04:43 hostname weewx[40172] INFO weewx.engine: Loading
station type TE923 (weewx.drivers.te923)
Aug 26 15:04:43 hostname weewx[40172] INFO weewx.drivers.te923: driver
version is 0.41.1
Aug 26 15:04:43 hostname weewx[40172] INFO weewx.drivers.te923: polling
interval is 60
Aug 26 15:04:43 hostname weewx[40172] INFO weewx.drivers.te923: sensor
map is {'windLinkStatus': 'link_wind', 'windBatteryStatus': 'bat_wind',
'rainLinkStatus': 'link_rain', 'rainBatteryStatus': 'bat_rain',
'uvLinkStatus': 'link_uv', 'uvBatteryStatus': 'bat_uv', 'inTemp': 't_in',
'inHumidity': 'h_in', 'outTemp': 't_1', 'outHumidity': 'h_1',
'outTempBatteryStatus': 'bat_1', 'outLinkStatus': 'link_1', 'extraTemp1':
't_2', 'extraHumid1': 'h_2', 'extraBatteryStatus1': 'bat_2',
'extraLinkStatus1': 'link_2', 'extraTemp2': 't_3', 'extraHumid2': 'h_3',
'extraBatteryStatus2': 'bat_3', 'extraLinkStatus2': 'link_3', 'extraTemp3':
't_4', 'extraHumid3': 'h_4', 'extraBatteryStatus3': 'bat_4',
'extraLinkStatus3': 'link_4', 'extraTemp4': 't_5', 'extraHumid4': 'h_5',
'extraBatteryStatus4': 'bat_5', 'extraLinkStatus4': 'link_5'}
Aug 26 15:04:43 hostname weewx[40158]: ...done.
Aug 26 15:04:43 hostname systemd[1]: Started LSB: weewx weather system.
Aug 26 15:04:43 hostname weewx[40172] INFO weewx.drivers.te923: Found
device on USB bus= device=
Aug 26 15:04:44 hostname weewx[40172] ERROR weewx.drivers.te923: Failed
attempt 1 of 5 to read data: [Errno 110] Operation timed out
Aug 26 15:04:48 hostname weewx[40172] ERROR weewx.drivers.te923: Failed
attempt 2 of 5 to read data: [Errno 110] Operation timed out
Aug 26 15:04:53 hostname weewx[40172] ERROR weewx.drivers.te923: Failed
attempt 3 of 5 to read data: [Errno 110] Operation timed out
Aug 26 15:04:57 hostname weewx[40172] ERROR weewx.drivers.te923: Failed
attempt 4 of 5 to read data: [Errno 110] Operation timed out
Aug 26 15:05:01 hostname weewx[40172] ERROR weewx.drivers.te923: Failed
attempt 5 of 5 to read data: [Errno 110] Operation timed out
Aug 26 15:05:04 hostname weewx[40172] ERROR weewx.engine: Import of
driver failed: Read failed after 5 tries (<class 'weewx.RetriesExceeded'>)
Aug 26 15:05:04 hostname weewx[40172] CRITICAL weewx.engine: ****
Traceback (most recent call last):
Aug 26 15:05:04 hostname weewx[40172] CRITICAL weewx.engine: ****
File "/usr/share/weewx/weewx/engine.py", line 119, in setupStation
Aug 26 15:05:04 hostname weewx[40172] CRITICAL weewx.engine: ****
self.console = loader_function(config_dict, self)
Aug 26 15:05:04 hostname weewx[40172] CRITICAL weewx.engine: ****
File "/usr/share/weewx/weewx/drivers/te923.py", line 460, in loader
Aug 26 15:05:04 hostname weewx[40172] CRITICAL weewx.engine: ****
return TE923Driver(**config_dict[DRIVER_NAME])
Aug 26 15:05:04 hostname weewx[40172] CRITICAL weewx.engine: ****
File "/usr/share/weewx/weewx/drivers/te923.py", line 1141, in __init__
Aug 26 15:05:04 hostname weewx[40172] CRITICAL weewx.engine: ****
self.station.open()
Aug 26 15:05:04 hostname weewx[40172] CRITICAL weewx.engine: ****
File "/usr/share/weewx/weewx/drivers/te923.py", line 1562, in open
Aug 26 15:05:04 hostname weewx[40172] CRITICAL weewx.engine: ****
self.read_memory_size()
Aug 26 15:05:04 hostname weewx[40172] CRITICAL weewx.engine: ****
File "/usr/share/weewx/weewx/drivers/te923.py", line 1757, in
read_memory_size
Aug 26 15:05:04 hostname weewx[40172] CRITICAL weewx.engine: ****
buf = self._read(0xfc)
Aug 26 15:05:04 hostname weewx[40172] CRITICAL weewx.engine: ****
File "/usr/share/weewx/weewx/drivers/te923.py", line 1737, in _read
Aug 26 15:05:04 hostname weewx[40172] CRITICAL weewx.engine: ****
raise weewx.RetriesExceeded("Read failed after %d tries" %
Aug 26 15:05:04 hostname weewx[40172] CRITICAL weewx.engine: ****
weewx.RetriesExceeded: Read failed after 5 tries
Aug 26 15:05:04 hostname weewx[40172] CRITICAL __main__: Unable to load
driver: Read failed after 5 tries
Aug 26 15:05:04 hostname weewx[40172] CRITICAL __main__: ****
Exiting...
fredag 26. august 2022 kl. 14:45:11 UTC+2 skrev Stein Arne Storslett:
> Editing the ENDPOINT_IN to `0x83` in
> `/usr/share/weewx/weewx/drivers/te923.py` gets past this, but I only get a
> timeout.
>
> `Aug 26 14:39:36 hostname wee_device[37965] ERROR weewx.drivers.te923:
> Failed attempt 10 of 10 to read data: [Errno 110] Operation timed out`
> tirsdag 10. november 2020 kl. 20:50:23 UTC+1 skrev [email protected]:
>
>> Hi.
>> I've struggled for some time with a weewx installation with a byows
>> station. Kind of odd hw.
>> So now I bought a "standard" weather station to keep it simple.
>> However, the lsusb show *Bus 001 Device 007: ID 1130:0829 Tenx
>> Technology, Inc.*
>> I tried the te923 driver but no luck.
>> Googled but no luck..
>> Any advice on how to go forward?
>> I tried editing the te923 driver with the new device id, but got stuck on
>> memory size.
>>
>>
>>
>> *Cheers/Sven TStockholm, Sweden*
>>
>>
>> *lsusb -v*
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *Bus 001 Device 007: ID 1130:0829 Tenx Technology, Inc.Device
>> Descriptor: bLength 18 bDescriptorType 1
>> bcdUSB 1.10 bDeviceClass 0 (Defined at Interface
>> level) bDeviceSubClass 0 bDeviceProtocol 0
>> bMaxPacketSize0 8 idVendor 0x1130 Tenx Technology, Inc.
>> idProduct 0x0829 bcdDevice 1.00
>> iManufacturer 1 TENX iProduct 2 TMU313X USB
>> R/W64 iSerial 0 bNumConfigurations 1 Configuration
>> Descriptor: bLength 9 bDescriptorType 2
>> wTotalLength 41 bNumInterfaces 1
>> bConfigurationValue 1 iConfiguration 0
>> bmAttributes 0x80 (Bus Powered) MaxPower
>> 100mA Interface Descriptor: bLength 9
>> bDescriptorType 4 bInterfaceNumber 0
>> bAlternateSetting 0 bNumEndpoints 2
>> bInterfaceClass 3 Human Interface Device
>> bInterfaceSubClass 0 No Subclass bInterfaceProtocol 0
>> None iInterface 0 HID Device Descriptor:
>> bLength 9 bDescriptorType 33
>> bcdHID 1.10 bCountryCode 33 US
>> bNumDescriptors 1 bDescriptorType 34
>> Report wDescriptorLength 39 Report Descriptor:
>> (length is 39) Item(Global): Usage Page, data= [ 0xa0 0xff ]
>> 65440 (null) Item(Local ): Usage,
>> data= [ 0x01 ] 1 (null) Item(Main ):
>> Collection, data= [ 0x01 ] 1
>> Application Item(Local ): Usage, data= [ 0x01 ]
>> 1 (null) Item(Global): Logical
>> Minimum, data= [ 0x00 ] 0 Item(Global): Logical Maximum, data= [
>> 0xff 0x00 ] 255 Item(Global): Report Size, data= [ 0x40 ]
>> 64 Item(Global): Report Count, data= [ 0x08 ] 8
>> Item(Main ): Output, data= [ 0x02 ] 2 Data
>> Variable Absolute No_Wrap Linear Preferred_State
>> No_Null_Position Non_Volatile
>> Bitfie
>>
>> ld Item(Global): Report Count, data= [ 0x08 ] 8
>> Item(Global): Report Size, data= [ 0x40 ] 64 Item(Global):
>> Logical Minimum, data= [ 0x00 ] 0 Item(Global): Logical Maximum,
>> data= [ 0xff 0x00 ] 255 Item(Local ): Usage, data= [ 0x01 ]
>> 1 (null) Item(Local ): Usage Minimum,
>> data= [ 0x00 ] 0 (null) Item(Local ):
>> Usage Maximum, data= [ 0xff 0x00 ] 255
>> (null) Item(Main ): Input, data= [ 0x00 ]
>> 0 Data Array Absolute No_Wrap
>> Linear Preferred_State No_Null_Position
>> Non_Volatile
>> Bitfie
>>
>> ld Item(Main ): End Collection, data=none Endpoint
>> Descriptor: bLength 7 bDescriptorType
>> 5 bEndpointAddress 0x83 EP 3 IN bmAttributes
>> 3 Transfer Type Interrupt Synch
>> Type None Usage Type Data
>> wMaxPacketSize 0x0040 1x 64 bytes bInterval
>> 1 Endpoint Descriptor: bLength 7
>> bDescriptorType 5 bEndpointAddress 0x04 EP 4 OUT
>> bmAttributes 3 Transfer Type
>> Interrupt Synch Type None Usage
>> Type Data wMaxPacketSize 0x0040 1x 64
>> bytes bInterval 1Device Status: 0x0000 (Bus
>> Powered)*
>>
>> ***************************'''*
>> *syslog*
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *Nov 10 20:48:34 mirrorpi weewx[3213] INFO weewx.engine: Loading station
>> type TE923 (weewx.drivers.te923)Nov 10 20:48:34 mirrorpi weewx[3213] INFO
>> weewx.drivers.te923: driver version is 0.41.1Nov 10 20:48:34 mirrorpi
>> weewx[3213] INFO weewx.drivers.te923: polling interval is 10Nov 10 20:48:34
>> mirrorpi weewx[3213] INFO weewx.drivers.te923: sensor map is
>> {'extraBatteryStatus1': 'bat_2', 'outTemp': 't_1', 'outHumidity': 'h_1',
>> 'extraHumid4': 'h_5', 'uvBatteryStatus': 'bat_uv', 'extraHumid2': 'h_3',
>> 'extraHumid3': 'h_4', 'rainLinkStatus': 'link_rain', 'extraHumid1': 'h_2',
>> 'rainBatteryStatus': 'bat_rain', 'extraTemp2': 't_3', 'extraTemp4': 't_5',
>> 'uvLinkStatus': 'link_uv', 'windLinkStatus': 'link_wind', 'outLinkStatus':
>> 'link_1', 'extraBatteryStatus2': 'bat_3', 'extraBatteryStatus3': 'bat_4',
>> 'windBatteryStatus': 'bat_wind', 'outTempBatteryStatus': 'bat_1',
>> 'extraBatteryStatus4': 'bat_5', 'extraTemp3': 't_4', 'extraLinkStatus1':
>> 'link_2', 'extraLinkStatus2': 'link_3', 'extraLinkStatus3': 'link_4',
>> 'extraLinkStatus4': 'link_5', 'inTemp': 't_in', 'inHumidity': 'h_in',
>> 'extraTemp1': 't_2'}Nov 10 20:48:34 mirrorpi weewx[3213] INFO
>> weewx.drivers.te923: Found device on USB bus= device=Nov 10 20:48:34
>> mirrorpi weewx[3213] DEBUG weewx.drivers.te923: read: address 0x0000fcNov
>> 10 20:48:34 mirrorpi weewx[3213] ERROR weewx.engine: Import of driver
>> failed: Invalid endpoint address 0x81 (<type 'exceptions.ValueError'>)Nov
>> 10 20:48:34 mirrorpi weewx[3213] CRITICAL weewx.engine: **** Traceback
>> (most recent call last):Nov 10 20:48:34 mirrorpi weewx[3213] CRITICAL
>> weewx.engine: **** File "/usr/share/weewx/weewx/engine.py", line
>> 109, in setupStationNov 10 20:48:34 mirrorpi weewx[3213] CRITICAL
>> weewx.engine: **** self.console = loader_function(config_dict,
>> self)Nov 10 20:48:34 mirrorpi weewx[3213] CRITICAL weewx.engine:
>> **** File "/usr/share/weewx/weewx/drivers/te923.py", line 460, in
>> loaderNov 10 20:48:34 mirrorpi weewx[3213] CRITICAL weewx.engine:
>> **** return TE923Driver(**config_dict[DRIVER_NAME])Nov 10 20:48:34
>> mirrorpi weewx[3213] CRITICAL weewx.engine: **** File
>> "/usr/share/weewx/weewx/drivers/te923.py", line 1141, in __init__Nov 10
>> 20:48:34 mirrorpi weewx[3213] CRITICAL weewx.engine: ****
>> self.station.open()Nov 10 20:48:34 mirrorpi weewx[3213] CRITICAL
>> weewx.engine: **** File "/usr/share/weewx/weewx/drivers/te923.py",
>> line 1561, in openNov 10 20:48:34 mirrorpi weewx[3213] CRITICAL
>> weewx.engine: **** self.read_memory_size()Nov 10 20:48:34 mirrorpi
>> weewx[3213] CRITICAL weewx.engine: **** File
>> "/usr/share/weewx/weewx/drivers/te923.py", line 1756, in
>> read_memory_sizeNov 10 20:48:34 mirrorpi weewx[3213] CRITICAL
>> weewx.engine: **** buf = self._read(0xfc)Nov 10 20:48:34 mirrorpi
>> weewx[3213] CRITICAL weewx.engine: **** File
>> "/usr/share/weewx/weewx/drivers/te923.py", line 1726, in _readNov 10
>> 20:48:34 mirrorpi weewx[3213] CRITICAL weewx.engine: **** buf =
>> self._raw_read(addr)Nov 10 20:48:34 mirrorpi weewx[3213] CRITICAL
>> weewx.engine: **** File "/usr/share/weewx/weewx/drivers/te923.py",
>> line 1603, in _raw_readNov 10 20:48:34 mirrorpi weewx[3213] CRITICAL
>> weewx.engine: **** self.ENDPOINT_IN, self.READ_LENGTH,
>> self.TIMEOUT)Nov 10 20:48:34 mirrorpi weewx[3213] CRITICAL
>> weewx.engine: **** File
>> "/usr/lib/python2.7/dist-packages/usb/legacy.py", line 188, in
>> interruptReadNov 10 20:48:34 mirrorpi weewx[3213] CRITICAL
>> weewx.engine: **** return self.dev.read(endpoint, size,
>> timeout)Nov 10 20:48:34 mirrorpi weewx[3213] CRITICAL weewx.engine:
>> **** File "/usr/lib/python2.7/dist-packages/usb/core.py", line 975, in
>> readNov 10 20:48:34 mirrorpi weewx[3213] CRITICAL weewx.engine:
>> **** intf, ep = self._ctx.setup_request(self, endpoint)Nov 10 20:48:34
>> mirrorpi weewx[3213] CRITICAL weewx.engine: **** File
>> "/usr/lib/python2.7/dist-packages/usb/core.py", line 102, in wrapperNov 10
>> 20:48:34 mirrorpi weewx[3213] CRITICAL weewx.engine: **** return
>> f(self, *args, **kwargs)Nov 10 20:48:34 mirrorpi weewx[3213] CRITICAL
>> weewx.engine: **** File
>> "/usr/lib/python2.7/dist-packages/usb/core.py", line 215, in
>> setup_requestNov 10 20:48:34 mirrorpi weewx[3213] CRITICAL
>> weewx.engine: **** intf, ep =
>> self.get_interface_and_endpoint(device, endpoint_address)Nov 10 20:48:34
>> mirrorpi weewx[3213] CRITICAL weewx.engine: **** File
>> "/usr/lib/python2.7/dist-packages/usb/core.py", line 102, in wrapperNov 10
>> 20:48:34 mirrorpi weewx[3213] CRITICAL weewx.engine: **** return
>> f(self, *args, **kwargs)Nov 10 20:48:34 mirrorpi weewx[3213] CRITICAL
>> weewx.engine: **** File
>> "/usr/lib/python2.7/dist-packages/usb/core.py", line 231, in
>> get_interface_and_endpointNov 10 20:48:34 mirrorpi weewx[3213] CRITICAL
>> weewx.engine: **** raise ValueError('Invalid endpoint address ' +
>> hex(endpoint_address))Nov 10 20:48:34 mirrorpi weewx[3213] CRITICAL
>> weewx.engine: **** ValueError: Invalid endpoint address 0x81Nov 10
>> 20:48:34 mirrorpi weewx[3213] CRITICAL __main__: Unable to load driver:
>> Invalid endpoint address 0x81Nov 10 20:48:34 mirrorpi weewx[3213] CRITICAL
>> __main__: **** Exiting...*
>>
>
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/05256bac-13e1-4cc6-b904-f20aafbb9ef8n%40googlegroups.com.