Skip to content

Commit

Permalink
0.70
Browse files Browse the repository at this point in the history
  • Loading branch information
Nall-chan committed Jan 14, 2024
1 parent 6bac2da commit da7010c
Show file tree
Hide file tree
Showing 9 changed files with 128 additions and 31 deletions.
5 changes: 5 additions & 0 deletions Bosch SmartHome Configurator/locale.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@
"Bosch SmartHome Automation Rules": "Bosch SmartHome Automationen",
"Bosch SmartHome Scenarios": "Bosch SmartHome Szenarien",
"Bosch SmartHome Water Alarm System": "Bosch SmartHome Wasseralarm System",
"Doors and Windows": "Fenster und Türen",
"Messages": "Nachrichten",
"-VentilationService-": "-LüftungsService-",
"-PresenceSimulationService-": "-AnwesenheitssimulationsService-",
"-IntrusionDetectionSystem-": "-EinbruchmeldeSystem-",
"-SmokeDetectionSystem-": "-RauchmeldeSystem-",
"This module is free for non-commercial use,\r\nDonations in support of the author are accepted here:": "Dieses Modul ist für die nicht kommerzielle Nutzung kostenlos,\r\nSchenkungen als Unterstützung für den Autor werden hier akzeptiert:"
}
}
Expand Down
12 changes: 8 additions & 4 deletions Bosch SmartHome Configurator/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,13 @@ private function GetScenarios(): array
$Values[] = [
'id' => $ScenarioId,
'name' => IPS_GetName($InstanceID),
'deviceModel' => 'AutomationRule',
'deviceModel' => 'Scenario',
'instanceID' => $InstanceID,
];
}
return $Values;
}

private function GetWaterAlarm(): array
{
$WaterAlarmSystemState = $this->GetLists(\BoschSHC\ApiUrl::WaterAlarm);
Expand Down Expand Up @@ -236,6 +237,7 @@ private function GetWaterAlarm(): array
}
return $Values;
}

private function GetMessages(): array
{
$Create = [];
Expand All @@ -254,7 +256,7 @@ private function GetMessages(): array
[
'id' => '',
'name' => IPS_GetName($InstanceID),
'deviceModel' => 'Bosch SmartHome Messages',
'deviceModel' => 'Messages',
'instanceID' => $InstanceID
],
$Create
Expand All @@ -273,6 +275,7 @@ private function GetMessages(): array
}
return $Values;
}

private function GetDoorsWindows(): array
{
$Create = [];
Expand Down Expand Up @@ -310,6 +313,7 @@ private function GetDoorsWindows(): array
}
return $Values;
}

