veista / nilan

Nilan integration for Home Assistant
Apache License 2.0
45 stars 10 forks source link

CTS700 - what is needed? #19

Open Chrunchy opened 1 year ago

Chrunchy commented 1 year ago

Ive currently added my Air 9 with CTS700 through modbus into HA with the network cable attached to the system. Currently i'm mapping each adress (Mine is a none geo version).

What is needed to add support for CTS700 too?

Mine is currently added to HA:

`modbus:
  - name: nilan
    type: tcp
    host: 192.168.2.217
    port: 502
    sensors:
      - name: nilan_humidity
    # Current humidity
        address: 21776
        unit_of_measurement: "%"
        slave: 1
      - name: nilan_t20_outdoor_temperature
    # Outdoor unit temperatur
        unit_of_measurement: "°C"
        slave: 4
        address: 20688
        count: 1
        scale: 0.1`

etc. etc.

Some data is placed at slave 1 (Indoor unit), and the outdoor unit data is placed on slave 4 for instance. Latest ModBus guide i could find is dated back in 2018, but seems to be working somewhat atleast. https://www.en.nilan.dk/Files/Files/Engelsk/Downloads/7.%20Modbus%20-%20BACnet/2018_04_Modbus_CTS700_Modbus_protokol.pdf

veista commented 1 year ago

Hi,

It's great that you are interested in this project! There are a lot of changes needed to the integration to accommodate cts700. If you are willing to help me with this endeavor I think we can succeed. I have never even seen a cts700 device so you will have to help me with testing, and give me detailed explinations with pictures etc. If needed. Remember that the integration should support all cts700 devices, not just your model/version.

I will start by writing up the registers. After that we will try to figure out how to saftely recognise your device through the integration.

When this is all done we can start adding functionality.

veista commented 1 year ago

Please respond if you are up for this? I can not do this by myself.

Chrunchy commented 1 year ago

I'm definitely up for helping with what i can, but i will have limited time from christmas and untill mid january. Currently i'm importing all registers from nilans documents for the CTS700. Of course i can't test everything as i don't have the geo model as mine is the Air9 with a air to water heatpump for centralheating. It's a limited amount of different registers for the GEO model.

jakobmoll commented 1 year ago

Hi

I'm currently using a manual modbus over tcp configuration for my Nilan Compact P (CTS700). The package I've setup for my integrations is listed here - perhaps this could help?

https://gist.github.com/jakobmoll/96d67a6e3c98b1742230057c5923da63

veista commented 1 year ago

Hi,

I'm at a bit of a loss here.

So I guess the older versions of Compact P use the manual found here https://symlink.dk/stuff/CTS700_MODBUS-rev%202.01.pdf

And the newer versions with Air and Geo support use the manual found in @Chrunchy link.

I'm not sure how to support both, I cannot seem to find a version register on the newer document.

Can you @Chrunchy test register 4632 if you can read the version number?

mbobinac commented 1 year ago

Hi,

i have Nilan CTS700 and looking for integration support. My version is 1.40.05.38 from 2015 and has not been updated since. I have a client app i can login as Installer (uses MODBUS to connect to CTS700) version 1.4.139 from 1.4.2018.

I can connect to CTS700 via the app from my server, but if i use MODBUS tools (Modbus pool) it says read error when connecting to CTS700. Not sure if permission or something else, i need password to login as Installer, but should not need anything to go as User. The Nilan App just does not allow anything else as Installer.

I've installed your HACS code, but when connecting to Nilan says "Invalid Response from Device" which is expected as you probably check some version data in one of the registers.

Cheers

veista commented 1 year ago

Hi. Unfortunately cts700 is not supported. I would like to add it, but it seems to be a mess to implement and I do not have access to one so debugging would be hard.

convicte commented 9 months ago

Hi @veista,

I've ended up purchasing an Elfin EW11A unit to integrate my Compact S pump, but struggle with finding both documentation (modbus registrars for compact S) as well as ready integrations.

If you could advise on what you'd need, I would be happy to at least try.

veista commented 9 months ago

Hi @veista,

I've ended up purchasing an Elfin EW11A unit to integrate my Compact S pump, but struggle with finding both documentation (modbus registrars for compact S) as well as ready integrations.

If you could advise on what you'd need, I would be happy to at least try.

I believe Compact S is a cts602 device so your question is in the wrong place. You can open a discussion, if you need generic help. I can not help with your setup: Read previous issues for hints, follow the instructions on the front page and then we can add Compact S to the supported devices.

lauer commented 9 months ago

Hi @veista I am also using @jakobmoll 's manuel modbud sensor config to interact with my Nilan Compact P Air 9 - CTS700.

Even though python is not my main language, I might be able to help testing and fixing stuff. Right now, the plugin gives the following error when trying to connect

  File "/config/custom_components/nilan/config_flow.py", line 108, in async_step_tcp
    await async_validate_device(
  File "/config/custom_components/nilan/config_flow.py", line 67, in async_validate_device
    result.registers[0].to_bytes(2, "little", signed=False),
    ~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range

But it could be a UnitID problem, because I can't see why it should be 30 as default. If its the same as slave, it should have been '1', but that doesn't work either.

veista commented 9 months ago

Hi,

Cts700 works differently than cts602. I have some modifications to support cts700 in my code, but at the moment absolutely NO functionality has been implemented. I have slowly made it even theoretically possible to support cts700. Adding support will take time and I am a busy man.

Thanks for your understanding, I will report here once there is something to test.

lauer commented 9 months ago

okay, so its not just creating a registry mapping for cts700 like the one for 602? Could you create a branch with you work until now?

veista commented 9 months ago

There is no branch yet. There is no code yet. It is complicated to add since I have not originally thought about adding cts700.

Keep in mind that there is also two types of cts700 as I mentioned before in this issue. Both are completely different.

maisun commented 5 months ago

Hi, I have tried to setup CTS700 myself with OH Modbus integration, I’d like to ask if anybody knows which register to read containing the below info: 1) Compressor state: can be off, defrosting, hot water production, heating, cooling 2) Flag indicate if the supplementary eletrical heater for the water tank is running or not (the red dot on the display) Many thanks!

