Hi,
I have several TCP modbus hubs, and one Serial. I have 3 climates (which are working great) controlling over TCP. But I am struggling to config one over serial modbus.
modbus config:
- type: serial
name: Hladilna_tehnika_klet
method: ascii
port:
/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AB0L4W5T-if00-port0
baudrate: 9600
stopbits: 1
bytesize: 7
parity: E
climate config:
- name: Hladilnica
slave: 2
current_temp_register: 0
current_temp_register_type: holding
data_count: 1
max_temp: 24
min_temp: 0
offset: 0
precision: 1
scale: 0.1
target_temp_register: 204
temp_step: 0.5
data_type: uint
scan_interval: 30
I was trying to change any parameter according to docs page. But if doesn’t change my problem.
I got following warnings:
2021-07-08 16:53:35 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/modbus/climate.py", line 211, in async_update
self._target_temperature = await self._async_read_register(
File "/usr/src/homeassistant/homeassistant/components/modbus/climate.py", line 222, in _async_read_register
result = await self._hub.async_pymodbus_call(
File "/usr/src/homeassistant/homeassistant/components/modbus/modbus.py", line 325, in async_pymodbus_call
return await self.hass.async_add_executor_job(
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/modbus/modbus.py", line 310, in _pymodbus_call
result = self._call_type[use_call][ENTRY_FUNC](address, value, **kwargs)
File "/usr/local/lib/python3.8/site-packages/pymodbus/client/common.py", line 114, in read_holding_registers
return self.execute(request)
File "/usr/local/lib/python3.8/site-packages/pymodbus/client/sync.py", line 109, in execute
return self.transaction.execute(request)
File "/usr/local/lib/python3.8/site-packages/pymodbus/transaction.py", line 181, in execute
valid_response = self._validate_response(
File "/usr/local/lib/python3.8/site-packages/pymodbus/transaction.py", line 125, in _validate_response
mbap = self.client.framer.decode_data(response)
File "/usr/local/lib/python3.8/site-packages/pymodbus/framer/ascii_framer.py", line 55, in decode_data
uid = int(data[1:3], 16)
ValueError: invalid literal for int() with base 16: b':0'
2021-07-08 16:53:40 WARNING (SyncWorker_2) [pymodbus.client.sync] Cleanup recv buffer before send: 0xa
and
Pymodbus: Modbus Error: [Input/Output] Modbus Error: [Invalid Message] No response received, expected at least 5 bytes (0 received)
Strange thing is that if I manually call service modbus.write_register with target temp register. It does write properly in register.
does anyone else experience similar issue ?