Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A16S Modbus control
#1
Hi,

I would like to control my A16S board with modbus protocol. The controller is an ESP32 with esphome firmware. The switch part of the esphome config is as follows:

switch:

  - platform: modbus_controller
    name: 'testsw1'
    address: 0
    register_type: coil
    bitmask: 1
…. to switch 8

  - platform: modbus_controller
    name: 'testsw8'
    address: 7
    register_type: coil
    bitmask: 1

  - platform: modbus_controller
    name: 'testsw9'
    address: 8
    register_type: coil
    bitmask: 1

Everything works perfectly as long as only the first 8 switches are defined. However, if relay 9 is also configured, when it is switched on, the 9th relay switches but the status feedback comes back from the first relay (in esphome 1st relay on - 9th relay off ; on the relay board 9th relay on 1st off) and vice versa. How to program esphome so that it works correctly? 

   
   
Reply


Messages In This Thread
A16S Modbus control - by xsa - 12-29-2023, 04:04 PM
RE: A16S Modbus control - by admin - 12-29-2023, 11:25 PM
RE: A16S Modbus control - by xsa - 12-30-2023, 07:04 AM
RE: A16S Modbus control - by admin - 12-31-2023, 01:56 PM
RE: A16S Modbus control - by xsa - 12-31-2023, 02:43 PM
RE: A16S Modbus control - by admin - 01-01-2024, 01:52 AM
RE: A16S Modbus control - by xsa - 01-01-2024, 04:45 PM
RE: A16S Modbus control - by admin - 01-02-2024, 12:03 AM

Forum Jump:


Users browsing this thread:
2 Guest(s)