lauer commented 5 months ago

I know you havn't written that it was ready.

However, I would like to give the new 1.12.13b on my Nilan CompactP Air a try, but I just get "invalid response" with no further log in console, when I try to add the integration.

I fetch data using modbus plugin in HA using the same IP, port and device (1), so I know it answers, but could it give problems, what some processes are already communicating with it?

Please tell me, how I can help testing it?

veista commented 5 months ago

Thanks for your enthusiasm. I will let you know when I need your help. It will take some time to get to that point.

Do you have the old or new cts700?

leonkdk commented 5 months ago

I have a CTS700 Touch. Display Software Version: 09.06.45 (2017-07-08) Print Software Version: 2.02.13.93 (2017-07-08) I am very interested in a working connection to my Home Assistant and as such would like to offer my help as well!

veista commented 3 months ago

I have finally started to create development tools for implementing cts700 devices.

It would be great help if owners of cts700 devices would dump all registers to a file with qmodmaster or equivalent accompanied with device information and a picture of the type plate.

Johannes-288 commented 3 months ago

Hello everyone, here is the yaml in a package of my Nilan Compct P Geo 6, which has already been working for a few weeks! Unfortunately, a few little things are still missing (for example: manual control of fan speed 1-4) A small note: I have translated my yaml from German into English. There might have been mistakes

modbus:

template:

terkilddk commented 2 months ago

I have a CTS700 and a Nilan compact P Air9 and would like to help, i use this config for my modbus connection today. https://pastebin.com/PZNHBRXM

Software is updated to latest version by Nilan last week

I will be happy to help with qmodmaster if someone can guide me.

lauer commented 2 months ago

Same here, however, I only have macs and linux servers, and most of the tools seems to require windows :/

maisun commented 2 months ago

I have a CTS700 and a Nilan compact P Air9 and would like to help, i use this config for my modbus connection today. https://pastebin.com/PZNHBRXM

Software is updated to latest version by Nilan last week

I will be happy to help with qmodmaster if someone can guide me.

Thanks for sharing your config! Have you figured out how to control active cooling? Neither 3284 nor 5288 works for me, already tried to Google for years with no clue....

veista commented 2 months ago

Same here, however, I only have macs and linux servers, and most of the tools seems to require windows :/

What do you mean? For example qmodmaster works on linux and is open source. You just need to compile it yourself.

veista commented 2 months ago

I have a CTS700 and a Nilan compact P Air9 and would like to help, i use this config for my modbus connection today. https://pastebin.com/PZNHBRXM

Software is updated to latest version by Nilan last week

I will be happy to help with qmodmaster if someone can guide me.

What kind of guidance do you need? The software is pretty straight forward.

veista commented 2 months ago

What I need is: 1. dump of all register contents. This can be tedious. 2. A picture of the device type plate. 3. A clear correlation between register in modbus and function in HMI

maisun commented 1 month ago

What I need is: 1. dump of all register contents. This can be tedious. 2. A picture of the device type plate. 3. A clear correlation between register in modbus and function in HMI

Hi @veista : today I tried the tool QModMaster however couldn't really get it to work. I have the "older" version of CTS700 so all registers are below 10000. How can I dump all registers with their contents? It can only read max 100 at a time, and looks to me like if there is any unknown register it will just fail to get the rest values. I think I know the addresses of almost everything except for Active Cooling - the address is not documented in the ModBus technical document, so the best approach is to find a tool that can somehow can dump all registers and compare before/after the change.

veista commented 1 month ago

What I need is: 1. dump of all register contents. This can be tedious. 2. A picture of the device type plate. 3. A clear correlation between register in modbus and function in HMI

Hi @veista : today I tried the tool QModMaster however couldn't really get it to work. I have the "older" version of CTS700 so all registers are below 10000. How can I dump all registers with their contents? It can only read max 100 at a time, and looks to me like if there is any unknown register it will just fail to get the rest values. I think I know the addresses of almost everything except for Active Cooling - the address is not documented in the ModBus technical document, so the best approach is to find a tool that can somehow can dump all registers and compare before/after the change.

As I said this can be tedious. You can write your own dump tool that suits your needs better easily with python.

maisun commented 1 month ago

What I need is: 1. dump of all register contents. This can be tedious. 2. A picture of the device type plate. 3. A clear correlation between register in modbus and function in HMI

Hi @veista : today I tried the tool QModMaster however couldn't really get it to work. I have the "older" version of CTS700 so all registers are below 10000. How can I dump all registers with their contents? It can only read max 100 at a time, and looks to me like if there is any unknown register it will just fail to get the rest values. I think I know the addresses of almost everything except for Active Cooling - the address is not documented in the ModBus technical document, so the best approach is to find a tool that can somehow can dump all registers and compare before/after the change.

As I said this can be tedious. You can write your own dump tool that suits your needs better easily with python.

Ok thanks! I don’t think I have the skills and time for that sadly.