forked from klein0r/ioBroker.lametric
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
379 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
 | ||
|
||
# ioBroker.lametric | ||
|
||
## Anforderungen | ||
|
||
- *LaMetric Time* mit Firmware *2.2.2* (oder neuer) | ||
|
||
## Configuration | ||
|
||
Du bekommst deinen Geräte-Schlüssel (API-Key) [hier](https://developer.lametric.com/user/devices). | ||
|
||
 | ||
|
||
## Features | ||
|
||
- Verändern der Display-Helligkeit (prozentual, Automatik/Manueller Modus) | ||
- Verändern der Lautstärke (prozentual) | ||
- Konfiguration des Bildschirmschoners (aktivieren/deaktivieren, Zeitbasiert, wenn dunkel) | ||
- Bluetooth aktivieren/deaktivieren, Bluetooth Name verändern | ||
- Zwischen Apps wechseln (nächste, vorige, gehe zu spezifischer App) | ||
- Versenden von Notifications (mit konfigurierbarer Priorität, Sound, Icons, Text, ...) | ||
- Kontrolle von speziellen Apps wie ``clock``, ``radio``, ``stopwatch`` oder ``weather`` | ||
- Nutzung der *My Data (DIY)* LaMetric App um regelmäßig Informationen darzustellen | ||
|
||
Alle Funktionen sind nur durch die [offizielle API](https://lametric-documentation.readthedocs.io/en/latest/reference-docs/lametric-time-reference.html) limitiert. | ||
|
||
## Blockly Beispiele | ||
|
||
Senden eines einfachen Textes, welcher als einzelner Frame angezeigt wird | ||
|
||
 | ||
|
||
Um mehrere Frames darzustellen, kann eine Liste von Texten übergeben werden | ||
|
||
 | ||
|
||
Um Graphen darzustellen, muss ein Array aus Zahlen als Liste in einem Frame übergeben werden. | ||
|
||
 | ||
|
||
## My Data (DIY) *(version > 1.1.0)* | ||
|
||
*LaMetric* bietet (über den integrierten App-Store) eine zusätzliche App an, um eigene Informationen darzustellen. Diese App heißt [My Data DIY](https://apps.lametric.com/apps/my_data__diy_/8942). Dieser Adapter erstellt einen Datenpunkt im erforderlichen Format. | ||
Du kannst den Simple API Adapter nutzen, um Daten zur LaMetric Time zu übertragen. | ||
|
||
```ioBroker LaMetric Adapter -> State with Frame information <- Simple API Adapter <- My Data DIY App <- LaMetric``` | ||
|
||
### Konfiguration (mit Authentisierung) | ||
|
||
1. Installiere den [Simple API ioBroker Adapter](https://github.com/ioBroker/ioBroker.simple-api) | ||
2. Erstelle einen neuen ioBroker-Nutzer mit dem Namen ``lametric`` und einem eigenen Passwort (z.B. ``HhX7dZl3Fe``) | ||
3. Füge den neuen ``lametric``-Nutzer zur Gruppe ``users`` hinzu | ||
4. Installiere die App *My Data DIY* über den App-Store auf deiner *LaMetric Time* | ||
5. Öffne die Einstellungen der *My Data (DIY)* App und konfiguriere die URL des Simple API Adapters (siehe unten) | ||
6. Gehe in die Adaptereinstellungen und füge neue Frames mit deinen eigenen Informationen hinzu (siehe nächster Abschnitt) | ||
|
||
``` | ||
http://172.16.0.219:8087/getPlainValue/lametric.0.mydatadiy.obj/?json&user=lametric&pass=HhX7dZl3Fe | ||
``` | ||
|
||
**Wichtig: Nutze das json-Flag des SimpleAPI Adapters (verfügbar seit Version 2.6.2)** | ||
|
||
**Stelle sicher, dass die IP, der Port, Benutzername und Passwort in der URL korrekt sind!** | ||
|
||
### Konfiguration (ohne Authentisierung) | ||
|
||
1. Installiere den [Simple API ioBroker Adapter](https://github.com/ioBroker/ioBroker.simple-api) | ||
2. Installiere die App *My Data DIY* über den App-Store auf deiner *LaMetric Time* | ||
3. Öffne die Einstellungen der *My Data (DIY)* App und konfiguriere die URL des Simple API Adapters (siehe unten) | ||
4. Gehe in die Adaptereinstellungen und füge neue Frames mit deinen eigenen Informationen hinzu (siehe nächster Abschnitt) | ||
|
||
``` | ||
http://172.16.0.219:8087/getPlainValue/lametric.0.mydatadiy.obj/?json | ||
``` | ||
|
||
**Stelle sicher, dass die IP und der Port in der URL korrekt sind!** | ||
|
||
### Frame Konfiguration *(Version > 1.1.0)* | ||
|
||
- Füge mit dem Plus-Button so viele Frames hinzu, wie Du möchtest | ||
- Symbol: Wähle ein Symbol von der [offiziellen Webseite](https://developer.lametric.com/icons) und füge die ID in das Feld ein. **Wichtig: Nutze ein i (für statische Sybole) oder ein a (für animierte Symbole) als Präfix der ID (Beispiel: `i3389`)** | ||
- Text: Tippe einen beliebigen anzuzeigenden Text ein. Du kannst Informatioenn aus Datenpunkten abfragem, indem Du deren ID in geschweifte Klammern angibst. An dieser Stelle wird dann der aktuelle Wert der Datenpunkte eingesetzt. (Beispiel: `{youtube.0.channels.HausAutomatisierungCom.statistics.subscriberCount} Subscribers`) | ||
|
||
Beispielkonfiguration von 3 Frames: | ||
|
||
 | ||
|
||
## Spezielle Apps / Widgets *(Version > 1.1.2)* | ||
|
||
Einige Apps lassen sich mit Zusatzinformationen versehen oder steuern. | ||
|
||
### clock.clockface | ||
|
||
Gültige Werte sind | ||
|
||
- `weather`, `page_a_day`, `custom` oder `none` | ||
- Eigene Icons im Format `data:image/png;base64,<base64 encoded png binary>` oder `data:image/gif;base64,<base64 encoded gif binary>` | ||
|
||
Beispiel: `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAOklEQVQYlWNUVFBgwAeYcEncv//gP04FMEmsCmCSiooKjHAFMEF0SRQTsEnCFcAE0SUZGBgYGAl5EwA+6RhuHb9bggAAAABJRU5ErkJggg==` | ||
|
||
### countdown.configure | ||
|
||
Erlaubte Werte: Zeit in Sekunden | ||
|
||
## Scripts | ||
|
||
Um Nachrichten/Notifications auf Deiner *LaMetric Time* anzuzeigen, sende eine Nachricht mit dem JavaScript Adapter (oder einem anderen Adapter) an die entsprechende Instanz: | ||
|
||
```JavaScript | ||
sendTo( | ||
"lametric.0", | ||
"notification", | ||
{ | ||
priority: "[info|warning|critical]", | ||
iconType: "[none|info|alert]", | ||
sound: "<string from sound list>", | ||
lifeTime: <milliseconds>, | ||
icon: "<icon>", | ||
text: "<string|array>", | ||
cycles: <integer> | ||
} | ||
); | ||
``` | ||
|
||
Beispiel einzelner Frame: | ||
|
||
```JavaScript | ||
sendTo( | ||
"lametric.0", | ||
"notification", | ||
{ | ||
priority: "info", | ||
iconType: "none", | ||
sound: "cat", | ||
lifeTime: 5000, | ||
icon: "i31820", | ||
text: "test", | ||
cycles: 1 | ||
} | ||
); | ||
``` | ||
|
||
Beispiel mehrere Frames: | ||
|
||
```JavaScript | ||
sendTo( | ||
"lametric.0", | ||
"notification", | ||
{ | ||
priority: "info", | ||
iconType: "none", | ||
sound: "cat", | ||
lifeTime: 5000, | ||
icon: "i31820", | ||
text: ["frame 1", "frame 2", "frame 3"], | ||
cycles: 1 | ||
} | ||
); | ||
``` | ||
|
||
Beispiel zyklische Informationen: | ||
|
||
```JavaScript | ||
let i = 0; | ||
function show() { | ||
console.log('Show ' + i); | ||
sendTo( | ||
"lametric.0", | ||
"notification", | ||
{ | ||
priority: "info", | ||
iconType: "info", | ||
lifeTime: 5000, | ||
icon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjEuNWRHWFIAAAAySURBVBhXY4AAYdcKk1lngCSUDwHIfAQbzgLqgDCgIqRLwFkQCYQoBAD5EATl4wQMDADhuxQzaDgX0gAAAABJRU5ErkJggg==", | ||
text: "Hi " + i, | ||
cycles: 1 | ||
} | ||
); | ||
i++; | ||
} | ||
setInterval(show, 10000); | ||
show(); | ||
``` |
Oops, something went wrong.