feat: add ClientIdPortal property to CounterServer module and form.json
This commit is contained in:
@@ -12,6 +12,12 @@
|
|||||||
"caption": "JSON-Datenquelle",
|
"caption": "JSON-Datenquelle",
|
||||||
"validVariableTypes": [3]
|
"validVariableTypes": [3]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "NumberSpinner",
|
||||||
|
"name": "ClientIdPortal",
|
||||||
|
"caption": "Client-ID (Portal)",
|
||||||
|
"digits": 0
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "NumberSpinner",
|
"type": "NumberSpinner",
|
||||||
"name": "UpdateTime",
|
"name": "UpdateTime",
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ class CounterServer extends IPSModule
|
|||||||
$this->RegisterPropertyInteger('Connector', 0);
|
$this->RegisterPropertyInteger('Connector', 0);
|
||||||
$this->RegisterPropertyInteger('SourceJSON', 0);
|
$this->RegisterPropertyInteger('SourceJSON', 0);
|
||||||
$this->RegisterPropertyInteger('UpdateTime', 60);
|
$this->RegisterPropertyInteger('UpdateTime', 60);
|
||||||
|
$this->RegisterPropertyInteger('ClientIdPortal', 0);
|
||||||
$this->RegisterTimer('Update', 0, 'SECT_checkTable($_IPS[\'TARGET\']);');
|
$this->RegisterTimer('Update', 0, 'SECT_checkTable($_IPS[\'TARGET\']);');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@ class CounterServer extends IPSModule
|
|||||||
$counterName = $c['name'] ?? $counterId;
|
$counterName = $c['name'] ?? $counterId;
|
||||||
$type = $c['type'] ?? 'other';
|
$type = $c['type'] ?? 'other';
|
||||||
$unit = $c['unit'] ?? 'kWh';
|
$unit = $c['unit'] ?? 'kWh';
|
||||||
$projectId = isset($c['project_id']) ? (int)$c['project_id'] : 'NULL';
|
$projectId = $this->ReadPropertyInteger('ClientIdPortal');
|
||||||
|
|
||||||
// ---------- UPSERT ----------
|
// ---------- UPSERT ----------
|
||||||
$sql = "
|
$sql = "
|
||||||
|
|||||||
Reference in New Issue
Block a user