Skip to content

Commit

Permalink
2.13
Browse files Browse the repository at this point in the history
  • Loading branch information
Nall-chan committed Dec 8, 2023
1 parent 4aebb29 commit 779c3bf
Show file tree
Hide file tree
Showing 16 changed files with 53 additions and 51 deletions.
2 changes: 1 addition & 1 deletion ONVIF Configurator/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![SDK](https://img.shields.io/badge/Symcon-PHPModul-red.svg)](https://www.symcon.de/service/dokumentation/entwicklerbereich/sdk-tools/sdk-php/)
[![Version](https://img.shields.io/badge/Modul%20Version-2.12-blue.svg)](https://community.symcon.de/t/modul-onvif-profil-s-fuer-ip-kameras-und-encoder/52036)
[![Version](https://img.shields.io/badge/Modul%20Version-2.13-blue.svg)](https://community.symcon.de/t/modul-onvif-profil-s-fuer-ip-kameras-und-encoder/52036)
[![Version](https://img.shields.io/badge/Symcon%20Version-6.1%20%3E-green.svg)](https://www.symcon.de/service/dokumentation/installation/migrationen/v60-v61-q1-2022/)
[![License](https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-green.svg)](https://creativecommons.org/licenses/by-nc-sa/4.0/)
[![Check Style](https://github.com/Nall-chan/ONVIF/workflows/Check%20Style/badge.svg)](https://github.com/Nall-chan/ONVIF/actions)
Expand Down
6 changes: 3 additions & 3 deletions ONVIF Digital Input/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![SDK](https://img.shields.io/badge/Symcon-PHPModul-red.svg)](https://www.symcon.de/service/dokumentation/entwicklerbereich/sdk-tools/sdk-php/)
[![Version](https://img.shields.io/badge/Modul%20Version-2.12-blue.svg)](https://community.symcon.de/t/modul-onvif-profil-s-fuer-ip-kameras-und-encoder/52036)
[![Version](https://img.shields.io/badge/Modul%20Version-2.13-blue.svg)](https://community.symcon.de/t/modul-onvif-profil-s-fuer-ip-kameras-und-encoder/52036)
[![Version](https://img.shields.io/badge/Symcon%20Version-6.1%20%3E-green.svg)](https://www.symcon.de/service/dokumentation/installation/migrationen/v60-v61-q1-2022/)
[![License](https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-green.svg)](https://creativecommons.org/licenses/by-nc-sa/4.0/)
[![Check Style](https://github.com/Nall-chan/ONVIF/workflows/Check%20Style/badge.svg)](https://github.com/Nall-chan/ONVIF/actions)
Expand Down Expand Up @@ -57,8 +57,8 @@ Der Ereignis-Pfad wird bei Digital-Input versucht automatisch zu erkennen, alter

Die Statusvariablen werden automatisch angelegt. Das Löschen einzelner kann zu Fehlfunktionen führen.

| Name | Typ | Beschreibung |
| ------------------------------ | ---- | ------------------------------------------------------------------------------------------- |
| Name | Typ | Beschreibung |
| ------------------------------- | ---- | ------------------------------------------------------------------------- |
| je nach Name des Onvif-Ereignis | bool | Für jeden Digital-Eingang wird eine passende Variable in Symcon erstellt. |


Expand Down
6 changes: 3 additions & 3 deletions ONVIF Digital Input/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ public function ReceiveData($JSONString)
$this->SendDebug('ReceiveEvent', $Data, 0);
$EventProperties = $this->ReadAttributeArray(\ONVIF\Device\Attribute::EventProperties);
if (!array_key_exists($Data['Topic'], $EventProperties)) {
return false;
return '';
}
if ((count($Data['Sources']) != 1) || (count($Data['DataValues']) != 1)) {
return false;
return '';
}

$Name = $Data['Sources'][0]['Value'];
Expand All @@ -76,7 +76,7 @@ public function ReceiveData($JSONString)

$this->RegisterVariableBoolean($Ident, $Name, '', 0);
$this->SetValueBoolean($Ident, $VariableValue);
return true;
return '';
}

public function GetConfigurationForm()
Expand Down
2 changes: 1 addition & 1 deletion ONVIF Digital Output/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![SDK](https://img.shields.io/badge/Symcon-PHPModul-red.svg)](https://www.symcon.de/service/dokumentation/entwicklerbereich/sdk-tools/sdk-php/)
[![Version](https://img.shields.io/badge/Modul%20Version-2.12-blue.svg)](https://community.symcon.de/t/modul-onvif-profil-s-fuer-ip-kameras-und-encoder/52036)
[![Version](https://img.shields.io/badge/Modul%20Version-2.13-blue.svg)](https://community.symcon.de/t/modul-onvif-profil-s-fuer-ip-kameras-und-encoder/52036)
[![Version](https://img.shields.io/badge/Symcon%20Version-6.1%20%3E-green.svg)](https://www.symcon.de/service/dokumentation/installation/migrationen/v60-v61-q1-2022/)
[![License](https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-green.svg)](https://creativecommons.org/licenses/by-nc-sa/4.0/)
[![Check Style](https://github.com/Nall-chan/ONVIF/workflows/Check%20Style/badge.svg)](https://github.com/Nall-chan/ONVIF/actions)
Expand Down
9 changes: 5 additions & 4 deletions ONVIF Digital Output/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,26 +102,27 @@ public function ReceiveData($JSONString)
$EventProperty = array_pop($Events);
$SourceIndex = array_search('tt:ReferenceToken', array_column($EventProperty['Sources'], 'Type'));
if ($SourceIndex === false) {
return;
return '';
}
$SourceName = $EventProperty['Sources'][$SourceIndex]['Name'];
$EventSourceIndex = array_search($SourceName, array_column($Data['Sources'], 'Name'));
if ($EventSourceIndex === false) {
return;
return '';
}
$Ident = $Data['Sources'][$EventSourceIndex]['Value'];
$DataIndex = array_search('tt:RelayLogicalState', array_column($EventProperty['Data'], 'Type'));
if ($DataIndex === false) {
return;
return '';
}
$DataName = $EventProperty['Data'][$SourceIndex]['Name'];
$EventDataIndex = array_search($DataName, array_column($Data['DataValues'], 'Name'));
if ($EventDataIndex === false) {
return;
return '';
}
$Value = $Data['DataValues'][$EventDataIndex]['Value'];
$this->RegisterVariableBoolean($Ident, $Ident, '~Switch', 0);
$this->SetValueBoolean($Ident, ($Value == 'active'));
return '';
}

public function GetConfigurationForm()
Expand Down
2 changes: 1 addition & 1 deletion ONVIF Discovery/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![SDK](https://img.shields.io/badge/Symcon-PHPModul-red.svg)](https://www.symcon.de/service/dokumentation/entwicklerbereich/sdk-tools/sdk-php/)
[![Version](https://img.shields.io/badge/Modul%20Version-2.12-blue.svg)](https://community.symcon.de/t/modul-onvif-profil-s-fuer-ip-kameras-und-encoder/52036)
[![Version](https://img.shields.io/badge/Modul%20Version-2.13-blue.svg)](https://community.symcon.de/t/modul-onvif-profil-s-fuer-ip-kameras-und-encoder/52036)
[![Version](https://img.shields.io/badge/Symcon%20Version-6.1%20%3E-green.svg)](https://www.symcon.de/service/dokumentation/installation/migrationen/v60-v61-q1-2022/)
[![License](https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-green.svg)](https://creativecommons.org/licenses/by-nc-sa/4.0/)
[![Check Style](https://github.com/Nall-chan/ONVIF/workflows/Check%20Style/badge.svg)](https://github.com/Nall-chan/ONVIF/actions)
Expand Down
2 changes: 1 addition & 1 deletion ONVIF Events/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![SDK](https://img.shields.io/badge/Symcon-PHPModul-red.svg)](https://www.symcon.de/service/dokumentation/entwicklerbereich/sdk-tools/sdk-php/)
[![Version](https://img.shields.io/badge/Modul%20Version-2.12-blue.svg)](https://community.symcon.de/t/modul-onvif-profil-s-fuer-ip-kameras-und-encoder/52036)
[![Version](https://img.shields.io/badge/Modul%20Version-2.13-blue.svg)](https://community.symcon.de/t/modul-onvif-profil-s-fuer-ip-kameras-und-encoder/52036)
[![Version](https://img.shields.io/badge/Symcon%20Version-6.1%20%3E-green.svg)](https://www.symcon.de/service/dokumentation/installation/migrationen/v60-v61-q1-2022/)
[![License](https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-green.svg)](https://creativecommons.org/licenses/by-nc-sa/4.0/)
[![Check Style](https://github.com/Nall-chan/ONVIF/workflows/Check%20Style/badge.svg)](https://github.com/Nall-chan/ONVIF/actions)
Expand Down
5 changes: 3 additions & 2 deletions ONVIF Events/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@ public function ReceiveData($JSONString)
$this->SendDebug('ReceiveEvent', $Data, 0);
$EventProperties = $this->ReadAttributeArray(\ONVIF\Device\Attribute::EventProperties);
if (!array_key_exists($Data['Topic'], $EventProperties)) {
return false;
return '';
}
$PreName = str_replace($this->ReadPropertyString(\ONVIF\Device\Property::EventTopic), '', $Data['Topic']);
return $this->SetEventStatusVariable($PreName, $EventProperties[$Data['Topic']], $Data);
$this->SetEventStatusVariable($PreName, $EventProperties[$Data['Topic']], $Data);
return '';
}

public function GetConfigurationForm()
Expand Down
2 changes: 1 addition & 1 deletion ONVIF IO/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![SDK](https://img.shields.io/badge/Symcon-PHPModul-red.svg)](https://www.symcon.de/service/dokumentation/entwicklerbereich/sdk-tools/sdk-php/)
[![Version](https://img.shields.io/badge/Modul%20Version-2.12-blue.svg)](https://community.symcon.de/t/modul-onvif-profil-s-fuer-ip-kameras-und-encoder/52036)
[![Version](https://img.shields.io/badge/Modul%20Version-2.13-blue.svg)](https://community.symcon.de/t/modul-onvif-profil-s-fuer-ip-kameras-und-encoder/52036)
[![Version](https://img.shields.io/badge/Symcon%20Version-6.1%20%3E-green.svg)](https://www.symcon.de/service/dokumentation/installation/migrationen/v60-v61-q1-2022/)
[![License](https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-green.svg)](https://creativecommons.org/licenses/by-nc-sa/4.0/)
[![Check Style](https://github.com/Nall-chan/ONVIF/workflows/Check%20Style/badge.svg)](https://github.com/Nall-chan/ONVIF/actions)
Expand Down
2 changes: 1 addition & 1 deletion ONVIF Image Grabber/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![SDK](https://img.shields.io/badge/Symcon-PHPModul-red.svg)](https://www.symcon.de/service/dokumentation/entwicklerbereich/sdk-tools/sdk-php/)
[![Version](https://img.shields.io/badge/Modul%20Version-2.12-blue.svg)](https://community.symcon.de/t/modul-onvif-profil-s-fuer-ip-kameras-und-encoder/52036)
[![Version](https://img.shields.io/badge/Modul%20Version-2.13-blue.svg)](https://community.symcon.de/t/modul-onvif-profil-s-fuer-ip-kameras-und-encoder/52036)
[![Version](https://img.shields.io/badge/Symcon%20Version-6.1%20%3E-green.svg)](https://www.symcon.de/service/dokumentation/installation/migrationen/v60-v61-q1-2022/)
[![License](https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-green.svg)](https://creativecommons.org/licenses/by-nc-sa/4.0/)
[![Check Style](https://github.com/Nall-chan/ONVIF/workflows/Check%20Style/badge.svg)](https://github.com/Nall-chan/ONVIF/actions)
Expand Down
15 changes: 8 additions & 7 deletions ONVIF Image Grabber/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/
class ONVIFImageGrabber extends ONVIFModuleBase
{
public const wsdl = \ONVIF\WSDL::Media; //'media-mod';
public const wsdl = \ONVIF\WSDL::Media;
public const TopicFilter = 'videosource';

public function Create()
Expand Down Expand Up @@ -94,7 +94,7 @@ public function ReceiveData($JSONString)
$this->SendDebug('ReceiveEvent', $Data, 0);
$EventProperties = $this->ReadAttributeArray(\ONVIF\Device\Attribute::EventProperties);
if (!array_key_exists($Data['Topic'], $EventProperties)) {
return false;
return '';
}
$EventProperty = $EventProperties[$Data['Topic']];
$FoundEventIndex = false;
Expand Down Expand Up @@ -122,10 +122,11 @@ public function ReceiveData($JSONString)
unset($Data['Sources'][$FoundEventIndex]);
}
if ($SkipEvent) {
return false;
return '';
}
$PreName = str_replace($this->ReadPropertyString(\ONVIF\Device\Property::EventTopic), '', $Data['Topic']);
return $this->SetEventStatusVariable($PreName, $EventProperties[$Data['Topic']], $Data);
$this->SetEventStatusVariable($PreName, $EventProperties[$Data['Topic']], $Data);
return '';
}

public function GetConfigurationForm()
Expand Down Expand Up @@ -333,13 +334,13 @@ public function RequestAction($Ident, $Value)
switch ($Ident) {
case 'RefreshProfileForm':
$this->RefreshProfileForm($Value);
return true;
return;
case \ONVIF\ImageGrabber\Timer::UpdateImage:
$this->UpdateImage();
if ((bool) $Value) {
$this->ReloadForm();
}
return true;
return;
}
}
protected function IOChangeState($State)
Expand All @@ -354,7 +355,7 @@ protected function RefreshProfileForm($NewVideoSource)
{
$Capabilities = @$this->GetCapabilities();
if ($Capabilities == false) {
return false;
return;
}
$ProfileOptions = [];
$ProfileOptions[] = [
Expand Down
2 changes: 1 addition & 1 deletion ONVIF Media Stream/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![SDK](https://img.shields.io/badge/Symcon-PHPModul-red.svg)](https://www.symcon.de/service/dokumentation/entwicklerbereich/sdk-tools/sdk-php/)
[![Version](https://img.shields.io/badge/Modul%20Version-2.12-blue.svg)](https://community.symcon.de/t/modul-onvif-profil-s-fuer-ip-kameras-und-encoder/52036)
[![Version](https://img.shields.io/badge/Modul%20Version-2.13-blue.svg)](https://community.symcon.de/t/modul-onvif-profil-s-fuer-ip-kameras-und-encoder/52036)
[![Version](https://img.shields.io/badge/Symcon%20Version-6.1%20%3E-green.svg)](https://www.symcon.de/service/dokumentation/installation/migrationen/v60-v61-q1-2022/)
[![License](https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-green.svg)](https://creativecommons.org/licenses/by-nc-sa/4.0/)
[![Check Style](https://github.com/Nall-chan/ONVIF/workflows/Check%20Style/badge.svg)](https://github.com/Nall-chan/ONVIF/actions)
Expand Down
37 changes: 18 additions & 19 deletions ONVIF Media Stream/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -865,12 +865,12 @@ public function RequestAction($Ident, $Value)
return true;
}
if ($Ident == 'RefreshProfileForm') {
$this->RefreshProfileForm($Value);
return true;
$this->RefreshProfileForm((string) $Value);
return;
}
if ($Ident == 'RefreshEnablePresetProfileForm') {
$this->RefreshPresetProfileForm($Value);
return true;
$this->RefreshPresetProfileForm((bool) $Value);
return;
}
$Speed = 0;
if (@$this->GetIDForIdent('SPEED')) {
Expand All @@ -882,18 +882,17 @@ public function RequestAction($Ident, $Value)
}
switch ($Ident) {
case 'PRESET':
if ($this->GotoPreset((int) $Value)) {
$this->SetValue('PRESET', $Value);
return true;
if ($this->GotoPreset($Value)) {
$this->SetValueInteger('PRESET', (int) $Value);
}
return false;
return;
case 'TIME':
case 'SPEED':
$this->SetValueFloat($Ident, $Value);
return true;
$this->SetValueFloat($Ident, (float) $Value);
return;
case 'PT':
$Result = false;
switch ($Value) {
switch ((int) $Value) {
case 0:
$Result = $this->MoveLeftSpeedTime($Speed, $Time);
break;
Expand All @@ -913,15 +912,15 @@ public function RequestAction($Ident, $Value)
set_error_handler([$this, 'ModulErrorHandler']);
trigger_error($this->Translate('Invalid Value.'), E_USER_NOTICE);
restore_error_handler();
return false;
return;
}
if ($Result) {
$this->SetValueInteger('PT', $Value);
}
return $Result;
return;
case 'ZOOM':
$Result = false;
switch ($Value) {
switch ((int) $Value) {
case 0:
$Result = $this->ZoomFarSpeedTime($Speed, $Time);
break;
Expand All @@ -935,17 +934,17 @@ public function RequestAction($Ident, $Value)
set_error_handler([$this, 'ModulErrorHandler']);
trigger_error($this->Translate('Invalid Value.'), E_USER_NOTICE);
restore_error_handler();
return false;
return;
}
if ($Result) {
$this->SetValueInteger('ZOOM', $Value);
$this->SetValueInteger('ZOOM', (int) $Value);
}
return $Result;
return;
}
set_error_handler([$this, 'ModulErrorHandler']);
trigger_error($this->Translate('Invalid Ident.'), E_USER_NOTICE);
restore_error_handler();
return false;
return;
}

public function ReceiveData($JSONString)
Expand Down Expand Up @@ -1003,7 +1002,7 @@ protected function RefreshProfileForm($NewVideoSource)
{
$Capabilities = @$this->GetCapabilities();
if ($Capabilities == false) {
return false;
return;
}
$ProfileOptions = [];
$ProfileOptions[] = [
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![SDK](https://img.shields.io/badge/Symcon-PHPModul-red.svg)](https://www.symcon.de/service/dokumentation/entwicklerbereich/sdk-tools/sdk-php/)
[![Version](https://img.shields.io/badge/Modul%20Version-2.12-blue.svg)](https://community.symcon.de/t/modul-onvif-profil-s-fuer-ip-kameras-und-encoder/52036)
[![Version](https://img.shields.io/badge/Modul%20Version-2.13-blue.svg)](https://community.symcon.de/t/modul-onvif-profil-s-fuer-ip-kameras-und-encoder/52036)
[![Version](https://img.shields.io/badge/Symcon%20Version-6.1%20%3E-green.svg)](https://www.symcon.de/service/dokumentation/installation/migrationen/v60-v61-q1-2022/)
[![License](https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-green.svg)](https://creativecommons.org/licenses/by-nc-sa/4.0/)
[![Check Style](https://github.com/Nall-chan/ONVIF/workflows/Check%20Style/badge.svg)](https://github.com/Nall-chan/ONVIF/actions)
Expand Down Expand Up @@ -140,7 +140,7 @@ Für das Discovery werden Pakete über die Multicast-Adresse `239.255.255.250` a
----------
### 2. Changelog

**Version 2.12:** <span style="color:red">**(Dies ist die letzte Version für IPS kleiner Version 7.0)**</span>
**Version 2.13:** <span style="color:red">**(Dies ist die letzte Version für IPS kleiner Version 7.0)**</span>
- Lesen der Fähigkeiten eines Gerätes in der IO Instanz verbessert.
- IO Instanz schreibt Warnungen in das Meldungslog.
- Vorhandene Fehlermeldungen bei der Kommunikation enthalten jetzt den Funktionsnamen bei welchem er Fehler aufgetreten ist.
Expand Down
6 changes: 3 additions & 3 deletions library.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"compatibility": {
"version": "6.1"
},
"version": "2.12",
"build": 212,
"date": 1691306925
"version": "2.13",
"build": 213,
"date": 1702047058
}
2 changes: 1 addition & 1 deletion libs/ONVIFModuleBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ protected static function unparse_url($parsed_url)

protected function ModulErrorHandler($errno, $errstr)
{
$this->SendDebug('ERROR', utf8_decode($errstr), 0);
$this->SendDebug('ERROR', $errstr, 0);
echo $errstr . "\r\n";
//return true;
}
Expand Down

0 comments on commit 779c3bf

Please sign in to comment.