File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 2
2
from enum import Enum
3
3
import logging
4
4
from queue import Queue
5
- from pymodbus .client .sync import ModbusTcpClient , ModbusSocketFramer
6
- from pymodbus import exceptions
5
+ try :
6
+ # Pymodbus >= 3.0
7
+ from pymodbus .client import ModbusTcpClient
8
+ from pymodbus .transaction import ModbusSocketFramer
9
+ except ImportError :
10
+ # Pymodbus < 3.0
11
+ from pymodbus .client .sync import ModbusTcpClient , ModbusSocketFramer
7
12
from SungrowModbusTcpClient import SungrowModbusTcpClient
8
13
9
14
DEFAULT_SCAN_RATE_S = 5
Original file line number Diff line number Diff line change 1
- version = "0.6.0 "
1
+ version = "0.6.1 "
Original file line number Diff line number Diff line change 19
19
'paho-mqtt>=1.5.0' ,
20
20
'pymodbus>=2.3.0' ,
21
21
'click>=6.7' ,
22
- 'SungrowModbusTcpClient>=0.1.6 ' ,
22
+ 'SungrowModbusTcpClient>=0.1.7 ' ,
23
23
],
24
24
tests_require = [
25
25
'nose2>=0.9.2' ,
You can’t perform that action at this time.
0 commit comments