Skip to content

Commit 7715ca4

Browse files
committed
Merge branch 'v1.1.7' of https://github.com/HotNoob/PythonProtocolGateway into v1.1.7
2 parents fcb08f6 + 5f6a775 commit 7715ca4

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

classes/transports/modbus_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def read_serial_number(self) -> str:
105105
print(sn2)
106106
print(sn3)
107107

108-
if not re.search("[^a-zA-Z0-9\_]", sn2) :
108+
if not re.search("[^a-zA-Z0-9_]", sn2) :
109109
serial_number = sn2
110110

111111
return serial_number
@@ -262,7 +262,7 @@ def analyze_protocol(self, settings_dir : str = 'protocols'):
262262
def evaluate_score(entry : registry_map_entry, val):
263263
score = 0
264264
if entry.data_type == Data_Type.ASCII:
265-
if val and not re.match('[^a-zA-Z0-9\_\-]', val): #validate ascii
265+
if val and not re.match('[^a-zA-Z0-9_-]', val): #validate ascii
266266
mod = 1
267267
if entry.concatenate:
268268
mod = len(entry.concatenate_registers)

protocols/srne/srne_2021_v1.96.holding_registry_map.csv

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -19,32 +19,32 @@ variable name,data type,register,documented name,description,writable,values,uni
1919
,,0x010E,Device Total charging power,,R,,W,
2020
,BYTE,0x0210,Device state,,R,"{""0"": ""Initialization"", ""1"": ""Standby"", ""2"": ""AC power operation"", ""3"": ""Inverter operation""}",,
2121
,,0x0212,Device Bus Voltage Sum,,R,,0.1V,
22-
,,0x0213,Grid phase-A voltage,,R,,0.1V,
23-
,,0x0214,Grid phase-A current,,R,,0.1A,
24-
,,0x022A,Grid phase-B voltage,,R,,0.1V,
25-
,,0x0238,Grid phase-B current,,R,,0.1A,
26-
,,0x022B,Grid phase-C voltage,,R,,0.1V,
27-
,,0x0239,Grid phase-C current,,R,,0.1A,
22+
,,0x0213,Grid phase_A voltage,,R,,0.1V,
23+
,,0x0214,Grid phase_A current,,R,,0.1A,
24+
,,0x022A,Grid phase_B voltage,,R,,0.1V,
25+
,,0x0238,Grid phase_B current,,R,,0.1A,
26+
,,0x022B,Grid phase_C voltage,,R,,0.1V,
27+
,,0x0239,Grid phase_C current,,R,,0.1A,
2828
,,0x0215,Grid frequency,,R,,0.01Hz,
29-
,,0x0216,Inverter phase-A output voltage,,R,,0.1V,
30-
,,0x0217,Inverter phase-A inductive current,,R,,0.1A,
31-
,,0x022C,Inverter phase-B output voltage,,R,,0.1V,
32-
,,0x022E,Inverter phase-B inductive current,,R,,0.1A,
33-
,,0x022D,Inverter phase-C output voltage,,R,,0.1V,
34-
,,0x022F,Inverter phase-C inductive current,,R,,0.1A,
29+
,,0x0216,Inverter phase_A output voltage,,R,,0.1V,
30+
,,0x0217,Inverter phase_A inductive current,,R,,0.1A,
31+
,,0x022C,Inverter phase_B output voltage,,R,,0.1V,
32+
,,0x022E,Inverter phase_B inductive current,,R,,0.1A,
33+
,,0x022D,Inverter phase_C output voltage,,R,,0.1V,
34+
,,0x022F,Inverter phase_C inductive current,,R,,0.1A,
3535
,,0x0218,Inverter frequency,,R,,0.01Hz,
36-
,,0x0219,Load Phase-A current,,R,,0.1A,
37-
,,0x021B,Load Phase-A active power,,R,,W,
38-
,,0x021C,Load Phase-A apparent power,,R,,VA,
39-
,,0x021F,Load Phase-A ratio,,R,0~100,%,
40-
,,0x0230,Load Phase-B current,,R,,0.1A,
41-
,,0x0232,Load Phase-B active power,,R,,W,
42-
,,0x0234,Load Phase-B apparent power,,R,,VA,
43-
,,0x0236,Load Phase-B ratio,,R,0~100,%,
44-
,,0x0231,Load Phase-C current,,R,,0.1A,
45-
,,0x0233,Load Phase-C active power,,R,,W,
46-
,,0x0235,Load Phase-C apparent power,,R,,VA,
47-
,,0x0237,Load Phase-C ratio,,R,0~100,%,
36+
,,0x0219,Load Phase_A current,,R,,0.1A,
37+
,,0x021B,Load Phase_A active power,,R,,W,
38+
,,0x021C,Load Phase_A apparent power,,R,,VA,
39+
,,0x021F,Load Phase_A ratio,,R,0~100,%,
40+
,,0x0230,Load Phase_B current,,R,,0.1A,
41+
,,0x0232,Load Phase_B active power,,R,,W,
42+
,,0x0234,Load Phase_B apparent power,,R,,VA,
43+
,,0x0236,Load Phase_B ratio,,R,0~100,%,
44+
,,0x0231,Load Phase_C current,,R,,0.1A,
45+
,,0x0233,Load Phase_C active power,,R,,W,
46+
,,0x0235,Load Phase_C apparent power,,R,,VA,
47+
,,0x0237,Load Phase_C ratio,,R,0~100,%,
4848
,BYTE,0xF02C,Stats GenerateEnergyToGridTday,,R,,0.1kWh,
4949
,BYTE,0xF02D,Stats BatChgTday,,R,,1AH,
5050
,BYTE,0xF02E,Stats BatDischgTday,,R,,1AH,

0 commit comments

Comments
 (0)