Skip to content

Versteckte Systemvariablen auslesen #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Systemvariablen/form.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
"name": "AlarmScriptID",
"type": "SelectScript",
"caption": "Alarmmanagement-Script"
},
{
"name": "ShowHidden",
"type": "CheckBox",
"caption": "show hidden system variables"
}
],
"status": [
Expand Down
1 change: 1 addition & 0 deletions Systemvariablen/locale.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"emulate state": "Status emulieren",
"enable alarm variable": "Alarm-Variablen aktiv",
"Alarmmanagement-Script": "Script für Alarmverarbeitung",
"show hidden system variables": "Versteckte Systemvariablen anzeigen",
"Configuration is valid.": "Konfiguration gültig.",
"No trigger or interval active.": "Kein Trigger oder Intervall aktiv.",
"Interval to small.": "Intervall darf nicht kleiner 1 sein.",
Expand Down
7 changes: 6 additions & 1 deletion Systemvariablen/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public function Create()
$this->RegisterPropertyBoolean('EmulateStatus', false);
$this->RegisterPropertyBoolean('EnableAlarmDP', true);
$this->RegisterPropertyInteger('AlarmScriptID', 0);
$this->RegisterPropertyBoolean('ShowHidden', false);

$this->RegisterTimer('ReadHMSysVar', 0, 'HM_SystemVariablesTimer($_IPS[\'TARGET\']);');
$this->HMDeviceAddress = '';
Expand Down Expand Up @@ -640,7 +641,11 @@ private function GetTriggerVar()
private function ReadSysVars()
{
// Systemvariablen
$HMScript = 'SysVars=dom.GetObject(ID_SYSTEM_VARIABLES).EnumUsedIDs();';
if ($this->ReadPropertyBoolean('ShowHidden')) {
$HMScript = 'SysVars=dom.GetObject(ID_SYSTEM_VARIABLES).EnumIDs();';
} else {
$HMScript = 'SysVars=dom.GetObject(ID_SYSTEM_VARIABLES).EnumUsedIDs();';
}

try {
$HMScriptResult = $this->LoadHMScript('SysVar.exe', $HMScript);
Expand Down