Smart Home Automation Forum
Automatic Modbus Sensor polling fails with ESP_ERR_INVALID_STATE - Printable Version

+- Smart Home Automation Forum (https://www.kincony.com/forum)
+-- Forum: "KCS" v3 firmware system (https://www.kincony.com/forum/forumdisplay.php?fid=74)
+--- Forum: "KCS" v3 firmware (https://www.kincony.com/forum/forumdisplay.php?fid=75)
+--- Thread: Automatic Modbus Sensor polling fails with ESP_ERR_INVALID_STATE (/showthread.php?tid=9942)



Automatic Modbus Sensor polling fails with ESP_ERR_INVALID_STATE - PrivatePerson - 11-09-2026

KC868-A16 V3 – Automatic Modbus Sensor polling fails with ESP_ERR_INVALID_STATE (KCS v3.27.2)

Hello KinCony team,
I need help troubleshooting an issue with automatic Modbus RTU sensor polling on my KC868-A16 V3 controller.

1. Hardware and firmware
• Controller: KinCony KC868-A16 V3
• Firmware: KCS v3.27.2
• Build date: September 10, 2026
• Sensor: Water Quality pH + EC Sensor
• Communication: RS485 Modbus RTU
• Sensor supply voltage: 12–24V DC
• Modbus slave address: 1
• Baud rate: 9600
Serial settings: 9600, 8 data bits, no parity, 1 stop bit (8N1).

2. Sensor configuration in KCS
I configured two standard Modbus sensors:
Sensor 1 – pH
• Type: Modbus
• Slave Address: 1
• Function Code: 03 Holding Register
• Register Address: 0
• Data Type: uint16
• Byte Order: ABCD
• Multiplier: 0.01
• Unit: pH
Sensor 2 – EC
• Type: Modbus
• Slave Address: 1
• Function Code: 03 Holding Register
• Register Address: 1
• Data Type: uint16
• Byte Order: ABCD
• Multiplier: 1
Both registers belong to the same physical sensor.

3. Manual Modbus Master works correctly
Using the built-in Modbus Master page, I can successfully read both registers with one request.
Settings:
• Interface: RS485 RTU
• Slave ID: 1
• Function: FC03
• Start address: 0
• Quantity: 2
• Baud rate: 9600
• Data bits: 8
• Parity: None
• Stop bits: 1
• Display: UInt16
• Byte order: ABCD
Successful response:
• Register 0: 703 (pH = 7.03)
• Register 1: 59 (EC raw value)
Transaction completed successfully. Response latency: 236 ms.
This confirms that the sensor, wiring, Modbus address and serial communication work correctly when using Modbus Master.

4. Automatic sensor polling fails
In the KCS Logs, I repeatedly receive:
standard_modbus_sensor read error, id=0 err=ESP_ERR_INVALID_STATE
standard_modbus_sensor read error, id=1 err=ESP_ERR_INVALID_STATE
After repeated failures, the logs also show:
sensor id=0 read err too much, need reinit
sensor id=1 read err too much, need reinit
The Monitor page displays — instead of sensor values.
The same error occurs after restarting the controller.

5. Additional tests performed
I have already tried:
1. Power cycling the controller.
2. Checking the RS485 wiring and tightening the GND connection.
3. Using separate power supplies for the controller and sensor.
4. Verifying the sensor settings and Modbus register addresses.
5. Testing manual Modbus communication repeatedly — it works.
6. Disabling Sensor 2 (EC) and testing only Sensor 1 (pH). The same ESP_ERR_INVALID_STATE error still occurs.
7. Keeping General RS485 disabled.
Enabling General RS485 previously caused the controller to become unresponsive / lose Wi-Fi, so I am currently keeping it disabled.

6. Questions for KinCony developers
1. Is there a known issue with standard_modbus_sensor initialization or automatic polling in KCS v3.27.2 on KC868-A16 V3?
2. Does the automatic sensor driver use the same UART/RS485 interface as the built-in Modbus Master?
3. Can General RS485 conflict with the automatic Modbus sensor driver?
4. Is there a recommended configuration for reading two registers from one third-party Modbus RTU device?
5. Is there a newer firmware or beta firmware that fixes this issue?

Could you please provide a recommended configuration, troubleshooting steps, or a firmware version that resolves this problem?
I can provide additional screenshots, logs and configuration details if needed.
Thank you for your help!


RE: Automatic Modbus Sensor polling fails with ESP_ERR_INVALID_STATE - admin - 11-09-2026

suggest test with newest version V3.27.4
https://www.kincony.com/forum/showthread.php?tid=9929