Esphome Configuration Example Modbus Register 1308: Device State: 0 = Wait 1 = Normal 2 = Fault 4 = Checking
Technical documentation for Modbus register 1308 on Esphome Configuration Example. Data type: S WORD. Includes Python and YAML configuration examples.
Technical Definition
The register Device State: 0 = Wait 1 = Normal 2 = Fault 4 = Checking at address 1308 is used to monitor device state: 0 = wait 1 = normal 2 = fault 4 = checking on the Esphome Configuration Example.
- Protocol: Modbus RTU
- Data Type: S WORD
- Unit:
- Access: Read Only
How to Read (Python pymodbus)
Use this code snippet to read this specific value via RS485:
from pymodbus.client.sync import ModbusSerialClient
client = ModbusSerialClient(method='rtu', port='/dev/ttyUSB0', baudrate=9600)
client.connect()
# Read Device State: 0 = Wait 1 = Normal 2 = Fault 4 = Checking (Address: 1308)
# Note: Check if your device uses 0-based or 1-based addressing
result = client.read_input_registers(address=1308, count=2, unit=1)
if not result.isError():
print(f"Raw Value: {result.registers}")
else:
print("Error reading register")
client.close()
Integration (Home Assistant)
Paste this into your configuration.yaml:
- platform: modbus_controller
name: "Device State: 0 = Wait 1 = Normal 2 = Fault 4 = Checking"
address: 1308
value_type: S_WORD
unit_of_measurement: ""
Connection Diagram
Here is the standard RS485 wiring for this configuration:
graph TD
PLC[Host Controller / Home Assistant]
Device[Esphome Configuration Example]
PLC -- "A+ (D+)" --> Device
PLC -- "B- (D-)" --> Device
PLC -- GND --> Device
💡 Engineer's Insight
Analysis: Indicates the operational status of a device or process. Values represent states like Wait, Normal, Fault, or Checking.
Troubleshooting: A 'Fault' status (2) requires immediate investigation. 'Wait' or 'Checking' states may indicate normal startup or communication issues.