Hello, I am a pure noob to HA and programming.
i tried to integrate my victron system with the modbus.
but as soon as i add “modbus: !include modbus.yaml” to the “configuration.yaml”, create the “modbus.yaml” in the same folder and add:
Example configuration.yaml entry for a TCP connection
modbus:
- name: “Victron”
type: tcp
host: 192.168.1.140
port: 502
sensors:- name: Grid Voltage L1 in
unit_of_measurement: V AC
slave: 100
address: 817
scale: 0.1
precision: 2
- name: Grid Voltage L1 in
I get the following failures:
Failure N°1:
Logger: homeassistant.setup
Source: setup.py:178
First occurred: 09:04:24 (1 occurrences)
Last logged: 09:04:24
Setup failed for modbus: Invalid config.
Failure N°2:
Logger: homeassistant.config
Source: components/modbus/validators.py:249
First occurred: 09:04:23 (1 occurrences)
Last logged: 09:04:23
Unknown error calling modbus CONFIG_SCHEMA
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/config.py”, line 842, in async_process_component_config
return component.CONFIG_SCHEMA(config) # type: ignore
File “/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py”, line 272, in call
return self._compiled([], data)
File “/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py”, line 594, in validate_dict
return base_validate(path, iteritems(data), out)
File “/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py”, line 386, in validate_mapping
cval = cvalue(key_path, value)
File “/usr/local/lib/python3.9/site-packages/voluptuous/validators.py”, line 215, in _run
return self._exec(self._compiled, value, path)
File “/usr/local/lib/python3.9/site-packages/voluptuous/validators.py”, line 339, in _exec
v = func(path, v)
File “/usr/local/lib/python3.9/site-packages/voluptuous/schema_builder.py”, line 817, in validate_callable
return schema(data)
File “/usr/src/homeassistant/homeassistant/components/modbus/validators.py”, line 249, in duplicate_modbus_validator
if hub[CONF_TYPE] == SERIAL:
KeyError: ‘type’
Where do i start to chase that error?
General:
There are some inconsistencies between HA modbus guide and other tutorials, for example with the ‘name’ or name… this confuses me even more.