Hello @doezel
I did SW1 dip1 : ON
I connect Modbus cables A and B cable. And From screen I change Modbus Address 01
But when Im trying to connect I get Timeout error. What can be problem ?
I need to connect from C# app and read error codes or change operation modes.
You also have to set SW1 dip2 to ON (Unified open protocol).
Regarding an earlier question why the ETH to RS232/RS485 of Waveshare instead only RS485. That one has a modbus gateway function that translates between modbus RTU (RS485) and modbus TCP (ETH). Waveshare has multiple options with and without a modus gateway function. There is a table on this site showing which types are have a gateway function:
Without a gateway the translation between ETH and RS485 is done transparently and that will not work directly. The frames of modbus TCP are slightly different from RTU. Note that modbus ascii is also different. The Therma V supports RTU.
Set on the wavesurf
ETH as TCP server and set the port to 502
RS485 to 9600baud stopbits:1 parity:none
- id: map energy state
alias: Energy State
description: ''
trigger:
- platform: state
entity_id:
- sensor.energy_state_input_holding
id: input
to:
- platform: state
entity_id:
- input_select.wp_energy_state
id: select
to:
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: input
sequence:
- variables:
index: '{{ trigger.to_state.state | int(0) }}'
- service: input_select.select_option
data:
option: '{{ state_attr("input_select.wp_energy_state", "options")[ index ] }}'
target:
entity_id: input_select.wp_energy_state
- conditions:
- condition: trigger
id: select
sequence:
- service: modbus.write_register
data_template:
address: 9
slave: 1
hub: lg_modbus
value: '{{ trigger.to_state.state[0] | int(0) }}'
It works flawlessly. The only thing that needs attention is that the input_select options contain the state number in their names. And that in the last line of the yaml
value: '{{ trigger.to_state.state[x] | int(0) }}'
x is replaced with the character position of the state number in the input select options.
So is the option reeds something like - "0 - Power saving state not used"
x is 0 and when it reads - " 0 - Power saving state not used"
x is 1.
I’ve looked into using the “energy state input”
Set it (holding register adr 9) to 1, seemed not to have an impact.
Is any other setting needed on the system?
The value seems to have been set, but the pump just seems to run?
not that i can see. also no idea if this is an option i don’t have or something that needs to be activated or so. only thing i’m sure about is that it keeps the value when i set it
I have ventilation and I also wanted to control and receive states. I did the automation as in the example, but I only get the status; when I select a mode, nothing happens. here is my config: Mode control register - 4
input_select:
komfovent_set_mode:
name: "Komfovent Set Mode"
options:
- Minimum
- Away
- Home
- Boost
- alias: Komfovent Set Mode
description: 'Set the mode (app or web)'
trigger:
- platform: state
entity_id: sensor.komfovent_mode_num
id: input
to: null
- platform: state
entity_id: input_select.komfovent_set_mode
id: select
to: null
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: input
sequence:
- variables:
values:
'1': Minimun
'2': Away
'3': Home
'4': Boost
- service: input_select.select_option
target:
entity_id: input_select.komfovent_set_mode
data:
option: '{{ values.get(trigger.to_state.state) }}'
- conditions:
- condition: trigger
id: select
sequence:
- service: modbus.write_register
data:
address: 4
slave: 1
hub: "Komfovent"
value: '{{ trigger.to_state.state[0] | int(0) }}'
mode: single
When selecting a mode, automation is executed, but the status is not a number but a text. Could this be the reason or am I doing something wrong?