timlaing / modbus_local_gateway

Home Assistant Modbus Tcp Gateway
MIT License
11 stars 3 forks source link
hacs-integration home-assistant modbus

Vulnerabilities Security Rating Maintainability Rating Code Smells Bugs Lines of Code

Modbus Local Gateway component

This is a Home Assistant integration to support modbus devices running behind a Modbus TCP gateway.

Device support

The has been tested with a WaveShare Wi-Fi to RS485 gateway (https://www.waveshare.com/rs485-to-wifi-eth.htm) Configured as a Modbus RTU to Modbus TCP gateway.

Configuration for the WaveShare Wi-Fi gateway

Configuration Page Setting Value
Mode Selection Data Transfer Mode Modbus TCP<==>Modbus RTU
Application Baud Rate 9600
Application Data Bits 8
Application Parity None
Application Stop 1
Application Bradrate adaptive Disable
Application UART AutoFrame Disable
Application Modbus Polling Off
Application Network A, TCP Time out 5
Application Network A, MAX TCP Num 24

Slave devices for testing have been:

Note that devices sometimes get firmware upgrades, or incompatible versions are sold under the same model name, so it is possible that the device will not work despite being listed.

Support for additional devices can be added via yaml configuration files in the devices folder. Existing configuration files can be used as templates.


Installation

hacs_badge

Installation is easiest via the Home Assistant Community Store (HACS), which is the best place to get third-party integrations for Home Assistant. Once you have HACS set up, simply click the button below (requires My Homeassistant configured) or follow the instructions for adding a custom repository and then the integration will be available to install like any other.

Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

Configuration

After installing, you can easily configure your devices using the Integrations configuration UI. Go to Settings / Devices & Services and press the Add Integration button, or click the shortcut button below (requires My Homeassistant configured).

Add Integration to your Home Assistant
instance.

Stage One

The first stage of configuration is to provide the information needed to connect to the device.

Stage Two

Select the correct device type.

Configuration

Configuration of the update frequency can be performed defaults to 30 seconds