PyAutomationIO 2.0.6__tar.gz → 2.0.7__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.
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/PKG-INFO +1 -1
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/PyAutomationIO.egg-info/PKG-INFO +1 -1
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/PyAutomationIO.egg-info/SOURCES.txt +1 -1
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/alarms/__init__.py +5 -2
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/core.py +12 -6
- pyautomationio-2.0.6/automation/hmi/assets/index-ClvaqkQf.js → pyautomationio-2.0.7/automation/hmi/assets/index-Bx0fMYcl.js +206 -206
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/hmi/index.html +1 -1
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/managers/alarms.py +6 -1
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/models.py +4 -0
- pyautomationio-2.0.7/automation/modules/machines/resources/machines.py +655 -0
- pyautomationio-2.0.7/version.py +2 -0
- pyautomationio-2.0.6/automation/modules/machines/resources/machines.py +0 -290
- pyautomationio-2.0.6/version.py +0 -2
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/LICENSE +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/MANIFEST.in +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/PyAutomationIO.egg-info/dependency_links.txt +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/PyAutomationIO.egg-info/requires.txt +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/PyAutomationIO.egg-info/top_level.txt +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/README.md +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/__init__.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/alarms/states.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/alarms/trigger.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/buffer.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/dbmodels/__init__.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/dbmodels/alarms.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/dbmodels/core.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/dbmodels/events.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/dbmodels/logs.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/dbmodels/machines.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/dbmodels/opcua.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/dbmodels/opcua_server.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/dbmodels/tags.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/dbmodels/users.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/extensions/__init__.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/extensions/api.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/extensions/cors.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/filter/__init__.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/hmi/assets/bootstrap-icons-BeopsB42.woff +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/hmi/assets/bootstrap-icons-mSm7cUeB.woff2 +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/hmi/assets/fa-brands-400-D1LuMI3I.ttf +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/hmi/assets/fa-brands-400-D_cYUPeE.woff2 +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/hmi/assets/fa-regular-400-BjRzuEpd.woff2 +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/hmi/assets/fa-regular-400-DZaxPHgR.ttf +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/hmi/assets/fa-solid-900-CTAAxXor.woff2 +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/hmi/assets/fa-solid-900-D0aA9rwL.ttf +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/hmi/assets/fa-v4compatibility-C9RhG_FT.woff2 +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/hmi/assets/fa-v4compatibility-CCth-dXg.ttf +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/hmi/assets/index-fe9Q2n8A.css +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/hmi/industrial_pallete_icons/90/302/260 curve 2.svg" +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/hmi/industrial_pallete_icons/Analog gauge.svg +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/hmi/industrial_pallete_icons/Cool pump.svg +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/hmi/industrial_pallete_icons/Hand valve 4.svg +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/hmi/industrial_pallete_icons/Mass flowmeter.svg +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/hmi/industrial_pallete_icons/Short horizontal pipe.svg +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/hmi/industrial_pallete_icons/Tank 16.svg +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/iad/__init__.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/iad/frozen_data.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/iad/out_of_range.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/iad/outliers.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/logger/__init__.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/logger/alarms.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/logger/core.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/logger/datalogger.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/logger/events.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/logger/logdict.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/logger/logs.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/logger/machines.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/logger/opcua_server.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/logger/users.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/managers/__init__.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/managers/db.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/managers/opcua_client.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/managers/state_machine.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/modules/__init__.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/modules/alarms/__init__.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/modules/alarms/resources/__init__.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/modules/alarms/resources/alarms.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/modules/alarms/resources/summary.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/modules/database/__init__.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/modules/database/resources/__init__.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/modules/database/resources/database.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/modules/events/__init__.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/modules/events/resources/__init__.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/modules/events/resources/events.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/modules/events/resources/logs.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/modules/health/__init__.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/modules/health/resources/__init__.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/modules/health/resources/health.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/modules/machines/__init__.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/modules/machines/resources/__init__.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/modules/opcua/__init__.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/modules/opcua/resources/__init__.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/modules/opcua/resources/clients.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/modules/opcua/resources/server.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/modules/settings/__init__.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/modules/settings/resources/__init__.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/modules/settings/resources/settings.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/modules/tags/__init__.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/modules/tags/resources/__init__.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/modules/tags/resources/tags.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/modules/users/__init__.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/modules/users/resources/__init__.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/modules/users/resources/models/__init__.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/modules/users/resources/models/roles.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/modules/users/resources/models/users.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/modules/users/resources/roles.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/modules/users/resources/users.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/modules/users/roles.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/modules/users/users.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/opcua/__init__.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/opcua/models.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/opcua/subscription.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/pages/__init__.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/pages/alarms.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/pages/alarms_history.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/pages/assets/styles.css +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/pages/callbacks/__init__.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/pages/callbacks/alarms.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/pages/callbacks/alarms_summary.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/pages/callbacks/db.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/pages/callbacks/filter.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/pages/callbacks/machines.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/pages/callbacks/machines_detailed.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/pages/callbacks/opcua.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/pages/callbacks/opcua_server.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/pages/callbacks/tags.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/pages/callbacks/trends.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/pages/communications.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/pages/components/__init__.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/pages/components/alarms.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/pages/components/alarms_summary.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/pages/components/database.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/pages/components/gaussian_filter.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/pages/components/machines.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/pages/components/opcua.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/pages/components/opcua_server.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/pages/components/tags.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/pages/components/trends.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/pages/database.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/pages/filter.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/pages/machines.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/pages/machines_detailed.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/pages/main.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/pages/opcua_server.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/pages/tags.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/pages/trends.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/singleton.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/state_machine.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/tags/__init__.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/tags/cvt.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/tags/filter.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/tags/tag.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/tests/__init__.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/tests/test_alarms.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/tests/test_core.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/tests/test_unit.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/tests/test_user.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/utils/__init__.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/utils/decorators.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/utils/observer.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/utils/units.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/variables/__init__.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/variables/adimentional.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/variables/current.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/variables/density.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/variables/eng_time.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/variables/force.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/variables/length.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/variables/mass.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/variables/mass_flow.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/variables/percentage.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/variables/power.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/variables/pressure.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/variables/temperature.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/variables/volume.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/variables/volumetric_flow.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/workers/__init__.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/workers/logger.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/workers/state_machine.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/automation/workers/worker.py +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/requirements.txt +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/setup.cfg +0 -0
- {pyautomationio-2.0.6 → pyautomationio-2.0.7}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PyAutomationIO
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.7
|
|
4
4
|
Summary: A python framework to develop automation industrial processes applications and Artificial Intelligence applications for the industrial field
|
|
5
5
|
Home-page: https://github.com/know-ai/PyAutomation
|
|
6
6
|
Author: KnowAI
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PyAutomationIO
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.7
|
|
4
4
|
Summary: A python framework to develop automation industrial processes applications and Artificial Intelligence applications for the industrial field
|
|
5
5
|
Home-page: https://github.com/know-ai/PyAutomation
|
|
6
6
|
Author: KnowAI
|
|
@@ -43,7 +43,7 @@ automation/hmi/assets/fa-solid-900-CTAAxXor.woff2
|
|
|
43
43
|
automation/hmi/assets/fa-solid-900-D0aA9rwL.ttf
|
|
44
44
|
automation/hmi/assets/fa-v4compatibility-C9RhG_FT.woff2
|
|
45
45
|
automation/hmi/assets/fa-v4compatibility-CCth-dXg.ttf
|
|
46
|
-
automation/hmi/assets/index-
|
|
46
|
+
automation/hmi/assets/index-Bx0fMYcl.js
|
|
47
47
|
automation/hmi/assets/index-fe9Q2n8A.css
|
|
48
48
|
automation/hmi/industrial_pallete_icons/90° curve 2.svg
|
|
49
49
|
automation/hmi/industrial_pallete_icons/Analog gauge.svg
|
|
@@ -101,8 +101,11 @@ class Alarm(StateMachine):
|
|
|
101
101
|
self.tag_engine = CVTEngine()
|
|
102
102
|
self.name = name
|
|
103
103
|
self.tag = tag
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
# Verificar que tag no sea None antes de acceder a sus atributos
|
|
105
|
+
if tag is None:
|
|
106
|
+
raise ValueError(f"Cannot create alarm '{name}': tag is None")
|
|
107
|
+
self.segment = tag.segment if hasattr(tag, 'segment') else None
|
|
108
|
+
self.manufacturer = tag.manufacturer if hasattr(tag, 'manufacturer') else None
|
|
106
109
|
self.attach(machine=self, tag=tag)
|
|
107
110
|
self.description = description
|
|
108
111
|
self.alarm_setpoint = Trigger()
|
|
@@ -3206,14 +3206,14 @@ class PyAutomation(Singleton):
|
|
|
3206
3206
|
print(_colorize_message(f"[{str_date}] [INFO] {len(tags_machine)} tags found for state machine {machine.name.value} in database", "INFO"))
|
|
3207
3207
|
for tag_machine in tags_machine:
|
|
3208
3208
|
|
|
3209
|
-
logging.info(f"Loading tag {tag_machine.name} from database")
|
|
3210
|
-
print(_colorize_message(f"[{str_date}] [INFO] Loading tag {tag_machine.name} from database", "INFO"))
|
|
3211
3209
|
_tag = tag_machine.serialize()
|
|
3212
3210
|
tag_name = _tag["tag"]["name"]
|
|
3211
|
+
logging.info(f"Loading tag {tag_name} from database")
|
|
3212
|
+
print(_colorize_message(f"[{str_date}] [INFO] Loading tag {tag_name} from database", "INFO"))
|
|
3213
3213
|
tag = self.cvt.get_tag_by_name(name=tag_name)
|
|
3214
3214
|
machine.subscribe_to(tag=tag, default_tag_name=_tag["default_tag_name"])
|
|
3215
|
-
logging.info(f"Tag {
|
|
3216
|
-
print(_colorize_message(f"[{str_date}] [INFO] Tag {
|
|
3215
|
+
logging.info(f"Tag {tag_name} loaded from database")
|
|
3216
|
+
print(_colorize_message(f"[{str_date}] [INFO] Tag {tag_name} loaded from database", "INFO"))
|
|
3217
3217
|
else:
|
|
3218
3218
|
logging.info(f"State machine {machine.name.value} is a data acquisition system, skipping tag subscriptions")
|
|
3219
3219
|
print(_colorize_message(f"[{str_date}] [INFO] State machine {machine.name.value} is a data acquisition system, skipping tag subscriptions", "INFO"))
|
|
@@ -3307,7 +3307,7 @@ class PyAutomation(Singleton):
|
|
|
3307
3307
|
ack_timestamp=str|type(None),
|
|
3308
3308
|
user=User|type(None),
|
|
3309
3309
|
reload=bool,
|
|
3310
|
-
output=(Alarm, str)
|
|
3310
|
+
output=(Alarm|type(None), str)
|
|
3311
3311
|
)
|
|
3312
3312
|
def create_alarm(
|
|
3313
3313
|
self,
|
|
@@ -3359,7 +3359,7 @@ class PyAutomation(Singleton):
|
|
|
3359
3359
|
8.5
|
|
3360
3360
|
```
|
|
3361
3361
|
"""
|
|
3362
|
-
|
|
3362
|
+
result = self.alarm_manager.append_alarm(
|
|
3363
3363
|
name=name,
|
|
3364
3364
|
tag=tag,
|
|
3365
3365
|
type=alarm_type,
|
|
@@ -3374,6 +3374,12 @@ class PyAutomation(Singleton):
|
|
|
3374
3374
|
sio=self.sio
|
|
3375
3375
|
)
|
|
3376
3376
|
|
|
3377
|
+
# Verificar que result no sea None antes de desempaquetar
|
|
3378
|
+
if result is None:
|
|
3379
|
+
return None, f"Failed to create alarm '{name}': append_alarm returned None"
|
|
3380
|
+
|
|
3381
|
+
alarm, message = result
|
|
3382
|
+
|
|
3377
3383
|
if alarm:
|
|
3378
3384
|
|
|
3379
3385
|
# Persist Tag on Database
|