aerona-chofu-ashp / modbus

Draft Modbus mappings
6 stars 2 forks source link

HA 2023.10.1 - invalid config - modbus #4

Closed rctempire closed 1 year ago

rctempire commented 1 year ago

Hi Excellent project, been getting great data out of the ASHP for logging purposes. So credit there. I have adjusted my config for the modbus to ethernet adapter. It looks like HA have modified their config and doesnt allow Counts and datatype to be used at same time. Error 1: Setup failed for modbus: Invalid config. Error 2 : Invalid config for [modbus]: ASHP Aerona3 Compressor Operating Frequency: count: 1 cannot be combined with data_type: DataType.INT16 @ data['modbus'][0]['sensors'][1]. Got {'name': 'ASHP Aerona3 Compressor Operating Frequency', 'unique_id': 'aeyc-0643xu-ch-input-1-1', 'slave': 1, 'address': 1, 'count': 1, 'input_type': 'input', 'scan_interval': 5, 'unit_of_measurement': 'Hz'}. (See /config/configuration.yaml, line 35). Please check the docs at https://www.home-assistant.io/integrations/modbus

`modbus:

Commented out

close_comm_on_error: true (this is now depreciated) (https://user-images.githubusercontent.com/37015738/272888747-0e161ea6-efbb-4b1a-a8d8-1c3b98a736f8.jpg) - Found this in thread here: https://github.com/home-assistant/core/issues/101421

and

count: 1 (error related to the main issue)

HA boots and doesnt moan about booting in the config.yaml.

I am unsure what the count actually does, but may be worth removing these lines of code from the configs.

Edit - Rebooted and this appeared after that. "retry_on_empty: true"

Please remove the retry_on_empty key from the modbus entry in your configuration.yaml file and restart Home Assistant to fix this issue.

Retry on empty is automatically applied, see [the documentation](https://www.home-assistant.io/integrations/modbus) for other error handling parameters.

Thanks rct

EDIT - Added bit more about modbus after doing another reboot.

caliston commented 1 year ago

Thanks for the update. I've made a branch which I think reflects your changes above. I may have misunderstood, so would you mind checking if I've done it right: https://github.com/aerona-chofu-ashp/modbus/compare/main...issue4 If so I'll merge this.

rctempire commented 1 year ago

Just double checked mine, i removed #close_comm_on_error: true #retry_on_empty: true

Then further down the count - name: "ASHP Aerona3 Compressor Operating Frequency" unique_id: aeyc-0643xu-ch-input-1-1 slave: 1 address: 1 #count: 1

After that I still have reporting and logging via HA.

Thanks.

caliston commented 1 year ago

Thanks, I updated the branch and have now merged it.