Need help setting up modbus connection to sauna

Hi,
I’m trying to control my sauna over modbus, but I can’t get it to work at all.

Setup

First let me share what hardware I am using:

Here’s a screenshot of the relevant serial to TCP module settings:

When selecting TCP Server I can select either “ModbusTCP” or “NONE” as an additional parameter. I’ve chosen ModbusTCP as it looks like this will give me rtuovertcp functionality (but the manual is fuzzy here).

Naturally, the serial settings match the configuration of my sauna (baud rate, parity, stop bit). When setting up, my sauna also asked to configure an ‘address’ which defaulted to 247. I have left it at this setting, but I have not used this value anywhere.

And here’s my HA config entry:

modbus:
  - name: sauna
    type: rtuovertcp
    host: 192.168.1.155
    port: 502
    sensors:
      - name: "Sauna temperature"
        unique_id: sauna_current_temp
        unit_of_measurement: °C
        address: 4
    climates:
      - name: "EOS Emotec D Sauna"
        unique_id: sauna_climate
        address: 4 #was: 247
        data_type: int16
        max_temp: 115
        min_temp: 30
        offset: 0
        precision: 1
        scale: 1
        target_temp_register: 151
        hvac_onoff_register: 101
        temp_step: 1
        temperature_unit: C

Problem

Honestly, this is faily very early. This is in my log:

2023-01-16 17:54:04.413 ERROR (SyncWorker_7) [homeassistant.components.modbus.modbus] Pymodbus: sauna: Modbus Error: [Input/Output] Modbus Error: [Invalid Message] No response received, expected at least 2 bytes (0 received)
2023-01-16 17:54:04.569 DEBUG (SyncWorker_2) [pymodbus.client.sync] Connection to Modbus server established. Socket ('192.168.1.191', 51497)
2023-01-16 17:54:04.573 DEBUG (SyncWorker_2) [pymodbus.client.sync] New Transaction state 'SENDING'
2023-01-16 17:54:07.576 DEBUG (SyncWorker_2) [homeassistant.components.modbus.modbus] Pymodbus: sauna: Modbus Error: [Input/Output] No Response received from the remote unit/Unable to decode response

Question

I’d love any help I can get. How can I get this to work?
Also, I would love tips on how to debug this and for instance create a manual modbus connection to try things out (I’m on a Mac).

Thanks for reading!!

Hi @bastiaanterhorst - did you get this working and if so would you mind sharing how?
If not, did you happen to test with a different modbus-to-ethernet adapter?

I did get it work, yes.
I’ll share the settings.

Here’s the modbus to TCP adapter settings:

And here’s my HA config:

# Sauna modbus connection
modbus:
  - name: sauna
    type: tcp
    host: 192.168.1.155
    port: 502
    delay: 2
    message_wait_milliseconds: 500
    retries: 10
    retry_on_empty: true
    climates:
      - name: "EOS Emotec D Sauna"
        unique_id: sauna_climate
        scan_interval: 20
        lazy_error_count: 10
        slave: 247
        address: 4
        data_type: int16
        max_temp: 115
        min_temp: 30
        offset: 0
        precision: 1
        scale: 1
        target_temp_register: 151
        hvac_mode_register:
          address: 101
          values:
            state_heat: 1
            state_off: 0
        temp_step: 1
        temperature_unit: C

Hope this helps!

Thanks for the info - good to know you got this working.
It makes sense that the modbus polling should be enabled.

@bastiaanterhorst does it work without any flaws? I tried it similarly, but one out of 10 modbus refreshs is getting errors, no idea why. But I’m also using another hardware, maybe this is the problem…

It is working well for me, yes. However, I have notices that hardware does matter. I have two modbus devices, connected to different modbus → wifi adapters, and one gives intermittent issues, while the other is rock solid… It could be either the adapter, or the modbus device itself.

Thanks for your quick reply!

Is the config posted above still your current config? I’m getting an error that retry_on_empty is an invalid option…

This is now my working config:

name: "EOS Sauna"
type: tcp
host: 192.168.132.12
port: 502
delay: 1
message_wait_milliseconds: 100
sensors:
  - name: EOS Sauna Humidity
    slave: 247
    address: 5
    unique_id: eos_sauna_humidity
    device_class: humidity
    unit_of_measurement: "%"
    scan_interval: 15
switches:
  - name: EOS Sauna Light
    slave: 247
    address: 100
    unique_id: eos_sauna_lights
    verify:
    scan_interval: 15
climates:
  - name: EOS Sauna Climate
    slave: 247
    address: 4
    max_temp: 115
    min_temp: 30
    target_temp_register: 151
    temp_step: 1
    unique_id: eos_sauna_climate
    hvac_mode_register:
      address: 101
      values:
        state_off: 0
        state_heat: 1
    scan_interval: 15
    temperature_unit: C

I’m planning to migrate that into an actual core integration. @bastiaanterhorst, would you be willing to work with me on that/to test?

Hey, here’s my current config:

modbus:
  - name: sauna
    type: tcp
    host: 192.168.1.155
    port: 502
    delay: 2
    message_wait_milliseconds: 200
    climates:
      - name: "EOS Emotec D Sauna"
        unique_id: sauna_climate
        scan_interval: 60
        slave: 247
        address: 4
        data_type: int16
        max_temp: 115
        min_temp: 30
        offset: 0
        precision: 1
        scale: 1
        target_temp_register: 151
        hvac_mode_register:
          address: 101
          values:
            state_heat: 1
            state_off: 0
        temp_step: 1
        temperature_unit: C

And yes of course I’d be willing to help! I’m relatively comfortable with Python too, so might be able to help with some small bits here and there as well. Let me know if/what you need.