kasper-73 / CTC-GSi-8---Homeassistant

16 stars 4 forks source link

writing data with Node-red gives an error: [W][api.connection:092]: : Socket operation failed: BAD_INDICATOR errno=11 #4

Open Wesmond84 opened 2 months ago

Wesmond84 commented 2 months ago

Hi, this thread helped me connect to my CTC heating system. I get the registers read and they come to my Home Assistant as their entities.

Now I'm trying to create Node-Red logic for the user interface, which I use to control the addition of hot water (Ekstra varmt vand). This is an example in the yaml code in readable form, but the documentation shows it is also a writable register.

I have created two button helpers in Home Assistant, one of which I want to add to the register (0.5) and the other to decrease (-0.5).

Here is a picture of a flow:

Flow of how buttons work in CTC water heater increaser

In principle, my logic works as it should. When I try using Node-red to write an Inject node as a test using the value 0.5 using a modbus node, the problem appearing in the title appears in the EspHome logs.

Here is a test flow of using this Inject node and writing it to the CTC:

Test flow to drive value to modbus

Below is a screenshot of EspHome's log when the Inject node is pressed.

Screenshot from logs

Is there anyone here who can tell what could be causing the problem?

Wesmond84 commented 2 months ago

I get a bit bit further with this case. I have to use the EspHome Out node instead of Modbus nodes because the EspHome will work as a modbus server in this case.

Next, I need to create a configuration where the node-red will write a value to the specified register. I've tried sending a simple numeric payload with an inject node, but the register does not understand my sent value.

The configuration for this specified register has been tried and I've got no idea what should the code include. I've looked at the EspHome Documentation, but I didn't find any relevant examples where is written some holding register. Below is the copied code:

number:

If there is someone, who knows how to write values to holding registers to modbus via EspHome, I'm interested. Thanks!

Spangsberg commented 2 months ago

Hi

Here is a sample of one of my numbers I use to write to my CTC-Ecoheat:

number:

@.***

From: Wesmond84 @.> Sent: 28. august 2024 17:01 To: kasper-73/CTC-GSi-8---Homeassistant @.> Cc: Subscribed @.***> Subject: Re: [kasper-73/CTC-GSi-8---Homeassistant] writing data with Node-red gives an error: [W][api.connection:092]: : Socket operation failed: BAD_INDICATOR errno=11 (Issue #4)

I get a bit bit further with this case. I have to use the EspHome Out node instead of Modbus nodes because the EspHome will work as a modbus server in this case.

Next, I need to create a configuration where the node-red will write a value to the specified register. I've tried sending a simple numeric payload with an inject node, but the register does not understand my sent value.

The configuration for this specified register has been tried and I've got no idea what should the code include. I've looked at the EspHome Documentation, but I didn't find any relevant examples where is written some holding register. Below is the copied code:

number:

If there is someone, who knows how to write values to holding registers to modbus via EspHome, I'm interested. Thanks!

— Reply to this email directly, view it on GitHubhttps://github.com/kasper-73/CTC-GSi-8---Homeassistant/issues/4#issuecomment-2315610598, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AN4FY54HKIW5UXOT22WRVE3ZTXQ3BAVCNFSM6AAAAABNGAEKHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJVGYYTANJZHA. You are receiving this because you are subscribed to this thread.Message ID: @.**@.>>

Wesmond84 commented 1 month ago

Hi,

This project has been on hiatus for a while.

Somehow that data sent to the modbus bus is not yet in a form that the machine can understand, because every time I write someone's number to the value register, it gives EspHome the following log.

image

What could be the reason for this? Somehow EspHome or modbus doesn't understand this value.

Here is the example code that I've used:

number:

Also, I've tried including some box parameters for the number, but it didn't help.

mode: BOX min_value: 0 max_value: 6 step: 1

Does anyone have any idea what I should change? I think that this problem occurs in the EspHome configuration. At least this shows with this configuration that the numeric value for that register is not going through correctly.

Can someone tell me if there is something in the documentation of the machine's modbus register that should be considered when configuring EspHome?

Here is a screenshot of the specific register of the modbus documentation.

image

Thanks for your answers!