I’ve just updated the modbus test script so you can try setting different modbus values on the register and see what happens.
See below example output.
modbus_test.py
python .\modbus_test.py 192.168.1.80 502 -t
Water Heat Pump Status - 192.168.1.80:502
Connected successfully
Register Name Raw Value Processed Value Description
0 Power State 0 (0x0000) OFF On/Off Status
1 Operating Mode 4 (0x0004) E-Heater Heat pump mode
2 Target Temperature 65 (0x0041) 65 °C Set point temperature
101 Tank Top Temperature (T5U) 80 (0x0050) 25.0 °C Top of tank temperature
102 Tank Bottom Temperature (T5L) 154 (0x009A) 62.0 °C Bottom of tank temperature
103 Condensor Temperature (T3) 77 (0x004D) 23.5 °C Condensor temperature
104 Outdoor Temperature (T4) 76 (0x004C) 23.0 °C Ambient outdoor temperature
105 Exhaust Gas Temperature (Tp) 28 (0x001C) 28 °C Compressor exhaust temperature
106 Suction Temperature (Th) 81 (0x0051) 25.5 °C Compressor suction temperature
Successfully read 9/9 registers
============================================================
OPERATING MODE TEST MODE
This will attempt to write values to the Operating Mode register (address 1)
to discover undocumented modes.
WARNING: Only use this on a test system - changes may affect operation!
Enter mode value to test (0-255, ‘q’ to quit, ‘r’ to read current): 0
Attempting to write 0 to Operating Mode register…
Write failed: ExceptionResponse(dev_id=1, function_code=134, exception_code=3)
Exception Code: 3 - Illegal Data Value
Enter mode value to test (0-255, ‘q’ to quit, ‘r’ to read current): 1
Attempting to write 1 to Operating Mode register…
Write successful!
Reading back to verify…
Verified: Mode is now 1
Enter mode value to test (0-255, ‘q’ to quit, ‘r’ to read current): 2
Attempting to write 2 to Operating Mode register…
Write successful!
Reading back to verify…
Verified: Mode is now 2
Enter mode value to test (0-255, ‘q’ to quit, ‘r’ to read current): 3
Attempting to write 3 to Operating Mode register…
Write failed: ExceptionResponse(dev_id=1, function_code=134, exception_code=3)
Exception Code: 3 - Illegal Data Value
Enter mode value to test (0-255, ‘q’ to quit, ‘r’ to read current): 4
Attempting to write 4 to Operating Mode register…
Write successful!
Reading back to verify…
Verified: Mode is now 4
Enter mode value to test (0-255, ‘q’ to quit, ‘r’ to read current): 5
Attempting to write 5 to Operating Mode register…
Write failed: ExceptionResponse(dev_id=1, function_code=134, exception_code=3)
Exception Code: 3 - Illegal Data Value
Enter mode value to test (0-255, ‘q’ to quit, ‘r’ to read current): 6
Attempting to write 6 to Operating Mode register…
Write failed: ExceptionResponse(dev_id=1, function_code=134, exception_code=3)
Exception Code: 3 - Illegal Data Value
Enter mode value to test (0-255, ‘q’ to quit, ‘r’ to read current): 7
Attempting to write 7 to Operating Mode register…
Write failed: ExceptionResponse(dev_id=1, function_code=134, exception_code=3)
Exception Code: 3 - Illegal Data Value
Enter mode value to test (0-255, ‘q’ to quit, ‘r’ to read current): 8
Attempting to write 8 to Operating Mode register…
Write failed: ExceptionResponse(dev_id=1, function_code=134, exception_code=3)
Exception Code: 3 - Illegal Data Value
Enter mode value to test (0-255, ‘q’ to quit, ‘r’ to read current): 9
Attempting to write 9 to Operating Mode register…
Write failed: ExceptionResponse(dev_id=1, function_code=134, exception_code=3)
Exception Code: 3 - Illegal Data Value
Enter mode value to test (0-255, ‘q’ to quit, ‘r’ to read current): r
Current mode: 4 (E-Heater)
Enter mode value to test (0-255, ‘q’ to quit, ‘r’ to read current): 1
Attempting to write 1 to Operating Mode register…
Write successful!
Reading back to verify…
Verified: Mode is now 1
Enter mode value to test (0-255, ‘q’ to quit, ‘r’ to read current): r
Current mode: 1 (Eco)
Enter mode value to test (0-255, ‘q’ to quit, ‘r’ to read current): q
TEST SUMMARY (11 attempts)
Mode 0: Exception 3: Illegal Data Value
Mode 1: SUCCESS
Mode 2: SUCCESS
Mode 3: Exception 3: Illegal Data Value
Mode 4: SUCCESS
Mode 5: Exception 3: Illegal Data Value
Mode 6: Exception 3: Illegal Data Value
Mode 7: Exception 3: Illegal Data Value
Mode 8: Exception 3: Illegal Data Value
Mode 9: Exception 3: Illegal Data Value
Mode 1: SUCCESS
Successfully wrote modes: 1, 2, 4, 1
Please document what each mode does on your heat pump display!
Consider reporting findings at: GitHub · Where software is built
Failed attempts: 7
Exception 3: Illegal Data Value: 7 occurrence(s)