private function GetDevices(): array
{
$RoomList = $this->GetLists(\BoschSHC\ApiUrl::Rooms);
Expand All @@ -321,7 +325,7 @@ private function GetDevices(): array
$InstanceID = array_search($Device['id'], $IPSDevices);
$Values[] = [
'id' => $Device['id'],
'name' => ($InstanceID ? IPS_GetName($InstanceID) : $Device['name']),
'name' => ($InstanceID ? IPS_GetName($InstanceID) : ($Device['name'][0] == '-' ? $this->Translate($Device['name']) : $Device['name'])),
'deviceModel' => $Device['deviceModel'],
'instanceID' => ($InstanceID ? $InstanceID : 0),
'create' => [
Expand All @@ -340,7 +344,7 @@ private function GetDevices(): array
$Values[] = [
'id' => $DeviceId,
'name' => IPS_GetName($InstanceID),
'deviceModel' => '',
'deviceModel' => 'unknown',
'instanceID' => $InstanceID,
];
}
Expand Down
7 changes: 6 additions & 1 deletion Bosch SmartHome Device/locale.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,12 @@
"Temperature offset": "Temperaturoffset",
"Terminal configuration": "Terminalkonfiguration",
"Bypass": "Umgangen",
"Vibration sensor": "Vibrationssensor"
"Vibration sensor": "Vibrationssensor",
"Surveillance alarm status": "Alarmstatus",
"Control": "Steuerung",
"Active profile": "Aktives Profil",
"Activation delay time": "Aktivierungsverzögerungszeit",
"Alarm delay time": "Alarmverzögerungszeit"
}
}
}
2 changes: 1 addition & 1 deletion Bosch SmartHome IO/form.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
{
"type": "PasswordTextBox",
"name": "Password",
"caption": "Password"
"caption": "System password"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion Bosch SmartHome IO/locale.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"Show Controller II": "Zeige Controler II",
"Please start paring with the Controller!": "Bitte starten Sie das Pairing mit dem Controller!",
"Press the Bosch Smart Home Controller's front-side button number %d, until the LED begin flashing.\r\n\r\nEnter your Bosch Smart Home Controller system password into the Textbox below\r\n and then click the \"Pair\" button.": "Drücken Sie die Taste %d auf der Vorderseite des Bosch Smart Home Controllers, bis die LED zu blinken beginnt.\r\n\r\nGeben Sie Ihr Bosch Smart Home Controller Systempasswort in das Textfeld unten ein\r\n und klicken Sie dann auf die Schaltfläche \"Koppeln\".",
"Password": "Passwort",
"System password": "Systempasswort ",
"Cannot connect to SHC": "Kann keine Verbindung zum SHC herstellen",
"Unauthorized": "Nicht autorisiert",
"Symcon is not paired with SHC": "Symcon ist nicht mit SHC gekoppelt",
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Einbinden von Bosch SmartHome Geräten und Dienstes über den Bosch SmartHome Co
### 2. Changelog

---
**Version 0.60:**
**Version 0.70:**
- Beta Release für Symcon 7.0

----------
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": "7.0"
},
"version": "0.6",
"build": 60,
"date": 1704569112
"version": "0.7",
"build": 70,
"date": 1705266469
}
117 changes: 98 additions & 19 deletions libs/Services.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,30 +63,14 @@ class Services
public const Thermostat = 'Thermostat';
public const Bypass = 'Bypass';
public const VibrationSensor = 'VibrationSensor';
public const SurveillanceAlarm = 'SurveillanceAlarm';
public const IntrusionDetectionControl = 'IntrusionDetectionControl';
//skipped Services
public const ThermostatSupportedControlMode = 'ThermostatSupportedControlMode';
public const TemperatureLevelConfiguration = 'TemperatureLevelConfiguration';

