Understandable, but why does it keep changing device ID? It's like it
keeps unplugging itself, and plugging itself back in.
And ProxMox uses strait LXC containers, not Docker. (
https://en.wikipedia.org/wiki/LXC)
On Sunday, September 30, 2018 at 6:48:21 PM UTC-7, Tom Keffer wrote:
>
> No idea. Acurite, along with other USB devices, are addressed by
> manufacturer and device ID on the USB bus, not by a /dev port.
>
> It sounds like this may be a Docker issue, not a WeeWX / Acurite issue.
> You may have more satisfaction on their support forum.
>
> -tk
>
> On Sun, Sep 30, 2018 at 2:22 PM Ryan Reid > wrote:
>
>> I am trying to run weewx on a container in ProxMox. I can do lsusb, find
>> the device, and properly forward it to the weewx container. It starts up
>> and works just fine. After a short while (exact time unknown) the "Device"
>> number increments on lsusb, which disables the forwarding of that device.
>> I'm not sure if it is a programming issue or acurite issue, but I need to
>> permanently forward that device to the container. Currently, I have a
>> symlink created and set to /dev/acurite in the host and forwarded to the
>> container, but I need a script or something to forward /dev/acurite to
>> /dev/bus/usb/002/XXX that changes when it increments.
>> Unless I can put into /weewx/bin/weewx/drivers/acurite.py to JUST use
>> the /dev/acurite device, but I don't know that much Python programming.
>>
>> *UPDATE*: Apparently when it gets a new "Device ID" the Container does
>> not update the major/minor numbers, and has to be rebooted to re-connect.
>> Any idea why it keeps incrementing the Device Number?
>>
>> Any help is appreciated.
>>
>> Thanks
>> Ryan
>>
>> *Examples*:
>>
>> ---
>> root@pve01:~# lsusb
>> Bus 002 Device 031: ID 24c0:0003
>> Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
>> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>> Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
>> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>> root@pve01:~# ls -l /dev/bus/usb/002/031
>> crw-rw-rw- 1 root root 189, 158 Sep 30 13:40 /dev/bus/usb/002/031
>> root@pve01:~# ls -la /dev/acurite
>> lrwxrwxrwx 1 root root 15 Sep 30 13:40 /dev/acurite -> bus/usb/002/031
>> root@pve01:~#
>>
>> ---
>> user@weewx:/$ lsusb
>> Bus 002 Device 031: ID 24c0:0003
>> Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
>> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>> Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
>> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>> user@weewx:/$ ls -l /dev/acurite
>> crw-rw-rw- 1 root root 189, 158 Sep 30 20:34 /dev/acurite
>> user@weewx:/$ ls -l /dev/bus/usb/002/031
>> lrwxrwxrwx 1 root root 12 Sep 30 21:11 /dev/bus/usb/002/031 ->
>> /dev/acurite
>> user@weewx:/$
>>
>> ---
>> *WORKING *
>> ---
>> user@weewx:~$ sudo ln -s /dev/acurite /dev/bus/usb/002/031
>> user@weewx:~$ sudo service weewx restart
>> user@weewx:~$ sudo service weewx status
>> * weewx.service - LSB: weewx weather system
>>Loaded: loaded (/etc/init.d/weewx; generated)
>>Active: active (running) since Sun 2018-09-30 21:17:22 UTC; 3s ago
>> Docs: man:systemd-sysv-generator(8)
>> Process: 428 ExecStop=/etc/init.d/weewx stop (code=exited,
>> status=0/SUCCESS)
>> Process: 456 ExecStart=/etc/init.d/weewx start (code=exited,
>> status=0/SUCCESS)
>> Tasks: 3 (limit: 4915)
>>CGroup: /system.slice/weewx.service
>>`-471 /usr/bin/python /home/weewx/bin/weewxd --daemon
>> --pidfile=/var/run/weewx.pid /home/weewx/weewx.conf
>>
>> Sep 30 21:17:22 weewx weewx[471]: engine: Loading service
>> weewx.engine.StdPrint
>> Sep 30 21:17:22 weewx weewx[471]: engine: Finished loading service
>> weewx.engine.StdPrint
>> Sep 30 21:17:22 weewx weewx[471]: engine: Loading service
>> weewx.engine.StdReport
>> Sep 30 21:17:22 weewx weewx[471]: engine: Finished loading service
>> weewx.engine.StdReport
>> Sep 30 21:17:22 weewx weewx[471]: engine: Starting up weewx version 3.8.2
>> Sep 30 21:17:22 weewx weewx[471]: engine: Station does not support
>> reading the time
>> Sep 30 21:17:22 weewx weewx[471]: engine: Starting main packet loop.
>> Sep 30 21:17:22 weewx weewx[471]: