Code Monkey home page Code Monkey logo

Comments (44)

veista avatar veista commented on July 19, 2024 2

I can add some experimental entities for the ascii fields.

That would apply/work for all Nilan presumably...

Unfortunately only models without the touch panel. These registers have been removed after touch screen.

Qmodmaster is a great tool to debug and experiment the button presses. If you get it to work I can add a button entity category at some point.

from nilan.

gllmlbrt avatar gllmlbrt commented on July 19, 2024 2

Definitely some improvement, now only the one left as below:

Logger: homeassistant.components.modbus.modbus
Source: components/modbus/modbus.py:391
Integration: Modbus (documentation, issues)
First occurred: 07:10:45 (2006 occurrences)
Last logged: 12:45:00

Pymodbus: Nilan: Exception Response(132, 4, IllegalAddress)

Image below for the type:
IMG20221207062004

from nilan.

gllmlbrt avatar gllmlbrt commented on July 19, 2024 1

This is all meant to read"HEAT >1< 22C"

from nilan.

veista avatar veista commented on July 19, 2024 1

Ok. Adding the buttons may take some time.

You can try to improve the refresh rate by shortening the update interval from const.py . Be warned though, if it is too short you will face issues.

from nilan.

gllmlbrt avatar gllmlbrt commented on July 19, 2024 1

Great ! Error gone with latest beta.

from nilan.

veista avatar veista commented on July 19, 2024

Can you provide a sample for the ascii and other register values?

from nilan.

gllmlbrt avatar gllmlbrt commented on July 19, 2024

Well here is it from qmodmaster:
image
The display shows only 16 bits, and does not allow me to show all of them due to size, I suspect HA modbus integration could do that ?

But that is binary which should be converted to text...
Not sure how else to get all of it out. BUt anyways converting what I can see, It matches what is written on the panel.

from nilan.

veista avatar veista commented on July 19, 2024

You can just show dec or hex

from nilan.

gllmlbrt avatar gllmlbrt commented on July 19, 2024

image

from nilan.

gllmlbrt avatar gllmlbrt commented on July 19, 2024

image

from nilan.

veista avatar veista commented on July 19, 2024

Added a new release.

from nilan.

veista avatar veista commented on July 19, 2024

Does the display sensor work as intended?

from nilan.

gllmlbrt avatar gllmlbrt commented on July 19, 2024

Hey, yes it works as to display whatever is being transmitted over MB, but unfortunately it is a bit messed up:
image

This is meant to read "AUTO L >1< 22C"
I tried with other texts, it works well, but scrambled as well the same way, so it is a parsing order issue only...
So the A and U are inverted, then the O and T are inverted, and > and 1 as well.
Then there is this ß which I think is meant to be a degrees symbol... which means that the degrees symbol and the C and also inverted in order.

from nilan.

gllmlbrt avatar gllmlbrt commented on July 19, 2024

Here I managed to write to holding 2000, up and down to get to:
image
Which should read "SHOW ALARMS" which make it clear how the order is scrambled.
Technically there are two lines:
image
Here it should read "LANGUAGE" in the first line using all 8 characters, and "ENGLISH " using 7 characters and a space. Best example to show both lines, and the scrambling.
I am not sure what would be best, to keep all in one line, or have it as intended on two separate text, as separate lines, if I want to repriduce what the panel shows...

from nilan.

gllmlbrt avatar gllmlbrt commented on July 19, 2024

Better have it in two separate sensors/lines, I can always template them into one again if needed on some cards.

from nilan.

veista avatar veista commented on July 19, 2024

Made a new release for you to try.
Yes was wondering about the byte order from your example and got it the wrong way around. It is funny that it is not ascii as stated in the datasheet, but instead HD44780, Nilan has taken a shortcut here. If there are more special characters outside of ASCII basic character set https://www.ascii-code.com/ let me know.

  1. Do the buttons work by just writing to the register as stated in datasheet?
  2. Is there a case that requires 2 or more simultaneous button presses?

from nilan.

gllmlbrt avatar gllmlbrt commented on July 19, 2024

image
image

Perfect !

  1. Yes. Hex input to the holding red address 2000 just does the action.
    Tested up, down, enter and escape just fine. The only issue is that it is impossible with the refresh rate to see when a value is blinking after pressed enter for editing...
  2. I can think of only one, stay press DOWN and ENTER for 10 seconds to activate the service menu, not sure if it is possible or needed.

from nilan.

veista avatar veista commented on July 19, 2024

Added buttons for testing.

from nilan.

gllmlbrt avatar gllmlbrt commented on July 19, 2024

I don't seem to see anywhere any button entity created after several restarts, am I missing something ?

from nilan.

veista avatar veista commented on July 19, 2024

It should come up in control entities with version 1.0.17B

from nilan.

veista avatar veista commented on July 19, 2024

Sorry, realized the problem, I forgot to push a file.

from nilan.

veista avatar veista commented on July 19, 2024

New release available.

from nilan.

veista avatar veista commented on July 19, 2024

Actually found the correct Modbus manual for your device https://www.en.nilan.dk/Files/Files/Engelsk/Archive/Software%20instructions/2015-01%20CTS%20602_CTS602_Modbus_protokol_ver100.pdf

from nilan.

gllmlbrt avatar gllmlbrt commented on July 19, 2024

Thanks !
For the buttons, the on / off work great.
For the up/down, it is strange, looking like if I press once, it goes up or down 2 or three steps... Now I have used it remotely (ot home), so I cannot check what is happening actually on the display at the system. Will check again when home tomorrow.
BUt anyways, it looks like it is going up and down several steps...

