File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
custom_components/solaredge_modbus_multi Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 2828)
2929
3030
31+ class ModbusExceptions :
32+ """An enumeration of the valid modbus exceptions."""
33+
34+ IllegalFunction = 0x01
35+ IllegalAddress = 0x02
36+ IllegalValue = 0x03
37+ SlaveFailure = 0x04
38+ Acknowledge = 0x05
39+ SlaveBusy = 0x06
40+ NegativeAcknowledge = 0x07
41+ MemoryParityError = 0x08
42+ GatewayPathUnavailable = 0x0A
43+ GatewayNoResponse = 0x0B
44+
45+
3146class RetrySettings (IntEnum ):
3247 """Retry settings when opening a connection to the inverter fails."""
3348
Original file line number Diff line number Diff line change 1515 from pymodbus .constants import Endian
1616 from pymodbus .exceptions import ConnectionException , ModbusIOException
1717 from pymodbus .payload import BinaryPayloadDecoder
18- from pymodbus .pdu import ExceptionResponse , ModbusExceptions
18+ from pymodbus .pdu import ExceptionResponse
1919except ImportError :
2020 raise ImportError ("pymodbus is not installed, or pymodbus version is not supported" )
2121
2828 ConfDefaultStr ,
2929 ConfName ,
3030 ModbusDefaults ,
31+ ModbusExceptions ,
3132 RetrySettings ,
3233 SolarEdgeTimeouts ,
3334 SunSpecNotImpl ,
You can’t perform that action at this time.
0 commit comments