Open Temtaime opened 2 years ago
Interesting, the only mention of 1a86
in NUT codebase I see is for the (recently added) huawei-ups2000
driver.
It might be that the devices just happen to use the same USB interface chip, but give a shot to that driver - maybe the boxes are more closely related.
Thanks, just compiled and tried it, not working :(
Network UPS Tools - UPS driver controller 2.8.0
0.000000 [D1] Starting UPS: ups
0.000023 [D2] 1 remaining attempts
0.000029 [D2] exec: /lib/nut/huawei-ups2000 -DDD -a ups -u nut
Network UPS Tools - NUT Huawei UPS2000 (1kVA-3kVA) RS-232 Modbus driver 0.02 (2.8.0)
Warning: This is an experimental driver.
Some features may not function correctly.
0.000000 [D3] main_arg: var='driver' val='huawei-ups2000'
0.000020 [D3] main_arg: var='port' val='/dev/ttyUSB0'
0.000036 [D1] Built-in default or configured user for drivers 'nobody' was ignored due to 'nut' specified on command line
0.000041 [D1] debug level is '3'
0.000626 [D2] upsdrv_initups
0.016381 [D2] upsdrv_initinfo
0.016387 [D2] ser_send_buf
1.417537 unable to read from serial port /dev/ttyUSB0, retry...
1.417556 [D2] ser_send_buf
2.818698 unable to read from serial port /dev/ttyUSB0, retry...
2.818714 [D2] ser_send_buf
4.219866 unable to read from serial port /dev/ttyUSB0, retry...
4.219882 unable to read from serial port /dev/ttyUSB0!
4.221977 Driver failed to start (exit status=1)
The "Unable to read" looks fishy. Did you stop the other driver (or any other process) using the /dev/ttyUSB0
device node?
Yes, i've checked it one more time - nobody is using the port
Hm, one more thing - docs for huawei-2000 mention that a sufficiently recent linux kernel with a particular usb driver is required - got that in place?
CC @biergaizi
It uses ch341 chip, yes.
[ 4.918685] usbcore: registered new interface driver ch341 [ 4.918694] usbserial: USB Serial support registered for ch341-uart [ 4.918716] ch341 1-6:1.0: ch341-uart converter detected [ 4.931453] usb 1-6: ch341-uart converter now attached to ttyUSB0
I made a dump of com port when ups communicates with its software for windows. It seems to be something different from huawei.
There's connection initialization :
<20230107 03:20.44:455 TX> 01 03 27 10 00 01 8F 7B 05 03 4E 21 00 01 C2 AC 06 03 4E 21 00 01 C2 9F 0A 03 75 30 00 01 9F 72 <20230107 03:20.44:983 RX> 0A 03 02 00 00 1D 85 <20230107 03:20.45:254 TX> 04 03 4E 20 00 07 12 BF 0A 03 75 30 00 1B 1E B9 <20230107 03:20.45:745 RX> 0A 03 36 00 00 41 46 00 04 00 0C 02 58 08 B6 01 F3 08 C4 01 F3 00 04 00 5C 00 6C 00 0F 00 00 00 86 00 10 00 00 00 64 00 1F 00 00 00 00 00 00 00 00 00 02 00 01 00 00 00 01 4F 3B
Hm, one more thing - docs for huawei-2000 mention that a sufficiently recent linux kernel with a particular usb driver is required - got that in place?
CC @biergaizi
You got it backward. CH341 is an old and mature USB-to-serial/RS232 chip that has existed for around two decades and does not require any new driver, it's the go-to choice for millions of USB devices in all shapes and forms. In the case of Huawei UPS2000, it initially used a new and uncommon chip from MaxLinear/Exar, but in a later product revision, Huawei reverted to the generic CH341. Possibly due to chip shortage or compatibility.
For the MUST EP2000 PRO, my best guess is that the protocol has been changed, and it's unrelated to the serial chip. Huawei UPS2000's driver cannot be used for other devices that happen to have the same serial chip in it.
@Temtaime: I made a dump of com port when ups communicates with its software for windows. It seems to be something different from huawei.
Just to make sure the serial port is functional on Linux, perhaps you can try replaying the captured binary sequence of handshake, and see if at least you get a response.
Oh, sorry... Ok, thanks for clarification :)
@Temtaime : one more idea to test is if the UPS supports USB HID standard in fact (although use of /dev/ttyUSB0
in the original post does not keep me hopeful), e.g. probe it by something like:
:; usbhid-ups -s must -d1 -DDDDDD -x port=auto -x vendorid=1a86 -x productid=7523
...would it data-dump anything useful?
Otherwise, it remains that they use some serial(-over-USB) protocol that is not in Megatec Qx family. There are other serial-capable drivers in NUT that you could try.
https://en.must-ee.com/archives/category/upper-computer-software suggests that EP2000 is handled by "WinCC" and EP2000PRO by "PowerMonitor", names which do not ring a bell. Other devices are handled by "ViewPower" which nutdrv_qx man page does mention.
Perhaps you as a paying client can ask MUST for protocol/specs and written permission/license needed to develop a NUT driver (and find someone to code one), or better yet entice them to step up and contribute a NUT driver themselves (promoting their sales along the way). One leverage point is that the two softwares mentioned above are for Windows, so users on other OSes are not covered. Given how their https://www.mustpower.com/ website is about inverters for off-grid survival (solar on trailers, etc.) - and per https://www.mustpower.com/ep2000-pro-series-low-frequency-power-inverter-charger-300-1000w/ "EP2000 PRO series inverter is a cost effective, intelligent with UPS function" - nowadays some Raspberry Pi and HomeAssistant managing stuff sounds like a reasonable target audience.
Has anyone found a way to connect this type of remote control to home assistant?
Has anyone found a way to connect this type of remote control to home assistant?
I use Modbus Home Assistant extention. All information needed to setup sensors can be found here: EP3000Plus Modbus RTU Protocol1.0 - Eng.xlsx
Has anyone found a way to connect this type of remote control to home assistant?
I use Modbus Home Assistant extention. All information needed to setup sensors can be found here: EP3000Plus Modbus RTU Protocol1.0 - Eng.xlsx
Can you show me an example of one of the sensors? for some reason it shows "unavailable"
Here some of my sensors:
Here some of my sensors:
Thank you very much! Everything works great!
Hi all. Are there any changes to the topic? Are there any chances that this device will receive a working driver for NUT?
Hello !
Tried blazer_ser and nutdrv_qx.
Any advices how to setup this ups? :( BTW thanks for such a great tool