Hi,
On my proxmox 8.4 machine (debian 12) where I plugged the USB of an ecoflow river 3 plus I got a traceback when running r3pcomms:
# lsusb|grep EcoFlo
Bus 003 Device 006: ID 3746:ffff EcoFlow EF-UPS-RIVER 3 Plus
# uv run python -m r3pcomms --serial /dev/ttyACM0 --hid
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/root/ecoflow/r3pcomms/src/r3pcomms/__main__.py", line 164, in <module>
main(sys.argv[1:], "python -m r3pcomms")
File "/root/ecoflow/r3pcomms/src/r3pcomms/__main__.py", line 156, in main
run(**run_args)
File "/root/ecoflow/r3pcomms/src/r3pcomms/__main__.py", line 16, in run
with R3PComms(com, usb, dbg) as d:
^^^^^^^^^^^^^^^^^^^^^^^
File "/root/ecoflow/r3pcomms/src/r3pcomms/_r3pcomms.py", line 52, in __init__
raise ValueError(
ValueError: 0x3746:0xffff not found. Check Vendor ID and Product ID
Looking at the content of devices I got:
{'path': b'3-1:1.0', 'vendor_id': 14150, 'product_id': 65535, 'serial_number': 'xxxxx', 'release_number': 256, 'manufacturer_string': 'EcoFlow', 'product_string': 'EF-UPS-RIVER 3 Plus', 'usage_page': 0, 'usage': 0, 'interface_number': 0, 'bus_type': 1}
The device["path"] does not contains "hidraw" as the code seems to expect, so I just shot circuited this check:
# git diff
diff --git a/src/r3pcomms/_r3pcomms.py b/src/r3pcomms/_r3pcomms.py
index 0fe37b7..b4996db 100644
--- a/src/r3pcomms/_r3pcomms.py
+++ b/src/r3pcomms/_r3pcomms.py
@@ -85,6 +85,7 @@ class R3PComms:
devices = hid.enumerate()
for device in devices:
if device["vendor_id"] == vid and device["product_id"] == pid:
+ ret = device["path"]
if "hidraw" in device["path"].decode("utf-8"):
ret = device["path"]
And all worked fine.
Hi,
On my proxmox 8.4 machine (debian 12) where I plugged the USB of an ecoflow river 3 plus I got a traceback when running r3pcomms:
Looking at the content of devices I got:
The
device["path"]does not contains "hidraw" as the code seems to expect, so I just shot circuited this check:And all worked fine.