Error message from config checker not sure where to look for fault

Within a modbus section the checker is throwing errors for every input sensor section-
Running on RPi4 4GB using rs485 modbus. Haven’t got past configuration issues yet
so not a hardware problem. Just my lack of knowledge.

```
port:  /dev/ttyUSB0
stopbits:  1
sensors:
  - name:  top_stair_upper
    slave: 110
    address: 7
    scan_interval: 1
    data_type: int16
  - name: Top 1/2 Up Switch
    slave: 110
    address: 7
    scan_interval: 1
    data_type: int16
  - name:  Lower_Hall_SD
    address:  100
    slave:  0
    count:  8

#Lower Hall IOS = 101.0
- name: Lower_Hall_IOS
address: 101
slave: 0
count: 8
```
The error message looks like this;

Invalid config for [modbus]: Bed_Room_IOS cannot convert automatically int @ data[‘modbus’][0]
[‘sensors’][4]. Got OrderedDict([(‘name’, ‘Bed_Room_IOS’), (‘address’, 103), (‘slave’, 0),
(‘count’, 8), (‘scan_interval’, 15)]) Casita_BarfRoom_IOS cannot convert automatically int @ data
[‘modbus’][0][‘sensors’][7]. Got OrderedDict([(‘name’, ‘Casita_BarfRoom_IOS’), (‘address’, 106),
(‘slave’, 0), (‘count’, 8), (‘scan_interval’, 15)])Living_Room_IOS cannot convert automatically
int @ data[‘modbus’][0][‘sensors’][3]. Got OrderedDict([(‘name’, ‘Living_Room_IOS’),
(‘address’, 102), (‘slave’, 0), (‘count’, 8), (‘scan_interval’, 15)]) Lower_Hall_IOS00000000
cannot convert automatically int @ data[‘modbus’][0][‘sensors’][2]. Got OrderedDict([(‘name’,
‘Lower_Hall_IOS00000000’), ('ad…
There’s perhaps ten more lines like this but you get the message, I have transgressed the unwritten rule somewhere?
Any clues welcome Thanks in advance. Dangerousdave.

These names are not part of the configuration you are showing. Either

  • another configuration file is loaded or
  • you are having an issue with encoding, line breaks or similar

Repost your sensor definition - be more careful with the cut and paste - if you look in your first post you can see something has gone wrong when you pasted your yaml.

Include everything in the modbus: section including the modbus: line.

Thank you m0wlheld and Daryl zoogara. A little more poking around and trying fixes has shed new light on the problem. I commented out all the sensors = configuration valid! So we know its not the modbus settings, I then tried adding back the sensors, one at a time, until a config error appeared. Didn’t have to wait long. As soon as I added ‘lower_hall_sd’ the config error appeared again. Top_stair_upper and Top_1/2_Up_Switch are accepted as valid.
Here’s the snip of the the config file;



    bytesize:  8
    method:  rtu
    parity:   N
    port:  /dev/ttyUSB0
    stopbits:  1
    sensors:
      - name:  top_stair_upper
        slave: 110
        address: 6
        scan_interval: 1
        data_type: int16
      - name: Top_1/2 Up Switch
        slave: 110
        address: 7
        scan_interval: 1
        data_type: int16
      - name:  Lower_Hall_SD
        address:  0
        slave:  100
        count:  8
#      - name: Lower_Hall_IOS
#        address:  0
#        slave:  101
#        count:  8
#      - name: Living_Room_IOS

You can see the entries are very similar with only the name and addresses changing causing the error.
This makes me unsure about the definition of the key words “slave” and “address” the integration says address is the address of the register, and slave is the address of the unit. Clear enough - I take from that “address” is the devices INTERNAL offset which can be at bit level, and “slave” is the address of the device on the modbus net cable. The term “slave” is often used for this. Am I correct?
I’ll keep trying various names etc - thanks for your help so far.
@Daryl I’m convinced the modbus definition is not at fault so have not included it all.
Regards David.

      - name: Lower_Hall_SD
        address: 0
        slave: 100
        count: 8

I know it’s probably not - but I noticed your spacing on the values for this sensor were different. Maybe a special character?

Delete all the white space between parameter and value then re-type as a single space. Long shot but maybe…

This makes me unsure about the definition of the key words “slave” and “address” the integration says address is the address of the register, and slave is the address of the unit. Clear enough - I take from that “address” is the devices INTERNAL offset which can be at bit level, and “slave” is the address of the device on the modbus net cable. The term “slave” is often used for this. Am I correct?

Remember Config Checker doesn’t care if you sensor is going to work or that the parameters are right - just that the syntax is correct.

Hi Daryl, thanks for the suggestion - just tried deleting and replacing with exactly two spaces - just the same! I’m going to have some lunch now ( I’m in New Zealand), then I’m going to try moving the error prone block to see if it makes any difference ( I know it shouldn’t but…) regards DD

Lunch over. Nailed it! the problem line was “count: 8” changed it to “data_type: int16” sweetness and light Many thanks for your continued support. It REALLY helps keep ones spirits up to know you are not alone.
Regards dd.