dS378 - 8 x 16A ethernet relay

Anyone has tested one of these with HA?: http://www.robot-electronics.co.uk/files/dS378.pdf
Interested in using with Modbus.

www.robot-electronics.co.uk

Modbus commands
The modbus command set accepts a subset of the standard Modbus-TCP frames as defined in Modbus protocol Specification and MODBUS Messaging on TCP/IP Implementation Guide V1.0b
Functions 1, 4, & 5 are supported along with error codes 1, 2 & 3 should they occur. Function 01 (0x01) Read Coils This function reads back the 8 relays as coils 1-8 and also the 7 inputs as coils 9-15.
Function 04 (0x04) Read Input Registers This function reads back the 7 analogue inputs as registers 1-7 Register 8 is always zero Registers 9-24 are 16 registers representing 8 counter values. As modbus registers are 16-bits wide and the counters are 32-bit, a counter is stored in 2 16-bit registers, high word first. In the same way, the 16 registers 25-40 hold the 8 capture values.

Still working ou the full picture but you read and control the relays and inputs. Coils in the configuration are starting from 0 and not 1 as mentioned in the docs.

modbus:
  name: hub_garage
  type: tcp
  host: <ip-address>
  port: 502
  - platform: modbus
    scan_interval: 6
    coils:
    - name: garage_poort
      hub: hub_garage
      slave: 1
      coil: 0
    - name: garage_r2
      hub: hub_garage
      slave: 1
      coil: 1
    - name: garage_r3
      hub: hub_garage
      slave: 1
      coil: 2
    - name: garage_r4
      hub: hub_garage
      slave: 1
      coil: 3
    - name: garage_r5
      hub: hub_garage
      slave: 1
      coil: 4
    - name: garage_r6
      hub: hub_garage
      slave: 1
      coil: 5
    - name: garage_licht1
      hub: hub_garage
      slave: 1
      coil: 6
    - name: garage_licht2
      hub: hub_garage
      slave: 1
      coil: 7
    - name: garage_IO1
      hub: hub_garage
      slave: 1
      coil: 40
    - name: garage_IO2
      hub: hub_garage
      slave: 1
      coil: 41
    - name: garage_IO3
      hub: hub_garage
      slave: 1
      coil: 42
    - name: garage_IO4
      hub: hub_garage
      slave: 1
      coil: 43
    - name: garage_IO5
      hub: hub_garage
      slave: 1
      coil: 44
    - name: garage_IO6
      hub: hub_garage
      slave: 1
      coil: 45
    - name: garage_IO7
      hub: hub_garage
      slave: 1
      coil: 46

1 Like