Skip to content

Commit

Permalink
Major Release v4.0.2023120
Browse files Browse the repository at this point in the history
  • Loading branch information
Wilkware committed Nov 20, 2023
1 parent 307877a commit 2b9538e
Show file tree
Hide file tree
Showing 30 changed files with 2,238 additions and 68 deletions.
2 changes: 1 addition & 1 deletion .style
Submodule .style updated 4 files
+3 −5 .php-cs-fixer.php
+13 −13 .php-json-fixer.php
+0 −183 .php_cs
+1 −10 README.md
16 changes: 11 additions & 5 deletions AbfallNavi/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# AbfallNavi

[![Version](https://img.shields.io/badge/Symcon-PHP--Modul-red.svg)](https://www.symcon.de/service/dokumentation/entwicklerbereich/sdk-tools/sdk-php/)
[![Product](https://img.shields.io/badge/Symcon%20Version-6.0-blue.svg)](https://www.symcon.de/produkt/)
[![Version](https://img.shields.io/badge/Modul%20Version-1.0.20221020-orange.svg)](https://github.com/Wilkware/IPSymconAwido)
[![Product](https://img.shields.io/badge/Symcon%20Version-6.4-blue.svg)](https://www.symcon.de/produkt/)
[![Version](https://img.shields.io/badge/Modul%20Version-2.0.20231119-orange.svg)](https://github.com/Wilkware/WasteManagement)
[![License](https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-green.svg)](https://creativecommons.org/licenses/by-nc-sa/4.0/)
[![Actions](https://github.com/Wilkware/IPSymconAwido/workflows/Check%20Style/badge.svg)](https://github.com/Wilkware/IPSymconAwido/actions)
[![Actions](https://github.com/Wilkware/WasteManagement/workflows/Check%20Style/badge.svg)](https://github.com/Wilkware/WasteManagement/actions)

IP-Symcon Modul für die Visualisierung von Entsorgungsterminen.

Expand All @@ -27,13 +27,13 @@ Derzeit unterstützt das Modul rund 20 verschiedene Regionen. Wenn jemand noch w

### 2. Voraussetzungen

* IP-Symcon ab Version 6.0
* IP-Symcon ab Version 6.4

### 3. Installation

* Über den Modul Store das Modul Abfallwirtschaft (ehem. Awido) installieren.
* Alternativ Über das Modul-Control folgende URL hinzufügen.
`https://github.com/Wilkware/IPSymconAwido` oder `git://github.com/Wilkware/IPSymconAwido.git`
`https://github.com/Wilkware/WasteManagement` oder `git://github.com/Wilkware/WasteManagement.git`

### 4. Einrichten der Instanzen in IP-Symcon

Expand Down Expand Up @@ -108,6 +108,12 @@ __Beispiel__: `REGIO_Update(12345);`

### 8. Versionshistorie

v2.0.20231119

* _NEU_: Kompatibilität auf IPS 6.4 hoch gesetzt
* _NEU_: Support für v7 Visualisierung
* _FIX_: Sortierreihenfolge der Daten korriegiert

v1.0.20221020

* _NEU_: Initialversion
Expand Down
21 changes: 21 additions & 0 deletions AbfallNavi/form.json
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,27 @@
"name": "settingsVariables",
"caption": "Create variables for non-selected disposals?"
},
{
"type": "CheckBox",
"name": "settingsTileVisu",
"caption": "Activate support for Tile Visu?"
},
{
"type": "Select",
"name": "settingsTileSkin",
"caption": "Theme to be used (design):",
"width": "450px",
"options": [
{
"label": "Light Skin",
"value": "light"
},
{
"label": "Dark Skin",
"value": "dark"
}
]
},
{
"type": "SelectScript",
"name": "settingsScript",
Expand Down
21 changes: 21 additions & 0 deletions AbfallNavi/locale.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,27 @@
"... call the following scipt after update the dates:": "... nach Aktualisierung der Werte folgendes Script aufrufen:",
"Subsequent execution of a script:": "Anschließendes Ausführen eines Skriptes:",
"Script:": "Script:",
"Activate support for Tile Visu?": "Unterstützung für Tile Visu aktivieren?",
"Theme to be used (design):": "Zu verwendendes Theme (Design):",
"Dark": "Dunkel",
"Light": "Hell",
"Waste": "Abfall",
"Pickup": "Abholung",
"Removal": "Abfuhr",
"Date": "Termin",
"Today": "Heute",
"Tomorrow": "Morgen",
"days": "Tage",
"day": "Tag",
"Next pickup:": "Nächste Abholung:",
"on": "am",
"Monday": "Montag",
"Tuesday": "Dienstag",
"Wednesday": "Mittwoch",
"Thursday": "Donnerstag",
"Friday": "Freitag",
"Saturday": "Samstag",
"Sunday": "Sonntag",
"Disposal data ...": "Entsorgungsdaten ...",
"Update": "Aktualisieren",
"Creating instance.": "Die Instanz wird erstellt.",
Expand Down
33 changes: 24 additions & 9 deletions AbfallNavi/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class AbfallNavi extends IPSModule
use DebugHelper;
use ServiceHelper;
use VariableHelper;
use VisualisationHelper;

// Service Provider
private const SERVICE_PROVIDER = 'regio';
Expand Down Expand Up @@ -76,6 +77,8 @@ public function Create()
$this->RegisterPropertyBoolean('settingsActivate', true);
$this->RegisterPropertyBoolean('settingsVariables', false);
$this->RegisterPropertyInteger('settingsScript', 0);
$this->RegisterPropertyBoolean('settingsTileVisu', false);
$this->RegisterPropertyString('settingsTileSkin', 'dark');
// Attributes for dynamic configuration forms (> v3.0)
$this->RegisterAttributeString('io', serialize($this->PrepareIO()));
// Register daily update timer
Expand Down Expand Up @@ -268,9 +271,12 @@ public function ApplyChanges()
$sId = $this->ReadPropertyString('streetID');
$aId = $this->ReadPropertyString('addonID');
$activate = $this->ReadPropertyBoolean('settingsActivate');
$tilevisu = $this->ReadPropertyBoolean('settingsTileVisu');
$this->SendDebug(__FUNCTION__, 'clientID=' . $cId . ', placeId=' . $pId . ', streetId=' . $sId . ', addonId=' . $aId);
// Safty default
$this->SetTimerInterval('UpdateTimer', 0);
// Support for Tile Viso (v7.x)
$this->MaintainVariable('Widget', $this->Translate('Pickup'), vtString, '~HTMLBox', 0, $tilevisu);
// Set status
$io = unserialize($this->ReadAttributeString('io'));
$this->SendDebug(__FUNCTION__, $io);
Expand Down Expand Up @@ -335,12 +341,12 @@ public function Update()
return;
}
// fractions convert to name => ident
$vars = [];
$waste = [];
foreach ($io[self::IO_NAMES] as $ident => $name) {
$this->SendDebug(__FUNCTION__, 'Fraction ident: ' . $ident . ', Name: ' . $name);
$vars[$ident] = '';
$waste[$ident] = ['ident' => $ident, 'date' => ''];
}
$this->SendDebug(__FUNCTION__, $vars);
$this->SendDebug(__FUNCTION__, $waste);
// Build timestamp
$today = mktime(0, 0, 0);
// Iterate dates
Expand All @@ -350,19 +356,27 @@ public function Update()
continue;
}
// find out disposal type
foreach ($vars as $key => $time) {
foreach ($waste as $key => $time) {
if ($key == $day['id']) {
if ($time == '') {
$vars[$key] = date('d.m.Y', strtotime($day['date']));
if ($time['date'] == '') {
$waste[$key]['date'] = date('d.m.Y', strtotime($day['date']));
}
break;
}
}
}
$this->SendDebug(__FUNCTION__, $vars);
$this->SendDebug(__FUNCTION__, $waste);
// write data to variable
foreach ($vars as $key => $time) {
$this->SetValueString((string) $key, $time);
foreach ($waste as $key => $var) {
$this->SetValueString((string) $var['ident'], $var['date']);
}

// build tile widget
$btw = $this->ReadPropertyBoolean('settingsTileVisu');
$skin = $this->ReadPropertyString('settingsTileSkin');
$this->SendDebug(__FUNCTION__, 'TileVisu: ' . $btw . '(' . $skin . ')');
if ($btw == true) {
$this->BuildWidget($waste, $skin);
}

// execute Script
Expand Down Expand Up @@ -861,6 +875,7 @@ protected function ExecuteAction(&$io)
foreach ($json as $date) {
$data[] = ['id' => $date['bezirk']['fraktionId'], 'date' => $date['datum']];
}
$data = $this->OrderData($data, 'date');
$io[self::IO_ACTION] = self::ACTION_DATES;
}
break;
Expand Down
17 changes: 12 additions & 5 deletions Abfall_IO/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Abfall.IO

[![Version](https://img.shields.io/badge/Symcon-PHP--Modul-red.svg)](https://www.symcon.de/service/dokumentation/entwicklerbereich/sdk-tools/sdk-php/)
[![Product](https://img.shields.io/badge/Symcon%20Version-6.0-blue.svg)](https://www.symcon.de/produkt/)
[![Version](https://img.shields.io/badge/Modul%20Version-1.5.20221020-orange.svg)](https://github.com/Wilkware/IPSymconAwido)
[![Product](https://img.shields.io/badge/Symcon%20Version-6.4-blue.svg)](https://www.symcon.de/produkt/)
[![Version](https://img.shields.io/badge/Modul%20Version-2.0.2023119-orange.svg)](https://github.com/Wilkware/WasteManagement)
[![License](https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-green.svg)](https://creativecommons.org/licenses/by-nc-sa/4.0/)
[![Actions](https://github.com/Wilkware/IPSymconAwido/workflows/Check%20Style/badge.svg)](https://github.com/Wilkware/IPSymconAwido/actions)
[![Actions](https://github.com/Wilkware/WasteManagement/workflows/Check%20Style/badge.svg)](https://github.com/Wilkware/WasteManagement/actions)

IP-Symcon Modul für die Visualisierung von Entsorgungsterminen.

Expand All @@ -27,13 +27,13 @@ Derzeit unterstützt das Modul über 60 verschiedene Landkreise und Großstädte

### 2. Voraussetzungen

* IP-Symcon ab Version 6.0
* IP-Symcon ab Version 6.4

### 3. Installation

* Über den Modul Store das Modul Abfallwirtschaft (ehem. Awido) installieren.
* Alternativ Über das Modul-Control folgende URL hinzufügen.
`https://github.com/Wilkware/IPSymconAwido` oder `git://github.com/Wilkware/IPSymconAwido.git`
`https://github.com/Wilkware/WasteManagement` oder `git://github.com/Wilkware/WasteManagement.git`

### 4. Einrichten der Instanzen in IP-Symcon

Expand Down Expand Up @@ -118,6 +118,13 @@ __Beispiel__: `ABPIO_FixWasteName(12345, 'Hausmüll', 'Hausmüll (2 wöchentlich

### 8. Versionshistorie

v2.0.20231119

* _NEU_: Kompatibilität auf IPS 6.4 hoch gesetzt
* _NEU_: Support für v7 Visualisierung
* _FIX_: Übersetzungsfehler korrigiert
* _FIX_: PHP Syle Check korrigiert

v1.5.20221020

* _FIX_: Code bereinigt (ungenutzte Funktionen entfernt)
Expand Down
23 changes: 22 additions & 1 deletion Abfall_IO/form.json
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,27 @@
"name": "settingsVariables",
"caption": "Create variables for non-selected disposals?"
},
{
"type": "CheckBox",
"name": "settingsTileVisu",
"caption": "Activate support for Tile Visu?"
},
{
"type": "Select",
"name": "settingsTileSkin",
"caption": "Theme to be used (design):",
"width": "450px",
"options": [
{
"label": "Light Skin",
"value": "light"
},
{
"label": "Dark Skin",
"value": "dark"
}
]
},
{
"type": "CheckBox",
"name": "settingsStartsWith",
Expand All @@ -309,7 +330,7 @@
{
"type": "Select",
"name": "settingsFormat",
"caption": "Format, in welchem die Daten abgeholt werden:",
"caption": "Format in which the data is collected:",
"width": "450px",
"options": [
{
Expand Down
21 changes: 21 additions & 0 deletions Abfall_IO/locale.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,27 @@
"Comma Separated Values file (CSV)": "Trennzeichengetrennte Datei (CSV)",
"Subsequent execution of a script:": "Anschließendes Ausführen eines Skriptes:",
"Script:": "Script:",
"Activate support for Tile Visu?": "Unterstützung für Tile Visu aktivieren?",
"Theme to be used (design):": "Zu verwendendes Theme (Design):",
"Dark": "Dunkel",
"Light": "Hell",
"Waste": "Abfall",
"Pickup": "Abholung",
"Removal": "Abfuhr",
"Date": "Termin",
"Today": "Heute",
"Tomorrow": "Morgen",
"days": "Tage",
"day": "Tag",
"Next pickup:": "Nächste Abholung:",
"on": "am",
"Monday": "Montag",
"Tuesday": "Dienstag",
"Wednesday": "Mittwoch",
"Thursday": "Donnerstag",
"Friday": "Freitag",
"Saturday": "Samstag",
"Sunday": "Sonntag",
"Disposal data ...": "Entsorgungsdaten ...",
"Update": "Aktualisieren",
"Creating instance.": "Die Instanz wird erstellt.",
Expand Down
Loading

0 comments on commit 2b9538e

Please sign in to comment.