Klimalogg driver fails after update to weewx 5.0.0.1

85 views
Skip to first unread message

Marco Biner

unread,
Feb 6, 2024, 3:40:51 AMFeb 6
to weewx-user
Hello
seems that I am one of the rare users of the kl.py application from Matthew Wall.
As google does not help me with a solution here my problem.
After the last update of weewx to version 5.0.0.1 kl.py fails importing the driver:

the log file reports:

Feb  6 08:46:44 curlevon weewxd[3865888]: INFO __main__: Initializing weewxd version 5.0.1
Feb  6 08:46:44 curlevon weewxd[3865888]: INFO __main__: Command line: /usr/share/weewx/weewxd.py /etc/weewx/weewx.conf
Feb  6 08:46:44 curlevon weewxd[3865888]: INFO __main__: Using Python 3.9.2 (default, Feb 28 2021, 17:03:44) #012[GCC 10.2.1 20210110]
Feb  6 08:46:44 curlevon weewxd[3865888]: INFO __main__: Located at /usr/bin/python3
Feb  6 08:46:44 curlevon weewxd[3865888]: INFO __main__: Platform Linux-6.1.21-v8+-aarch64-with-glibc2.31
Feb  6 08:46:44 curlevon weewxd[3865888]: INFO __main__: Locale: 'en_US.UTF-8'
Feb  6 08:46:44 curlevon weewxd[3865888]: INFO __main__: Entry path: /usr/share/weewx/weewxd.py
Feb  6 08:46:44 curlevon weewxd[3865888]: INFO __main__: WEEWX_ROOT: /etc/weewx
Feb  6 08:46:44 curlevon weewxd[3865888]: INFO __main__: Configuration file: /etc/weewx/weewx.conf
Feb  6 08:46:44 curlevon weewxd[3865888]: INFO __main__: User module: /etc/weewx/bin/user
Feb  6 08:46:44 curlevon weewxd[3865888]: INFO __main__: Debug: 1
Feb  6 08:46:44 curlevon weewxd[3865888]: DEBUG __main__: Initializing engine
Feb  6 08:46:44 curlevon weewxd[3865888]: INFO weewx.engine: Loading station type KlimaLogg (user.kl)
Feb  6 08:46:44 curlevon weewxd[3865888]: INFO user.kl: driver version is 1.4.2
Feb  6 08:46:44 curlevon weewxd[3865888]: INFO user.kl: channel is 1
Feb  6 08:46:44 curlevon weewxd[3865888]: INFO user.kl: frequency is EU
Feb  6 08:46:44 curlevon weewxd[3865888]: DEBUG user.kl: using custom sensor map
Feb  6 08:46:44 curlevon weewxd[3865888]: INFO user.kl: sensor map is: {'temp0': 'Temp0', 'humidity0': 'Humidity0', 'heatindex0': 'heatindex0', 'dewpoint0': 'dewpoint0', 'temp1': 'Temp1', 'humidity1': 'Humidity1', 'heatindex1': 'heatindex1', 'dewpoint1': 'dewpoint1', 'temp2': 'Temp2', 'humidity2': 'Humidity2', 'heatindex2': 'heatindex2', 'dewpoint2': 'dewpoint2', 'temp3': 'Temp3', 'humidity3': 'Humidity3', 'heatindex3': 'heatindex3', 'dewpoint3': 'dewpoint3', 'temp4': 'Temp4', 'humidity4': 'Humidity4', 'heatindex4': 'heatindex4', 'dewpoint4': 'dewpoint4', 'temp5': 'Temp5', 'humidity5': 'Humidity5', 'temp6': 'Temp6', 'humidity6': 'Humidity6', 'temp7': 'Temp7', 'humidity7': 'Humidity7', 'temp8': 'Temp8', 'humidity8': 'Humidity8', 'rxCheckPercent': 'SignalQuality', 'batteryStatus0': 'BatteryStatus0', 'batteryStatus1': 'BatteryStatus1', 'batteryStatus2': 'BatteryStatus2', 'batteryStatus3': 'BatteryStatus3', 'batteryStatus4': 'BatteryStatus4', 'batteryStatus5': 'BatteryStatus5', 'batteryStatus6': 'BatteryStatus6', 'batteryStatus7': 'BatteryStatus7', 'batteryStatus8': 'BatteryStatus8', 'Sensor1': 'Kollektor warm aus', 'Sensor2': 'Kollektor kalt in', 'Sensor3': 'Speicher unten', 'Sensor4': 'Waermepumpe Ruecklauf', 'Sensor5': 'Boiler warm aus', 'Sensor6': 'Boiler kalt in', 'Sensor7': 'Speicher Mitte', 'Sensor8': 'Speicher oben', 'Sensor9': 'Speicher Brauchwasser', 'Sensor10': 'Schacht', 'Sensor11': 'Erdsonde 1', 'Sensor12': 'Erdsonde 2', 'Sensor13': 'Heizung Vorlauf', 'Sensor14': 'Temperatur 5Zi Wohnug', 'Sensor15': 'Temperatur Aussen', 'Sensor16': 'Warmwasser', 'Sensor17': 'Drehzahl Pumpe Brauchwasser'}
Feb  6 08:46:44 curlevon weewxd[3865888]: INFO user.kl: catchup limited to 51200 records
Feb  6 08:46:44 curlevon weewxd[3865888]: INFO user.kl: timing is 300 ms (0.300 s)
Feb  6 08:46:44 curlevon weewxd[3865888]: DEBUG user.kl: CommunicationService.init
Feb  6 08:46:44 curlevon weewxd[3865888]: INFO user.kl: comm_interval is 8
Feb  6 08:46:44 curlevon weewxd[3865888]: INFO user.kl: logger_channel is 1
Feb  6 08:46:44 curlevon weewxd[3865888]: INFO user.kl: found transceiver at bus= device=
Feb  6 08:46:44 curlevon weewxd[3865888]: ERROR weewx.engine: Import of driver failed: The device has no langid (<class 'ValueError'>)
Feb  6 08:46:44 curlevon weewxd[3865888]: CRITICAL weewx.engine:     ****  Traceback (most recent call last):
Feb  6 08:46:44 curlevon weewxd[3865888]: CRITICAL weewx.engine:     ****    File "/usr/share/weewx/weewx/engine.py", line 115, in setupStation
Feb  6 08:46:44 curlevon weewxd[3865888]: CRITICAL weewx.engine:     ****      self.console = loader_function(config_dict, self)
Feb  6 08:46:44 curlevon weewxd[3865888]: CRITICAL weewx.engine:     ****    File "/etc/weewx/bin/user/kl.py", line 1242, in loader
Feb  6 08:46:44 curlevon weewxd[3865888]: CRITICAL weewx.engine:     ****      return KlimaLoggDriver(**config_dict[DRIVER_NAME])
Feb  6 08:46:44 curlevon weewxd[3865888]: CRITICAL weewx.engine:     ****    File "/etc/weewx/bin/user/kl.py", line 1796, in __init__
Feb  6 08:46:44 curlevon weewxd[3865888]: CRITICAL weewx.engine:     ****      self.startUp()
Feb  6 08:46:44 curlevon weewxd[3865888]: CRITICAL weewx.engine:     ****    File "/etc/weewx/bin/user/kl.py", line 1977, in startUp
Feb  6 08:46:44 curlevon weewxd[3865888]: CRITICAL weewx.engine:     ****      self._service.setup(self.frequency, self.comm_interval,
Feb  6 08:46:44 curlevon weewxd[3865888]: CRITICAL weewx.engine:     ****    File "/etc/weewx/bin/user/kl.py", line 4050, in setup
Feb  6 08:46:44 curlevon weewxd[3865888]: CRITICAL weewx.engine:     ****      self.hid.open(vendor_id, product_id, serial)
Feb  6 08:46:44 curlevon weewxd[3865888]: CRITICAL weewx.engine:     ****    File "/etc/weewx/bin/user/kl.py", line 3021, in open
Feb  6 08:46:44 curlevon weewxd[3865888]: CRITICAL weewx.engine:     ****      self.devh = self._open_device(device)
Feb  6 08:46:44 curlevon weewxd[3865888]: CRITICAL weewx.engine:     ****    File "/etc/weewx/bin/user/kl.py", line 3074, in _open_device
Feb  6 08:46:44 curlevon weewxd[3865888]: CRITICAL weewx.engine:     ****      loginf('manufacturer: %s' % handle.getString(dev.iManufacturer, 30))
Feb  6 08:46:44 curlevon weewxd[3865888]: CRITICAL weewx.engine:     ****    File "/usr/lib/python3/dist-packages/usb/legacy.py", line 283, in getString
Feb  6 08:46:44 curlevon weewxd[3865888]: CRITICAL weewx.engine:     ****      return util.get_string(self.dev, index, langid).encode('ascii')
Feb  6 08:46:44 curlevon weewxd[3865888]: CRITICAL weewx.engine:     ****    File "/usr/lib/python3/dist-packages/usb/util.py", line 314, in get_string
Feb  6 08:46:44 curlevon weewxd[3865888]: CRITICAL weewx.engine:     ****      raise ValueError("The device has no langid")
Feb  6 08:46:44 curlevon weewxd[3865888]: CRITICAL weewx.engine:     ****  ValueError: The device has no langid
Feb  6 08:46:44 curlevon weewxd[3865888]: CRITICAL __main__: Unable to load driver: The device has no langid
Feb  6 08:46:44 curlevon weewxd[3865888]: CRITICAL __main__:     ****  Exiting...

any help would be fine.
Regards
Marco

michael.k...@gmx.at

unread,
Feb 6, 2024, 4:02:18 AMFeb 6
to weewx-user
So this is a package install? Did you do try restating already? A friend had the same error with a package install update 5.0.0 =>  5.0.1 on Raspberry Pi OS, but with the ws23xx driver. He restarted the OS, then it worked. Maybe restarting udev or another daemon is sufficient also, I don't know.

Marco Biner

unread,
Feb 6, 2024, 4:34:01 AMFeb 6
to weewx-user
Hi Michael
thanks for your hint, after a reboot it works, I did not assume that debian adapts wind*ws style to do a reboot after updates.
Regards
Marco

Tom Keffer

unread,
Feb 6, 2024, 8:10:50 AMFeb 6
to weewx...@googlegroups.com
With new Version 5 installs, the user owning the daemon has changed. That sometimes requires logging out, then logging back in. A reboot should not be necessary.

--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/74815d5c-5db8-44ce-a1ad-5ae6ad3b94ccn%40googlegroups.com.

matthew wall

unread,
Feb 6, 2024, 10:42:57 AMFeb 6
to weewx-user
On Tuesday, February 6, 2024 at 4:02:18 AM UTC-5 michael.k...@gmx.at wrote:
So this is a package install? Did you do try restating already? A friend had the same error with a package install update 5.0.0 =>  5.0.1 on Raspberry Pi OS, but with the ws23xx driver. He restarted the OS, then it worked. Maybe restarting udev or another daemon is sufficient also, I don't know.

reboot is not necessary.  however, it might be the easiest thing to do.  on most recent operating systems, the udev rules will take effect immediately.  if they do not, then unplug-then-replug the device will make them take effect, even on older operating systems.  the other part is ensuring that the owner of the daemon user is in the right group.  restarting the daemon process is sufficient to make that happen.

this should explain the ws23xx case, since the udev rule for that device is included in a weewx install.

in the case of klimalogg, the udev rule is also included with weewx, even though the kl.py driver is not.

if you install weewx using deb/rpm, it should just work.  check the udev file at /usr/lib/udev/rules.d/60-weewx.rules.

if you install weewx using pip, then you must install the udev rules that came with weewx (the setup-daemon.sh script will do this for you).  check for the udev rules at /etc/udev/rules.d/60-weewx.rules

NB: klimalogg uses the same usb transceiver used by the lacrosse ws28xx stations.  that transceiver uses product/vendor identifiers of 5555/6666.  those identifiers are the equivalent of using 'example.com' - ok for testing, but not what you should ship in your product.  but they did.

m

Marco Biner

unread,
Feb 7, 2024, 3:43:51 AMFeb 7
to weewx-user
Hi Matthew
thank you for the detailed explanation.
As I am using the kl.py to survey the climate in my house together with a heatpump contolled by a solution from https://www.ta.co.at/ each update of weewx brings some surprizes :-)
But I am still convinced that Keffers application is a very good tool.
Regards
Reply all
Reply to author
Forward
0 new messages