wmbusmeters / wmbusmeters

Read the wired or wireless mbus protocol to acquire utility meter readings.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Device cul:c1 is not working

mwildbolz opened this issue · comments

Type of request

Bug

OS version

Debian 11

wmbusmeters version

1.16.1-18-gc1509f6

Your message goes here

Hello!

After some time of working without problems, I suddenly get a timeout after a reset command leading to a not working state of wmbusmeters.
A restart of the container is not sufficient to restore operation. The CUL USB stick has to be removed and re-attached to the USB port. Afterwards, a container restart is needed.

My CUL stick is: nanoCUL USB Stick FTDI CC1101 868MHz FW 1.67 Knick-Antenne FHEM CUL 868
Meter is a Kamstrup FlowIQ 2200

Do you have any idea, what the problem could be? A docker-topic, or maybe wmbusmeters-topic, or a basic linux problem?
Time between failures is approx. some days to 20 days.

Logfile details as following:

(wmbus) reset completed /dev/ttyUSB0:cul[]
(wmbus) resetting /dev/ttyUSB0:cul[]
(wmbus) reset completed /dev/ttyUSB0:cul[]
(wmbus) resetting /dev/ttyUSB0:cul[]
(wmbus device) timeout request id 1
(cul) setting link mode(s) c1 is not supported for this cul device!
[ALARM SpecifiedDeviceNotFound] the device cul:c1 is not working
No wmbus device detected, waiting for a device to be plugged in.
[ALARM SpecifiedDeviceNotFound] the device cul:c1 is not working
[ALARM SpecifiedDeviceNotFound] the device cul:c1 is not working
[ALARM SpecifiedDeviceNotFound] the device cul:c1 is not working
[ALARM SpecifiedDeviceNotFound] the device cul:c1 is not working
[ALARM SpecifiedDeviceNotFound] the device cul:c1 is not working
[ALARM SpecifiedDeviceNotFound] the device cul:c1 is not working
No wmbus device detected, waiting for a device to be plugged in.

Docker-Compose File is:

version: "2"
services:
  wmbusmeters:
    image: wmbusmeters/wmbusmeters:latest
    container_name: wmbusmeters
    restart: always
    network_mode: host
    volumes:
      - ./config:/wmbusmeters_data
      - /etc/localtime:/etc/localtime:ro

    devices:
      - /dev/ttyUSBcul:/dev/ttyUSB0

Today, same thing again, after working for 8 days without any problems.
Any thoughts, where I could look to determine the root cause?

[2024-05-28_21:28:44] (wmbus) resetting /dev/ttyUSB0:cul[]
[2024-05-28_21:28:47] (wmbus) reset completed /dev/ttyUSB0:cul[]
[2024-05-28_23:28:46] (wmbus) resetting /dev/ttyUSB0:cul[]
[2024-05-28_23:28:54] (wmbus device) timeout request id 1
[2024-05-28_23:28:54] (cul) setting link mode(s) c1 is not supported for this cul device!
[2024-05-28_23:28:56] [ALARM SpecifiedDeviceNotFound] the device cul:c1 is not working
[2024-05-28_23:28:56] No wmbus device detected, waiting for a device to be plugged in.
[2024-05-28_23:29:58] [ALARM SpecifiedDeviceNotFound] the device cul:c1 is not working
[2024-05-28_23:31:00] [ALARM SpecifiedDeviceNotFound] the device cul:c1 is not working
[2024-05-28_23:32:02] [ALARM SpecifiedDeviceNotFound] the device cul:c1 is not working
[2024-05-28_23:33:04] [ALARM SpecifiedDeviceNotFound] the device cul:c1 is not working
[2024-05-28_23:34:06] [ALARM SpecifiedDeviceNotFound] the device cul:c1 is not working
[2024-05-28_23:35:08] [ALARM SpecifiedDeviceNotFound] the device cul:c1 is not working
[2024-05-28_23:36:10] [ALARM SpecifiedDeviceNotFound] the device cul:c1 is not working
[2024-05-28_23:37:12] [ALARM SpecifiedDeviceNotFound] the device cul:c1 is not working
[2024-05-28_23:38:14] [ALARM SpecifiedDeviceNotFound] the device cul:c1 is not working

Solving means re-plugging the USB stick AND re-starting wmbusmeters docker container. Restart of wmbusmeters alone does not solve the problem.

Can you try the new rtl_reset command that is installed in the docker container?

Ah, I know that rtl_reset by name only should reset rtl devices and not the cul, however what it does is that it
invokes libusb_reset_device which is a generic usb reset. Perhaps it can be used for cul.

https://github.com/ED6E0F17/rtl_reset/blob/master/rtl_reset.c

Can you try the new rtl_reset command that is installed in the docker container?

So, you mean in case of the next hang, i should issue this command instead of unplugging and re-plugging the usb stick?
How can I issue the command inside the container? I just had a look and didn't find anything...

Thanks