//todo
public const IntrusionDetectionControl = 'IntrusionDetectionControl';
/*
armingState: {
value: {
'SYSTEM_ARMING': 'SYSTEM_ARMING',
'SYSTEM_ARMED': 'SYSTEM_ARMED',
'SYSTEM_DISARMED': 'SYSTEM_DISARMED',
'MUTE_ALARM': 'MUTE_ALARM'
}*/
public const SurveillanceAlarm = 'SurveillanceAlarm';
/*
alarmState: {
value: {
'ALARM_ON': 'ALARM_ON',
'ALARM_OFF': 'ALARM_OFF',
'ALARM_MUTED': 'ALARM_MUTED',
'PRE_ALARM': 'PRE_ALARM',
'UNKNOWN': 'UNKNOWN'
}
},
"@type": "systemState",
"systemAvailability": {
"@type": "systemAvailabilityState",
Expand Down Expand Up @@ -152,6 +136,8 @@ class Services
self::VibrationSensor,
self::ThermostatSupportedControlMode,
self::TemperatureLevelConfiguration,
self::SurveillanceAlarm,
self::IntrusionDetectionControl
];

public static function ServiceIsValid(string $Service): bool
Expand Down Expand Up @@ -1228,6 +1214,50 @@ class VibrationSensor extends ServiceBasics
]
];
}
class SurveillanceAlarm extends ServiceBasics
{
protected static $properties = [
'value' => [
'type' => 'string',
IPSProfile => 'BSH.SurveillanceAlarm.value',
IPSVarType => VARIABLETYPE_STRING,
IPSVarName => 'Surveillance alarm status'
]
];
}
class IntrusionDetectionControl extends ServiceBasics
{
protected static $properties = [
'value' => [
'type' => 'string',
IPSProfile => 'BSH.IntrusionDetectionControl.value',
IPSVarType => VARIABLETYPE_STRING,
IPSVarAction => true,
IPSVarName => 'Control'
],
'activeProfile' => [
'type' => 'number',
IPSProfile => 'BSH.IntrusionDetectionControl.activeProfile',
IPSVarType => VARIABLETYPE_INTEGER,
IPSVarAction => true,
IPSVarName => 'Active profile'
],
'armActivationDelayTime' => [
'type' => 'number',
IPSProfile => 'BSH.IntrusionDetectionControl.DelayTime',
IPSVarType => VARIABLETYPE_INTEGER,
IPSVarAction => true,
IPSVarName => 'Activation delay time'
],
'alarmActivationDelayTime'=> [
'type' => 'number',
IPSProfile => 'BSH.IntrusionDetectionControl.DelayTime',
IPSVarType => VARIABLETYPE_INTEGER,
IPSVarAction => true,
IPSVarName => 'Alarm delay time'
]
];
}
/**
* ThermostatSupportedControlMode
*
Expand Down Expand Up @@ -1653,6 +1683,51 @@ protected function RegisterProfiles()
['UPDATE_AVAILABLE', $this->TranslateProfile('update available'), '', -1],
]
);
$this->RegisterProfileStringEx(
\BoschSHC\Services\SurveillanceAlarm::getIPSProfile('value'),
'',
'',
'',
[
['ALARM_ON', $this->TranslateProfile('on'), '', 0xff0000],
['ALARM_OFF', $this->TranslateProfile('off'), '', 0x00ff00],
['ALARM_MUTED', $this->TranslateProfile('muted'), '', 0x0000ff],
['PRE_ALARM', $this->TranslateProfile('Pre-alarm'), '', 0x900000],
['UNKNOWN', $this->TranslateProfile('unknown'), '', -1],
]
);
$this->RegisterProfileStringEx(
\BoschSHC\Services\IntrusionDetectionControl::getIPSProfile('value'),
'',
'',
'',
[
['SYSTEM_ARMING', $this->TranslateProfile('is arming'), '', 0x900000],
['SYSTEM_ARMED', $this->TranslateProfile('armed'), '', 0xff0000],
['SYSTEM_DISARMED', $this->TranslateProfile('disarmed'), '', 0x00ff00],
['MUTE_ALARM', $this->TranslateProfile('muted'), '', 0x0000ff]
]
);
$this->RegisterProfileIntegerEx(
\BoschSHC\Services\IntrusionDetectionControl::getIPSProfile('activeProfile'),
'',
'',
'',
[
[0, $this->TranslateProfile('full protection'), '', -1],
[1, $this->TranslateProfile('partial protection'), '', -1],
[2, $this->TranslateProfile('customized protection'), '', -1]
]
);
$this->RegisterProfileInteger(
\BoschSHC\Services\IntrusionDetectionControl::getIPSProfile('DelayTime'),
'Clock',
'',
$this->TranslateProfile(' seconds'),
0,
600,
1
);
}
protected function UnregisterProfiles()
{
Expand Down Expand Up @@ -1689,6 +1764,10 @@ protected function UnregisterProfiles()
$this->UnregisterProfile(\BoschSHC\Services\TemperatureOffset::getIPSProfile('offset'));
$this->UnregisterProfile(\BoschSHC\Services\TerminalConfiguration::getIPSProfile('type'));
$this->UnregisterProfile(\BoschSHC\Services\SoftwareUpdate::getIPSProfile('swUpdateState'));
$this->UnregisterProfile(\BoschSHC\Services\SurveillanceAlarm::getIPSProfile('value'));
$this->UnregisterProfile(\BoschSHC\Services\IntrusionDetectionControl::getIPSProfile('value'));
$this->UnregisterProfile(\BoschSHC\Services\IntrusionDetectionControl::getIPSProfile('activeProfile'));
$this->UnregisterProfile(\BoschSHC\Services\IntrusionDetectionControl::getIPSProfile('DelayTime'));
}
}
}
6 changes: 5 additions & 1 deletion libs/locale_profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@
"not connected": "nicht verbunden",
"no update available": "Kein Update verfügbar",
"update in progress": "Update wird durchgeführt",
"update available": "Update Verfügbar"
"update available": "Update Verfügbar",
"Pre-alarm": "Voralarm",
"disarmed": "Unscharf",
"armed": "Scharf",
"is arming": "wird scharf"
}
}
}

0 comments on commit da7010c

Please sign in to comment.