sinseman44 / koolnova-BMS-Integration

Koolnova air conditioning support for Home Assistant via BMS
MIT License
2 stars 1 forks source link

modbus via ethernet #2

Open Lk1975 opened 3 months ago

Lk1975 commented 3 months ago

Hi

Is it possbile to make it run using an ethernet to serial ( MOXA )? will it work with the old version of koolnova 100-cpnd00? thanks in advance

sinseman44 commented 3 months ago

Hello,

I don't know the Moxa device but this integration is developped only for serial bus communication. If Moxa device provide an ethernet node (IP, subnet, etc ..) in HA, this integration won't work. The koolnova 100-CPND00 have two RS485/Modbus communication port, so this integration should work with this controller if koolnova integrates all modbus registers like the controller 100-CPNR00.

Lk1975 commented 3 months ago

Moxa is an ethernet to serial modbus driver. with home assistant I use the same connected to a diesel generator to read modbus registers. So don't you think it can be integrated?

sinseman44 commented 3 months ago

I quickly read the Moxa NPort 5100 series manual. the manual says : "In addition to providing socket access, the NPort 5100 also comes with a Real COM/TTY driver that transmits all serial signals intact. This means that your existing COM/TTY-based software can be preserved, without needing to invest in additional software. [ ... ] Real Com Mode : [ ... ] The driver establishes a transparent connection between host and serial device by mapping the IP:Port of the NPort 5100’s serial port to a local COM/TTY port on the host computer. [ ... ] One of the major conveniences of using Real COM Mode is that Real COM Mode allows users to continue using RS-232/422/485 serial communications software that was written for pure serial communications applications. The driver intercepts data sent to the host’s COM port, packs it into a TCP/IP packet, and then redirects it through the host’s Ethernet card"

Normally, you should be able to use Moxa device between HA and the Koolnova controller without having to modify this integration ?

Lk1975 commented 3 months ago

yes, it should, I will try it next week. If it doesn't work I will have to create manually each sensor. I will keep you posted.

Lk1975 commented 2 months ago

No it doesn't work. Working with real com require to install a virtual com driver in home assistant which is impossible to me. I've replaced it with an usb key. Now I will try it....

sinseman44 commented 2 months ago

thanks for your reply.
Give me your feedback on this integration with the controller 100-cpnd00. I'll modify the README if it works well.

Lk1975 commented 2 months ago

I've tested and it doesn't work. I've enabled int 49 on the display, and I don't know if it's an issue with the usb key or something else. Do you know if there is a way from command line to test the modbus? otherwise I have to connect a windows pc to the modbus to test it.

sinseman44 commented 2 months ago

Have you try with the address "1" instead of the default (49) in the configuration of this integration. Other user reported me a possible issue with the modbus address.

Before connecting the modbus/USB dongle to your HA system, do you try it on a computer with modbus spy software ? the first time, I use software like modbus doctor or qmodmaster to validate the communication between my koolnova 100-CPNR00 controller and my Modbus/USB dongle connected to my laptop. Modbus commands available on the controller are:

Lk1975 commented 2 months ago

Before, I've tested it using ethernet moxa and a pc with easymodbus. I will test it again this weekend using modbus doctor that seems better

Lk1975 commented 2 months ago

I've tried also to read register 40004 using native modbus module, but it doesn't work either

sinseman44 commented 2 months ago

Before, I've tested it using ethernet moxa and a pc with easymodbus. I will test it again this weekend using modbus doctor that seems better

Can you explain, in details, your tests with Moxa, Koolnova Controller and easymodbus (schematics, configurations, screenshots, etc ...). I will be interested.

Lk1975 commented 2 months ago

Hi, I've made some more test. Initially I was thinking that my koolnova wasn't working. Yesterday I've made it working using my moxa in realcom mode and it works with slave 49. I was able to read all the register. So I've reattached my usb dongle and it doesn't work. I believe it's a problem of the usb key. this is the key that I am using: DSD Tech SH-U10 Convertitore da USB a RS485 per Modbus. what is yours?

sinseman44 commented 2 months ago

Hi, I used this (bought on Amazon) : DSD Tech SH-U11 Convertisseur USB vers RS485 RS422 avec Puce FTDI FT232R pour Modbus. I've checked the pinout of the two dongle (DSD Tech SH-U10 and DSD Tech SH-U11) and it's different for RS485. The main chip is also different : CP2102 for SH-U10 and FTDI FT232R for SH-U11.

Lk1975 commented 2 months ago

It works! It has arrived today the same usb dongle as yours, connected and it works! I've now setup in a second homassistance the connection with Koolnova. So far so good. Thanks

sinseman44 commented 2 months ago

Glad to read your message ! Can you confirm you use the koolnova 100-CPND00 controller ? because, i would update the README.md to add this controller (and his connection with the modbus dongle) if all work.

Lk1975 commented 2 months ago

Hi, yes that is the controller that I am using. It's working great! I have just to work a little on the entity nams to rename the way I like it :)