pymscada 0.2.0rc7__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pymscada might be problematic. Click here for more details.
- {pymscada-0.2.0rc7/src/pymscada.egg-info → pymscada-0.2.1}/PKG-INFO +2 -2
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/pyproject.toml +2 -2
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/callout.py +3 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/demo/__pycache__/__init__.cpython-311.pyc +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/demo/callout.yaml +4 -3
- pymscada-0.2.1/src/pymscada/demo/pymscada-callout.service +16 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/module_config.py +9 -3
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/pdf/__pycache__/__init__.cpython-311.pyc +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1/src/pymscada.egg-info}/PKG-INFO +2 -2
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada.egg-info/SOURCES.txt +1 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada.egg-info/requires.txt +1 -1
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/tests/test_callout.py +0 -1
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/LICENSE +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/MANIFEST.in +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/README.md +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/setup.cfg +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/__init__.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/__main__.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/alarms.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/bus_client.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/bus_server.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/checkout.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/config.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/console.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/demo/README.md +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/demo/__init__.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/demo/accuweather.yaml +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/demo/alarms.yaml +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/demo/bus.yaml +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/demo/files.yaml +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/demo/history.yaml +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/demo/logixclient.yaml +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/demo/modbus_plc.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/demo/modbusclient.yaml +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/demo/modbusserver.yaml +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/demo/openweather.yaml +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/demo/opnotes.yaml +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/demo/ping.yaml +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/demo/pymscada-alarms.service +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/demo/pymscada-bus.service +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/demo/pymscada-demo-modbus_plc.service +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/demo/pymscada-files.service +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/demo/pymscada-history.service +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/demo/pymscada-io-logixclient.service +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/demo/pymscada-io-modbusclient.service +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/demo/pymscada-io-modbusserver.service +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/demo/pymscada-io-openweather.service +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/demo/pymscada-io-ping.service +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/demo/pymscada-io-snmpclient.service +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/demo/pymscada-io-witsapi.service +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/demo/pymscada-opnotes.service +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/demo/pymscada-wwwserver.service +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/demo/snmpclient.yaml +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/demo/tags.yaml +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/demo/witsapi.yaml +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/demo/wwwserver.yaml +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/files.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/history.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/iodrivers/__init__.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/iodrivers/accuweather.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/iodrivers/logix_client.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/iodrivers/logix_map.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/iodrivers/modbus_client.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/iodrivers/modbus_map.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/iodrivers/modbus_server.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/iodrivers/openweather.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/iodrivers/ping_client.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/iodrivers/ping_map.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/iodrivers/snmp_client.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/iodrivers/snmp_map.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/iodrivers/witsapi.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/iodrivers/witsapi_POC.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/main.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/misc.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/opnotes.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/pdf/__init__.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/pdf/one.pdf +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/pdf/two.pdf +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/periodic.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/protocol_constants.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/samplers.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/tag.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/tools/snmp_client2.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/tools/walk.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/validate.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada/www_server.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada.egg-info/dependency_links.txt +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada.egg-info/entry_points.txt +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/src/pymscada.egg-info/top_level.txt +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/tests/test_alarms.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/tests/test_bus_server.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/tests/test_config.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/tests/test_history.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/tests/test_misc.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/tests/test_opnotes.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/tests/test_periodic.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/tests/test_samplers.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/tests/test_tag.py +0 -0
- {pymscada-0.2.0rc7 → pymscada-0.2.1}/tests/test_validate.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pymscada
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Shared tag value SCADA with python backup and Angular UI
|
|
5
5
|
Author-email: Jamie Walton <jamie@walton.net.nz>
|
|
6
6
|
License: GPL-3.0-or-later
|
|
@@ -17,7 +17,7 @@ Description-Content-Type: text/markdown
|
|
|
17
17
|
License-File: LICENSE
|
|
18
18
|
Requires-Dist: PyYAML>=6.0.1
|
|
19
19
|
Requires-Dist: aiohttp>=3.8.5
|
|
20
|
-
Requires-Dist: pymscada-html==0.2.
|
|
20
|
+
Requires-Dist: pymscada-html==0.2.0
|
|
21
21
|
Requires-Dist: cerberus>=1.3.5
|
|
22
22
|
Requires-Dist: pycomm3>=1.2.14
|
|
23
23
|
Requires-Dist: pysnmplib>=5.0.24
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "pymscada"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.1"
|
|
4
4
|
description = "Shared tag value SCADA with python backup and Angular UI"
|
|
5
5
|
authors = [
|
|
6
6
|
{name = "Jamie Walton", email = "jamie@walton.net.nz"},
|
|
@@ -8,7 +8,7 @@ authors = [
|
|
|
8
8
|
dependencies = [
|
|
9
9
|
"PyYAML>=6.0.1", # all
|
|
10
10
|
"aiohttp>=3.8.5", # www_server
|
|
11
|
-
"pymscada-html==0.2.
|
|
11
|
+
"pymscada-html==0.2.0", # www_server
|
|
12
12
|
"cerberus>=1.3.5", # validate
|
|
13
13
|
"pycomm3>=1.2.14", # logix_client
|
|
14
14
|
"pysnmplib>=5.0.24", # DON'T use pysnmp, dead
|
|
@@ -159,8 +159,11 @@ class Callout:
|
|
|
159
159
|
|
|
160
160
|
def rta_cb(self, request):
|
|
161
161
|
"""Handle RTA requests for callout configuration."""
|
|
162
|
+
logging.info(f'rta_cb {request}')
|
|
162
163
|
if 'action' not in request:
|
|
163
164
|
logging.warning(f'rta_cb malformed {request}')
|
|
165
|
+
elif request['action'] == 'ALL':
|
|
166
|
+
self.rta.value = {'callees': self.callees, 'groups': self.groups}
|
|
164
167
|
elif request['action'] == 'MODIFY':
|
|
165
168
|
for callee in self.callees:
|
|
166
169
|
if callee['name'] == request['name']:
|
|
Binary file
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
bus_ip: 127.0.0.1
|
|
2
2
|
bus_port: 1324
|
|
3
3
|
rta_tag: __callout__
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
alarms_tag: __alarms__
|
|
5
|
+
ack_tag: SI_Alarm_Ack
|
|
6
|
+
status_tag: SO_Alarm_Status
|
|
7
7
|
callees:
|
|
8
8
|
- name: A name
|
|
9
9
|
sms: A number
|
|
10
|
+
group: System
|
|
10
11
|
- name: B name
|
|
11
12
|
sms: B number
|
|
12
13
|
groups:
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
[Unit]
|
|
2
|
+
Description=pymscada - callout
|
|
3
|
+
BindsTo=pymscada-bus.service
|
|
4
|
+
After=pymscada-bus.service
|
|
5
|
+
|
|
6
|
+
[Service]
|
|
7
|
+
WorkingDirectory=__DIR__
|
|
8
|
+
ExecStart=__PYMSCADA__ callout --config __DIR__/config/callout.yaml --tags __DIR__/config/tags.yaml
|
|
9
|
+
Restart=always
|
|
10
|
+
RestartSec=5
|
|
11
|
+
User=__USER__
|
|
12
|
+
Group=__USER__
|
|
13
|
+
KillSignal=SIGINT
|
|
14
|
+
|
|
15
|
+
[Install]
|
|
16
|
+
WantedBy=multi-user.target
|
|
@@ -9,14 +9,14 @@ from pymscada.config import Config
|
|
|
9
9
|
class ModuleArgument:
|
|
10
10
|
def __init__(self, args: tuple[str, ...], kwargs: dict[str, Any]):
|
|
11
11
|
self.args = args
|
|
12
|
-
self.kwargs = kwargs
|
|
12
|
+
self.kwargs = kwargs
|
|
13
13
|
|
|
14
14
|
class ModuleDefinition:
|
|
15
15
|
"""Defines a module's configuration and behavior."""
|
|
16
|
-
def __init__(self, name: str, help: str, module_class:
|
|
16
|
+
def __init__(self, name: str, help: str, module_class: Any, *,
|
|
17
17
|
config: bool = True, tags: bool = True,
|
|
18
18
|
epilog: Optional[str] = None,
|
|
19
|
-
extra_args: list[ModuleArgument] = None,
|
|
19
|
+
extra_args: Optional[list[ModuleArgument]] = None,
|
|
20
20
|
await_future: bool = True):
|
|
21
21
|
self.name = name
|
|
22
22
|
self.help = help
|
|
@@ -63,6 +63,12 @@ def create_module_registry():
|
|
|
63
63
|
help='alarms',
|
|
64
64
|
module_class='pymscada.alarms:Alarms'
|
|
65
65
|
),
|
|
66
|
+
ModuleDefinition(
|
|
67
|
+
name='callout',
|
|
68
|
+
help='alarm callout notifications',
|
|
69
|
+
module_class='pymscada.callout:Callout',
|
|
70
|
+
tags=False
|
|
71
|
+
),
|
|
66
72
|
ModuleDefinition(
|
|
67
73
|
name='validate',
|
|
68
74
|
help='validate config files',
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pymscada
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Shared tag value SCADA with python backup and Angular UI
|
|
5
5
|
Author-email: Jamie Walton <jamie@walton.net.nz>
|
|
6
6
|
License: GPL-3.0-or-later
|
|
@@ -17,7 +17,7 @@ Description-Content-Type: text/markdown
|
|
|
17
17
|
License-File: LICENSE
|
|
18
18
|
Requires-Dist: PyYAML>=6.0.1
|
|
19
19
|
Requires-Dist: aiohttp>=3.8.5
|
|
20
|
-
Requires-Dist: pymscada-html==0.2.
|
|
20
|
+
Requires-Dist: pymscada-html==0.2.0
|
|
21
21
|
Requires-Dist: cerberus>=1.3.5
|
|
22
22
|
Requires-Dist: pycomm3>=1.2.14
|
|
23
23
|
Requires-Dist: pysnmplib>=5.0.24
|
|
@@ -46,6 +46,7 @@ src/pymscada/demo/opnotes.yaml
|
|
|
46
46
|
src/pymscada/demo/ping.yaml
|
|
47
47
|
src/pymscada/demo/pymscada-alarms.service
|
|
48
48
|
src/pymscada/demo/pymscada-bus.service
|
|
49
|
+
src/pymscada/demo/pymscada-callout.service
|
|
49
50
|
src/pymscada/demo/pymscada-demo-modbus_plc.service
|
|
50
51
|
src/pymscada/demo/pymscada-files.service
|
|
51
52
|
src/pymscada/demo/pymscada-history.service
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|