0

I am trying to connect Home Assistant to a Waveshare RS485 to Ethernet adapter with RTU over TCP. The RS485 is connected to a ventilation system.

When i try from Modbus Poll from my PC it works absolutely fine with reading and writing.

When i add the following to configuration.yaml in Home Assistant i get "modbus RS485EthVentilator communication closed" error in logs. (i am sure IP and port are correct).

modbus:
  - type: rtuovertcp
    host: 192.168.1.231
    port: 502
    name: "RS485EthVentilator"

I have tried with type: tcp, delay: 10, retry_on_empty: true, close_comm_on_error: false and retries: 10. Always the same error. It seems that Home Assistant cannot connect to the adapter no matter what i try.

I also tried using Node Red and node-red-contrib-modbus with the nodes "Modbus Read" and "Modbus Getter". I receive the error "Modbus Failure On State sending Get More About It By Logging". The node red add on log level is set to Debug and i not getting anything new in the log. Where else can i log or read more about the modbus activity?

Home Assistant is running on a NUC with the NUC image.

My only next step i see now is to try and create a python script and see if i can make that work with Home Assistant some way. But i feel like i am missing some issue i would probably get with the python script as well?!

Any help would be greatly appreciated! Thank you!

Stig
  • 31
  • 1
  • 6

1 Answers1

0

I dont have experience on that device, but some on serial.

You have to specify the device you are connecting on the modbus network.

Intel NUC <--WiFi/Router/Ethernet--> Waveshare RS485 <--Modbus--> VentilationSystem.

It seems that you connect to the Waveshare, but you need to specify the Slave Id of the ventilation system (like the IP but on modbus network)

Here is an example (from https://community.home-assistant.io/t/integrating-srne-mppt-inverter-with-ha/490475)

modbus:
  - name: modbus_tcp
    type: rtuovertcp
    host: 192.168.1.30
    port: 8888
    sensors:
# Devices to connect with the modbus adapter
      - name: VentilationSystem
        slave: 1
        address: 539
        input_type: holding

change the sensors that you are going to use, and check the info about how to handle sensors and writings:

https://www.home-assistant.io/integrations/modbus/ https://www.home-assistant.io/integrations/modbus/#example-writing-a-float32-type-register

¡Good luck!

Juanmabs22
  • 1,194
  • 9
  • 10