And then the blonking is not at all visible when selecting a value for edit. Even with scan_internal=1.

from nilan.

veista avatar veista commented on July 19, 2024

Hi, Yes, I Guessed that might happen since I cannot control the off delay of the button. The action is repeated if not cleared in 400ms. That would have to be made similar to your MQTT device so you could control the button presses more precisely. I'm just wondering what the purpose of the HMI emulation is if all functions work as entities?

from nilan.

veista avatar veista commented on July 19, 2024

Also I would assume shotening the scan interval makes the buttons work worse, since it might not have enough time slots to send the button off message. That would also be random then how many times it pushes a button. It would be too much effort and convay away from the rest of the integration, so i will propably not add the buttons to the actual integration.

from nilan.

veista avatar veista commented on July 19, 2024

On another subject, do you still get the invalid address errors?

from nilan.

veista avatar veista commented on July 19, 2024

Realized also that your firmware version has also inverted byte order. Will fix this also.

from nilan.

gllmlbrt avatar gllmlbrt commented on July 19, 2024

Noted about the buttons, makes sense. It was more a nice to have rather than a need to have for sure.
Yes, still get the error addres as follows:

Logger: homeassistant.components.modbus.modbus
Source: components/modbus/modbus.py:391
Integration: Modbus (documentation, issues)
First occurred: 3 December 2022 at 21:03:40 (14974 occurrences)
Last logged: 16:08:45

Pymodbus: Nilan: Exception Response(132, 4, IllegalAddress)
Pymodbus: Nilan: Exception Response(131, 3, IllegalAddress)

does not seem to affect any functionality though...

from nilan.

veista avatar veista commented on July 19, 2024

Hi added a new release, hope that this fixes the buttons - If not I will remove them, but you can always add them back if you like them. Hope the new version also fixes Firmware version on your model and removes - at last - the unsupported entities, so you wouldn't get those errors anymore.

from nilan.

veista avatar veista commented on July 19, 2024

Also, I read that Nilan does updates to the older models, so I would concider doing that in your case.

from nilan.

gllmlbrt avatar gllmlbrt commented on July 19, 2024

Contacted vendor for the update of my system. Haven't heard back yet. I suggest we close this issue and abandon the button thing. If someday I absolutely need that I can remotely connect with qmodmaster... Thanks for the try !

from nilan.

gllmlbrt avatar gllmlbrt commented on July 19, 2024

Should I open a separate issue for the illegal address error I get ?

from nilan.

veista avatar veista commented on July 19, 2024

Sure. I'm still trying to figure it out. I cross checked every register I read and still this issue remains. I have to be more thorough. Does the version read correct at least?

from nilan.

gllmlbrt avatar gllmlbrt commented on July 19, 2024

I am not sure what you mean by that ? The error is about an illigal address

Logger: homeassistant.components.modbus.modbus
Source: components/modbus/modbus.py:391
Integration: Modbus (documentation, issues)
First occurred: 3 December 2022 at 21:03:40 (14974 occurrences)
Last logged: 16:08:45

Pymodbus: Nilan: Exception Response(132, 4, IllegalAddress)
Pymodbus: Nilan: Exception Response(131, 3, IllegalAddress)

I am not sure what it is searching at those addresses, but acc. to my modbus protocol both 131, and 132 or 4 are inexistant addresses at both input and holding.

3 exists and reads fine as 652E (HEX). OK also with 0, 1 and 2.
Protocol:
image

from nilan.

veista avatar veista commented on July 19, 2024

Yes, indeed. The integration reads or writes to a non-existent address, which my device has, but yours doesn't. Just can't find the mistake in the code.

from nilan.

veista avatar veista commented on July 19, 2024

Ok, I found still one register that was read that is not supported <20 Bus version. Can you try it out?

from nilan.

veista avatar veista commented on July 19, 2024

Hi, could you provide me a picture of your panel from:

image

from nilan.

veista avatar veista commented on July 19, 2024

Ok, now finally found the last one. Should be fixed on 1.0.22B.

from nilan.

veista avatar veista commented on July 19, 2024

Thanks for the picture! Added some debugging to get to the bottom of this on 1.0.24B. The problem should show up in logs now.

from nilan.

gllmlbrt avatar gllmlbrt commented on July 19, 2024

Hi, so the logger you added seems to have had some results:

Logger: custom_components.nilan.device
Source: custom_components/nilan/device.py:787
Integration: Nilan (documentation, issues)
First occurred: 06:29:10 (301 occurrences)
Last logged: 07:19:11

Could not read get_control_temperature

Looking at the code it points to the "air_temp_temp_control" mapped in the register.pz twice at address 1202 and 3009.
I can read off qmodmaster at 1202 OK, but nothing and error at 3009 (like all the display addresses).

And still of course:

Logger: homeassistant.components.modbus.modbus
Source: components/modbus/modbus.py:391
Integration: Modbus (documentation, issues)
First occurred: 06:29:10 (301 occurrences)
Last logged: 07:19:11

Pymodbus: Nilan: Exception Response(132, 4, IllegalAddress)

from nilan.

veista avatar veista commented on July 19, 2024

Thank You! Never would have guessed that the ModBus Manual has duplicate name entries, there were 3 in total.

from nilan.

veista avatar veista commented on July 19, 2024

Thank you so much!

from nilan.

veista avatar veista commented on July 19, 2024

https://www.en.nilan.dk/products/accessories/control-panels/cts602-hmi-upgrade-kit

from nilan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.