Ankündigung

Einklappen
Keine Ankündigung bisher.

Indego Connect

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • schuma
    antwortet
    Hallo, ich versuche mich gerade damit, diese Plugin bei mir zu integrieren....
    Nur habe ich einen Indego 350/400 Modell 2018

    Es scheint da noch ein paar Unterschiede zu geben. Gerade im Bereich der Warnungen.

    Hat das hier schon mal jemand für die aktuelle Generation umgesetzt?

    Die html Datei ändere ich gerade auf die def. SV2.9. Mit den neuen Widgets
    Die conf habe ich schon mal in YAML geändert...
    Die Anmeldung klappt und die Karte wird auch geholt.
    Aber es hakt noch andiversen Ecken.

    Evtl. hat sich ja schon mal jemand damit beschäftigt und würde das geänderte Plugin hier einmal reinstellen

    Einen Kommentar schreiben:


  • Marcov
    antwortet
    Sorry, gerade erst dazu gekommen. Im Anhang die beiden Dateien.
    Angehängte Dateien

    Einen Kommentar schreiben:


  • mhoeftx
    antwortet
    Vielen Dank für's teilen und die großartige Arbeit!!

    Könntest du ggf. noch die large_symbols.html und die widget_basic_input.html anhängen?

    Besten Dank und Gruß,

    Mark

    Einen Kommentar schreiben:


  • Marcov
    antwortet
    Hi, sorry das weiß ich nicht mehr. Ich glaube es gab letztendlich nur eine Umstellung der Variablen, da ich dann eh noch mal ran musste habe ich alles über json.decode gemacht (vorher habe die Ausgabe vom Server sozusagen von Hand zerpflückt).
    Ich schicke Dir eine PN mit dem Code der alten init.py.
    Das Gewitterbild habe ich heute auch hinzugefügt...
    Zuletzt geändert von Marcov; 24.08.2017, 22:27.

    Einen Kommentar schreiben:


  • pocki
    antwortet
    Zitat von Marcov Beitrag anzeigen
    Post #7 und #8 sind aktualisiert
    Kannst du bitte kurz beschreiben, welche Änderungen in der Bosch-API du gefunden und nachgebessert hast?
    Ich kann keinen Vorher/Nachher-Vergleich der Postings machen.

    Das Gewitterbild hab ich gefunden, danke.

    Einen Kommentar schreiben:


  • Marcov
    antwortet
    Post #7 und #8 sind aktualisiert

    Einen Kommentar schreiben:


  • Marcov
    antwortet
    Hi, ich stelle es heute noch ein. Ich teste gerade noch eine Anpassung...

    Einen Kommentar schreiben:


  • pocki
    antwortet
    Zitat von Marcov Beitrag anzeigen
    meine Lösung ist für smarthome.py in Kombination mit smartvisu. Setzt Du dies ein? Ich habe noch eine neuere Version, da Bosch die Schnittstelle etwas angepasst hat. Da die Nachfrage hier recht gering war, habe ich diese aber nicht aktualisiert.
    Ok, sehe schon. Ich nutze derzeit über shell-skripts die commands der Schnittstelle, da ich smarthome.py noch nicht implementiert habe. Funktioniert auch ganz gut.

    Bitte poste doch die Anpassungen der Bosch-Schnittstelle, die du erarbeitet hast!
    Plus: das Bild cloud_10.png fehlt oben...

    Ich teste gerade, ob der Indego 350 Connect doich smartmow kann, ob wohl es Bosch nicht anbietet (oder nicht freigeschaltet hat).

    Einen Kommentar schreiben:


  • schuma
    antwortet
    Hallo Marcov. An der neuen Lösung mit dem geänderten Protokoll wäre ich auch interressiert.
    Bei mir steht nämlich demnächst so ein Kauf an....

    Grüße, Marc

    Einen Kommentar schreiben:


  • Marcov
    antwortet
    Hallo Pocki

    meine Lösung ist für smarthome.py in Kombination mit smartvisu. Setzt Du dies ein? Ich habe noch eine neuere Version, da Bosch die Schnittstelle etwas angepasst hat. Da die Nachfrage hier recht gering war, habe ich diese aber nicht aktualisiert.

    Einen Kommentar schreiben:


  • pocki
    antwortet
    Hallo - sehr cool!

    Ich möchte mir dieses WebTool auf meinem eigenen Raspberry installieren. Was brauch ich dafür denn alles genau? Die Codes in den vorigen Postings scheinen mir nicht ganz komplett zu sein, oder? PHP-Code in einem indego.html?

    Könntest du ein "mini-standalone" Filepaket machen oder aufzählen, was man auf einem "nackerten" RPI machen muss? PHP und Python hat der ja schon, und das Tool zazaz-de/iot-device-bosch-indego-controller habe ich ebenfalls schon erfolgreich am Laufen. Bleibt also nur noch das WebTool korrekt "anzulegen"...

    LG, Pocki

    Einen Kommentar schreiben:


  • Marcov
    antwortet

    so sieht es dann am Ende in der Visu aus:


    1.JPG


    2.JPG
    3.JPG




    Was es kann:
    Statusinformationen des Mähers abrufen:
    - Mähzeit gesamt
    - Ladezeit gesamt
    - Mähzeit aktuelle Sitzung
    - Ladezeit aktuelle Sitzung
    - Mähmodus abrufen (ich weiß nicht was das ist, ist immer "0")
    - Umschalten zwischen Smart und Kalendermodus
    - Mähfrequenz einstellen (-100 bis 100, 0 ist standard)

    Daten des Mähers anzeigen:
    - Usernamen
    - modus (smart oder Kalender)
    - Firmware
    - Updatedatum
    - Seriennummer
    - Typennummer

    Befehle an den Mäher senden:
    - Starte
    - Pause
    - zurück in die Station

    - Alarme abrufen (abgerufene Alarme werden gelöscht, ein neuer Alarm überschreibt den alten)
    - die Karte abrufen (eine neue Karte überschreibt die Alte)
    - vorhergesagte Mähzeit anzeigen
    - Wetterdaten abrufen (die Vorhersage erscheint mir genauer als z.B. wetter.com)


    Es sind noch nicht alle Funktionen integriert, was man noch machen könnte:

    2. Mähzeiten für Smart und Kalendermodus einstellen
    3. Koordinaten des Standortes eingeben

    Das muss aber meiner Meinung nach nur einmal machen, deshalb wollte ich da nicht einen halben Tag dran rumfummeln.
    Das ist mein erstes Plugin, ich habe die verschiedenen Funktionen Stück für Stück gemacht und bin erst später darauf gekommen es mit python json zu zerpflücken, da es aber auch so läuft, wollte ich es nicht noch mal überarbeiten.
    Sporadisch erhalte ich falsche Zeiten bei den Fehlermeldungen und der Karte, ich aber die Vermutung, dass es am Indego Server liegt.

    Ich freue mich über Verbesserungsvorschläge / Erweiterungen. Ich habe die Befehle etc. hierhier:

    https://github.com/zazaz-de/iot-devi...er/PROTOCOL.md

    bzw. hierher:

    http://grauonline.de/alexwww/indego/indego.html
    Angehängte Dateien
    Zuletzt geändert von Marcov; 24.08.2017, 15:30.

    Einen Kommentar schreiben:


  • Marcov
    antwortet
    indego html
    hier muss ggf. der Pfad zum Gartenbild angepasst werden (entsprechend den Einträgen in der Plugin.conf):
    {{ multimedia.image('image3', 'tmp/garden.svg', 'corner','20s') }}
    PHP-Code:
    /**
    * -----------------------------------------------------------------------------
    * @package smartVISU
    * @author Martin Gleiß
    * @copyright 2012
    * @license GPL [http://www.gnu.de]
    * -----------------------------------------------------------------------------
    */


    {% extends "rooms.html" %}
    {% 
    import "large_symbol.html" as large %}
    {% 
    import "multimedia.html" as multimedia %}
    {% 
    import "widget_basic_input.html" as input %}
    {% 
    block content %}
    <
    div class="block" style="width:100%">
    <
    div class="set-2" data-role="collapsible-set" data-theme="c" data-content-theme="a" data-mini="true">
    <
    div data-role="collapsible" data-collapsed="false">
    <
    h3>Bild</h3>

    <
    div class="image">
    {{ 
    multimedia.image('image3''tmp/garden.svg''corner','20s') }} </br>

    </
    div>
    <
    div align="right" stylemargin-right:8pxUpdate: {{ basic.formula('MapDate''indego.mapSvgCacheDate''short') }} </div>
    <
    div align="right" stylemargin-right:8pxxpos: {{ basic.value('xPos_indego''indego.xPos') }} | ypos: {{ basic.value('yPos_indego''indego.yPos') }}</div>
    <
    div align="right" stylemargin-right:8pxsvg_xpos: {{ basic.value('svg_xPos_indego''indego.svg_xPos') }} | svg_ypos: {{ basic.value('svg_yPos_indego''indego.svg_yPos') }} </div>
    </
    div>
    </
    div>
    </
    div>




    <
    div class="block"style="width:100%">
    <
    div class="set-2" data-role="collapsible-set" data-theme="c" data-content-theme="a" data-mini="true">
    <
    div data-role="collapsible" data-collapsed="false">
    <
    h3>Indego</h3>
    {{ 
    large.symbol('state_offline''indego.online','','scene_robo_lawnmower_offline.s vg',0) }}
    {{ 
    large.symbol('state_docked', ['indego.docked','indego.online'],'','scene_robo_lawnmower_docked.svg','','and') }}
    {{ 
    large.symbol('state_moving', ['indego.moving','indego.online'],'','scene_robo_lawnmower_moving.svg','','and') }}
    {{ 
    large.symbol('state_pause', ['indego.pause','indego.online'],'','scene_robo_lawnmower_stopp.svg','','and') }}

    {{ 
    large.symbol('state_help''indego.help','','scene_robo_lawnmower_help.svg') }}

    <
    br />
    <
    center>
    <
    font size="104">
    {{ 
    basic.value('prozentwert_indego''indego.mowedPercent''%') }}</br>
    {{ 
    basic.value('status_indego''indego.state_str') }}

    </
    font>
    </
    center>
    <
    br />

    {{ 
    basic.switch('Indego_start''indego.MOW''scene_robo_lawnmower_start.svg''scene_robo_lawnmower_start.svg') }}

    {{ 
    basic.switch('Indego_pause''indego.PAUSE''scene_robo_lawnmower_stop.svg''scene_robo_lawnmower_stop.svg') }}

    {{ 
    basic.switch('Indego_return''indego.RETURN''scene_robo_lawnmower_dock.svg''scene_robo_lawnmower_dock.svg') }}
    <
    br />
    <
    table height="90%" width="95%" align="center">

    <
    tr>

    <
    td width="50%" align="right">
    smartmodus:
    </
    td>
    <
    td width="50%" align="left">
    {{ 
    basic.flip('indego_smarsdt''indego.SMART''an''aus')}}
    </
    td>
    </
    tr>
    <
    tr>
    <
    td width="50%" align="right">
    Frequenz
    </td>
    <
    td width="50%" align="left">
    {{ 
    input.numberinput('frequenz''indego.SMART.frequenz') }}
    </
    td>
    </
    tr>
    </
    table>



    </
    div>
    </
    div>
    </
    div>

    <
    div class="block" >
    <
    div class="set-2" data-role="collapsible-set" data-theme="c" data-content-theme="a" data-mini="true">
    <
    div data-role="collapsible" data-collapsed="false">
    <
    h3>Historie</h3>

    <
    table width="100%">
    <
    tbody>
    <
    tr>
    <
    td align="left" style="padding-left: 10px;">
    Gesamte Fahrzeit:
    </
    td>

    <
    td align="right">
    {{ 
    basic.float('Fahrzeit_gesamt''indego.runtimeTotalOperationMins.hours''h') }}
    </
    td>

    </
    tr>

    <
    td align="left" style="padding-left: 10px;">
    Gesamte Ladezeit:
    </
    td>

    <
    td align="right">
    {{ 
    basic.float('Ladezeit_gesamt''indego.runtimeTotalChargeMins.hours''h') }}
    </
    td>

    </
    tr>

    <
    tr>
    <
    td align="left" style="padding-left: 10px;">
    Fahrzeit heute:
    </
    td>
    <
    td align="right">
    {{ 
    basic.float('Fahrzeit_heute''indego.runtimeSessionOperationMins''m') }}
    </
    td>



    <
    tr>
    <
    td align="left" style="padding-left: 10px;">
    Ladezeit heute:
    </
    td>
    <
    td align="right">
    {{ 
    basic.float('Ladezeit_heute''indego.runtimeSessionChargeMins''m') }}
    </
    td>
    </
    tr>
    <
    tr>
    <
    td align="left" style="padding-left: 10px;">
    Letzte Bewegung:
    </
    td>
    <
    td align="right">
    {{ 
    basic.formula('mowedDate''indego.mowedDate''time') }}
    </
    td>
    </
    tr>

    <
    tr>
    <
    td align="left" style="padding-left: 10px;">
    Mähmodus:
    </
    td>
    <
    td align="right">
    {{ 
    basic.value('mowmode''indego.mowmode') }}
    </
    td>
    </
    tr>
    <
    tr>
    <
    td align="left" style="padding-left: 10px;">
    Nächste Fahrzeit (Smart):
    </
    td>
    <
    td align="right">
    {{ 
    basic.formula('next_time_smartmow''indego.next_time''short') }}
    </
    td>
    </
    tr>



    </
    tbody>
    </
    table>


    </
    div></div>
    </
    div>

    <
    div class="block" >
    <
    div class="set-2" data-role="collapsible-set" data-theme="c" data-content-theme="a" data-mini="true">
    <
    div data-role="collapsible" data-collapsed="false">
    <
    h3>Daten</h3>

    <
    table width="100%">
    <
    tbody>

    <
    tr>
    <
    td align="left" style="padding-left: 10px;">
    Benutzer:
    </
    td>
    <
    td align="right">
    {{ 
    basic.value('user''indego.alm_name''') }}
    </
    td>
    <
    tr>
    <
    td align="left" style="padding-left: 10px;">
    Modus:
    </
    td>
    <
    td align="right">
    {{ 
    basic.value('mode''indego.alm_mode') }}
    </
    td>
    </
    tr>
    <
    tr>
    <
    td align="left" style="padding-left: 10px;">
    Firmware Version:
    </
    td>

    <
    td align="right">
    {{ 
    basic.value('Firmware''indego.alm_firmware_version''') }}
    </
    td>

    </
    tr>

    <
    tr>
    <
    td align="left" style="padding-left: 10px;">
    letztes Update:
    </
    td>

    <
    td align="right">
    {{ 
    basic.formula('Firmware_changed''indego.alm_firmware_version.changed''short') }}
    </
    td>

    </
    tr>

    <
    tr>
    <
    td align="left" style="padding-left: 10px;">
    vorherige Firmware Version:
    </
    td>

    <
    td align="right">
    {{ 
    basic.value('Firmware_before''indego.alm_firmware_version.before''') }}
    </
    td>

    </
    tr>

    <
    td align="left" style="padding-left: 10px;">
    Seriennummer:
    </
    td>

    <
    td align="right">
    {{ 
    basic.value('Serial''indego.alm_sn''') }}
    </
    td>

    </
    tr>


    <
    tr>
    <
    td align="left" style="padding-left: 10px;">
    Service Counter:
    </
    td>
    <
    td align="right">
    {{ 
    basic.value('Service_Counter''indego.service_counter''') }}
    </
    td>
    </
    tr>
    <
    tr>
    <
    td align="left" style="padding-left: 10px;">
    Baretoolnumber:
    </
    td>
    <
    td align="right">
    {{ 
    basic.value('baretool''indego.bareToolnumber') }}
    </
    td>
    </
    tr>



    </
    tbody>
    </
    table>


    </
    div></div>
    </
    div>

    <
    div class="block" >
    <
    div class="set-2" data-role="collapsible-set" data-theme="c" data-content-theme="a" data-mini="true">
    <
    div data-role="collapsible" data-collapsed="false">

    <
    h3>
    {{ 
    basic.value('Fehlermeldung_headline''indego.alert_headline''') }}
    </
    h3>

    <
    div align="left" style "padding-left:10px; padding-right:10px; font-size:16px">
    {{ 
    basic.value('Fehlermeldung''indego.alert_message''') }}
    </
    div>

    <
    table width="100%">
    <
    tbody>

    <
    tr>
    <
    td align="left" style="padding-left: 9px;">
    Datum:
    </
    td>
    <
    td align="right">
    {{ 
    basic.formula('alert-datum''indego.alert_date''short') }}
    </
    td>
    </
    tr>
    </
    tbody>
    </
    table>


    </
    div>
    </
    div>
    </
    div>

    <
    div class="block">
    <
    div class="set-2" data-role="collapsible-set" data-theme="c" data-content-theme="a" data-mini="true">
    <
    div data-role="collapsible" data-collapsed="false">
    <
    h3>Vorhersage {{ basic.value('indego_weather_day_0_wochentag','inde go.weather.day_0.wochentag') }} Temperaturen Regenwahrscheinlichkeit</h3>


    <
    table height="90%" width="98%" align="center">
    <
    tr>
    <
    td width="50%" align="left">
    <
    font size="+1">
    Sonnenstunden: {{ basic.value('indego_weather_day_0_sun''indego.weather.day_0.sun''') }}
    </
    font>
    </
    td>
    <
    td width="50%" align="right">
    <
    font size="+1">
    {{ 
    basic.float('indego_weather_day_0_tn''indego.weather.day_0.tn''°') }} - {{ basic.float('indego_weather_day_0_tx''indego.weather.day_0.tx''°') }}
    </
    font>
    </
    td>
    </
    tr>
    </
    table>


    <
    table height="90%" width="98%" align="center">

    <
    tr>
    <
    td width="15%" align="left">
    Nachts:
    </
    td>
    <
    td width="15%" align="center">
    {{ 
    basic.symbol('spells_int_0''indego.weather.int_0.spells','','sun_5.png') }}
    {{ 
    basic.symbol('sonne_int_0''indego.weather.int_0.Sonne','','sun_1.png') }}
    {{ 
    basic.symbol('wolken_int_0''indego.weather.int_0.Wolken','','cloud_5.png') }}
    {{ 
    basic.symbol('regen_int_0''indego.weather.int_0.Regen','','cloud_8.png') }}
    {{ 
    basic.symbol('gewitter_int_0''indego.weather.int_0.Gewitter','','cloud_10.png') }}
    </
    td>
    <
    td width="30%" align="center">
    {{ 
    basic.float('indego_wetter_int_0_td''indego.weather.int_0.td''°') }} - {{ basic.float('indego_wetter_int_0_tt''indego.weather.int_0.tt''°') }}
    </
    td>
    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_0_rrr''indego.weather.int_0.rrr''l/m²') }}
    </
    td>
    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_0_prrr''indego.weather.int_0.prrr''%') }}
    </
    td>
    </
    td>
    </
    tr>



    </
    tr>

    <
    tr>
    <
    td width="15%" align="left">
    Morgens:
    </
    td>
    <
    td width="15%" align="center">
    {{ 
    basic.symbol('spells_int_1''indego.weather.int_1.spells','','sun_5.png') }}
    {{ 
    basic.symbol('sonne_int_1''indego.weather.int_1.Sonne','','sun_1.png') }}
    {{ 
    basic.symbol('wolken_int_1''indego.weather.int_1.Wolken','','cloud_5.png') }}
    {{ 
    basic.symbol('regen_int_1''indego.weather.int_1.Regen','','cloud_8.png') }}
    {{ 
    basic.symbol('gewitter_int_1''indego.weather.int_1.Gewitter','','cloud_10.png') }}
    </
    td>
    <
    td width="30%" align="center">
    {{ 
    basic.float('indego_wetter_int_1_td''indego.weather.int_1.td''°') }} - {{ basic.float('indego_wetter_int_1_tt''indego.weather.int_1.tt''°') }}
    </
    td>
    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_1_rrr''indego.weather.int_1.rrr''l/m²') }}
    </
    td>
    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_1_prrr''indego.weather.int_1.prrr''%') }}
    </
    td>
    </
    td>
    </
    tr>
    <
    tr>
    <
    td width="15%" align="left">
    Mittags:
    </
    td>
    <
    td width="15%" align="center">
    {{ 
    basic.symbol('spells_int_2''indego.weather.int_2.spells','','sun_5.png') }}
    {{ 
    basic.symbol('sonne_int_2''indego.weather.int_2.Sonne','','sun_1.png') }}
    {{ 
    basic.symbol('wolken_int_2''indego.weather.int_2.Wolken','','cloud_5.png') }}
    {{ 
    basic.symbol('regen_int_2''indego.weather.int_2.Regen','','cloud_8.png') }}
    {{ 
    basic.symbol('gewitter_int_2''indego.weather.int_2.Gewitter','','cloud_10.png') }}
    </
    td>
    <
    td width="30%" align="center">
    {{ 
    basic.float('indego_wetter_int_2_td''indego.weather.int_2.td''°') }} - {{ basic.float('indego_wetter_int_2_tt''indego.weather.int_2.tt''°') }}
    </
    td>
    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_2_rrr''indego.weather.int_2.rrr''l/m²') }}
    </
    td>
    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_2_prrr''indego.weather.int_2.prrr''%') }}
    </
    td>
    </
    td>
    </
    tr>
    <
    tr>
    <
    td width="15%" align="left">
    Abends:
    </
    td>
    <
    td width="15%" align="center">
    {{ 
    basic.symbol('spells_int_3''indego.weather.int_3.spells','','sun_5.png') }}
    {{ 
    basic.symbol('sonne_int_3''indego.weather.int_3.Sonne','','sun_1.png') }}
    {{ 
    basic.symbol('wolken_int_3''indego.weather.int_3.Wolken','','cloud_5.png') }}
    {{ 
    basic.symbol('regen_int_3''indego.weather.int_3.Regen','','cloud_8.png') }}
    {{ 
    basic.symbol('gewitter_int_3''indego.weather.int_3.Gewitter','','cloud_10.png') }}
    </
    td>
    <
    td width="30%" align="center">
    {{ 
    basic.float('indego_wetter_int_3_td''indego.weather.int_3.td''°') }} - {{ basic.float('indego_wetter_int_3_tt''indego.weather.int_3.tt''°') }}
    </
    td>
    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_3_rrr''indego.weather.int_3.rrr''l/m²') }}
    </
    td>

    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_3_prrr''indego.weather.int_3.prrr''%') }}
    </
    td>
    </
    td>
    </
    tr>



    </
    table>

    </
    div>
    </
    div>
    </
    div>


    <
    div class="block">
    <
    div class="set-2" data-role="collapsible-set" data-theme="c" data-content-theme="a" data-mini="true">
    <
    div data-role="collapsible" data-collapsed="false">
    <
    h3>Vorhersage {{ basic.value('indego_weather_day_1_wochentag','inde go.weather.day_1.wochentag') }} Temperaturen Regenwahrscheinlichkeit</h3>


    <
    table height="90%" width="98%" align="center">
    <
    tr>
    <
    td width="50%" align="left">
    <
    font size="+1">
    Sonnenstunden: {{ basic.value('indego_weather_day_1_sun''indego.weather.day_1.sun''') }}
    </
    font>
    </
    td>
    <
    td width="50%" align="right">
    <
    font size="+1">
    {{ 
    basic.float('indego_weather_day_1_tn''indego.weather.day_1.tn''°') }} - {{ basic.float('indego_weather_day_1_tx''indego.weather.day_1.tx''°') }}
    </
    font>
    </
    td>
    </
    tr>
    </
    table>


    <
    table height="90%" width="98%" align="center">

    <
    tr>
    <
    td width="15%" align="left">
    Nachts:
    </
    td>
    <
    td width="15%" align="center">
    {{ 
    basic.symbol('spells_int_4''indego.weather.int_4.spells','','sun_5.png') }}
    {{ 
    basic.symbol('sonne_int_4''indego.weather.int_4.Sonne','','sun_1.png') }}
    {{ 
    basic.symbol('wolken_int_4''indego.weather.int_4.Wolken','','cloud_5.png') }}
    {{ 
    basic.symbol('regen_int_4''indego.weather.int_4.Regen','','cloud_8.png') }}
    {{ 
    basic.symbol('gewitter_int_4''indego.weather.int_4.Gewitter','','cloud_10.png') }}
    </
    td>
    <
    td width="30%" align="center">
    {{ 
    basic.float('indego_wetter_int_4_td''indego.weather.int_4.td''°') }} - {{ basic.float('indego_wetter_int_4_tt''indego.weather.int_4.tt''°') }}
    </
    td>
    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_4_rrr''indego.weather.int_4.rrr''l/m²') }}
    </
    td>
    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_4_prrr''indego.weather.int_4.prrr''%') }}
    </
    td>
    </
    td>
    </
    tr>



    </
    tr>

    <
    tr>
    <
    td width="15%" align="left">
    Morgens:
    </
    td>
    <
    td width="15%" align="center">
    {{ 
    basic.symbol('spells_int_5''indego.weather.int_5.spells','','sun_5.png') }}
    {{ 
    basic.symbol('sonne_int_5''indego.weather.int_5.Sonne','','sun_1.png') }}
    {{ 
    basic.symbol('wolken_int_5''indego.weather.int_5.Wolken','','cloud_5.png') }}
    {{ 
    basic.symbol('regen_int_5''indego.weather.int_5.Regen','','cloud_8.png') }}
    {{ 
    basic.symbol('gewitter_int_5''indego.weather.int_5.Gewitter','','cloud_10.png') }}
    </
    td>
    <
    td width="30%" align="center">
    {{ 
    basic.float('indego_wetter_int_5_td''indego.weather.int_5.td''°') }} - {{ basic.float('indego_wetter_int_5_tt''indego.weather.int_5.tt''°') }}
    </
    td>
    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_5_rrr''indego.weather.int_5.rrr''l/m²') }}
    </
    td>
    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_5_prrr''indego.weather.int_5.prrr''%') }}
    </
    td>
    </
    td>
    </
    tr>
    <
    tr>
    <
    td width="15%" align="left">
    Mittags:
    </
    td>
    <
    td width="15%" align="center">
    {{ 
    basic.symbol('spells_int_6''indego.weather.int_6.spells','','sun_5.png') }}
    {{ 
    basic.symbol('sonne_int_6''indego.weather.int_6.Sonne','','sun_1.png') }}
    {{ 
    basic.symbol('wolken_int_6''indego.weather.int_6.Wolken','','cloud_5.png') }}
    {{ 
    basic.symbol('regen_int_6''indego.weather.int_6.Regen','','cloud_8.png') }}
    {{ 
    basic.symbol('gewitter_int_6''indego.weather.int_6.Gewitter','','cloud_10.png') }}
    </
    td>
    <
    td width="30%" align="center">
    {{ 
    basic.float('indego_wetter_int_6_td''indego.weather.int_6.td''°') }} - {{ basic.float('indego_wetter_int_6_tt''indego.weather.int_6.tt''°') }}
    </
    td>
    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_6_rrr''indego.weather.int_6.rrr''l/m²') }}
    </
    td>
    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_6_prrr''indego.weather.int_6.prrr''%') }}
    </
    td>
    </
    td>
    </
    tr>
    <
    tr>
    <
    td width="15%" align="left">
    Abends:
    </
    td>
    <
    td width="15%" align="center">
    {{ 
    basic.symbol('spells_int_7''indego.weather.int_7.spells','','sun_5.png') }}
    {{ 
    basic.symbol('sonne_int_7''indego.weather.int_7.Sonne','','sun_1.png') }}
    {{ 
    basic.symbol('wolken_int_7''indego.weather.int_7.Wolken','','cloud_5.png') }}
    {{ 
    basic.symbol('regen_int_7''indego.weather.int_7.Regen','','cloud_8.png') }}
    {{ 
    basic.symbol('gewitter_int_7''indego.weather.int_7.Gewitter','','cloud_10.png') }}
    </
    td>
    <
    td width="30%" align="center">
    {{ 
    basic.float('indego_wetter_int_7_td''indego.weather.int_7.td''°') }} - {{ basic.float('indego_wetter_int_7_tt''indego.weather.int_7.tt''°') }}
    </
    td>
    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_7_rrr''indego.weather.int_7.rrr''l/m²') }}
    </
    td>

    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_7_prrr''indego.weather.int_7.prrr''%') }}
    </
    td>
    </
    td>
    </
    tr>



    </
    table>

    </
    div>
    </
    div>
    </
    div>


    <
    div class="block">
    <
    div class="set-2" data-role="collapsible-set" data-theme="c" data-content-theme="a" data-mini="true">
    <
    div data-role="collapsible" data-collapsed="false">
    <
    h3>Vorhersage {{ basic.value('indego_weather_day_2_wochentag','inde go.weather.day_2.wochentag') }} Temperaturen Regenwahrscheinlichkeit</h3>


    <
    table height="90%" width="98%" align="center">
    <
    tr>
    <
    td width="50%" align="left">
    <
    font size="+1">
    Sonnenstunden: {{ basic.value('indego_weather_day_2_sun''indego.weather.day_2.sun''') }}
    </
    font>
    </
    td>
    <
    td width="50%" align="right">
    <
    font size="+1">
    {{ 
    basic.float('indego_weather_day_2_tn''indego.weather.day_2.tn''°') }} - {{ basic.float('indego_weather_day_2_tx''indego.weather.day_2.tx''°') }}
    </
    font>
    </
    td>
    </
    tr>
    </
    table>


    <
    table height="90%" width="98%" align="center">

    <
    tr>
    <
    td width="15%" align="left">
    Nachts:
    </
    td>
    <
    td width="15%" align="center">
    {{ 
    basic.symbol('spells_int_8''indego.weather.int_8.spells','','sun_5.png') }}
    {{ 
    basic.symbol('sonne_int_8''indego.weather.int_8.Sonne','','sun_1.png') }}
    {{ 
    basic.symbol('wolken_int_8''indego.weather.int_8.Wolken','','cloud_5.png') }}
    {{ 
    basic.symbol('regen_int_8''indego.weather.int_8.Regen','','cloud_8.png') }}
    {{ 
    basic.symbol('gewitter_int_8''indego.weather.int_8.Gewitter','','cloud_10.png') }}
    </
    td>
    <
    td width="30%" align="center">
    {{ 
    basic.float('indego_wetter_int_8_td''indego.weather.int_8.td''°') }} - {{ basic.float('indego_wetter_int_8_tt''indego.weather.int_8.tt''°') }}
    </
    td>
    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_8_rrr''indego.weather.int_8.rrr''l/m²') }}
    </
    td>
    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_8_prrr''indego.weather.int_8.prrr''%') }}
    </
    td>
    </
    td>
    </
    tr>



    </
    tr>

    <
    tr>
    <
    td width="15%" align="left">
    Morgens:
    </
    td>
    <
    td width="15%" align="center">
    {{ 
    basic.symbol('spells_int_9''indego.weather.int_9.spells','','sun_5.png') }}
    {{ 
    basic.symbol('sonne_int_9''indego.weather.int_9.Sonne','','sun_1.png') }}
    {{ 
    basic.symbol('wolken_int_9''indego.weather.int_9.Wolken','','cloud_5.png') }}
    {{ 
    basic.symbol('regen_int_9''indego.weather.int_9.Regen','','cloud_8.png') }}
    {{ 
    basic.symbol('gewitter_int_9''indego.weather.int_9.Gewitter','','cloud_10.png') }}
    </
    td>
    <
    td width="30%" align="center">
    {{ 
    basic.float('indego_wetter_int_9_td''indego.weather.int_9.td''°') }} - {{ basic.float('indego_wetter_int_9_tt''indego.weather.int_9.tt''°') }}
    </
    td>
    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_9_rrr''indego.weather.int_9.rrr''l/m²') }}
    </
    td>
    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_9_prrr''indego.weather.int_9.prrr''%') }}
    </
    td>
    </
    td>
    </
    tr>
    <
    tr>
    <
    td width="15%" align="left">
    Mittags:
    </
    td>
    <
    td width="15%" align="center">
    {{ 
    basic.symbol('spells_int_10''indego.weather.int_10.spells','','sun_5.png') }}
    {{ 
    basic.symbol('sonne_int_10''indego.weather.int_10.Sonne','','sun_1.png') }}
    {{ 
    basic.symbol('wolken_int_10''indego.weather.int_10.Wolken','','cloud_5.png') }}
    {{ 
    basic.symbol('regen_int_10''indego.weather.int_10.Regen','','cloud_8.png') }}
    {{ 
    basic.symbol('gewitter_int_10''indego.weather.int_10.Gewitter','','cloud_10.png' ) }}
    </
    td>
    <
    td width="30%" align="center">
    {{ 
    basic.float('indego_wetter_int_10_td''indego.weather.int_10.td''°') }} - {{ basic.float('indego_wetter_int_10_tt''indego.weather.int_10.tt''°') }}
    </
    td>
    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_10_rrr''indego.weather.int_10.rrr''l/m²') }}
    </
    td>
    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_10_prrr''indego.weather.int_10.prrr''%') }}
    </
    td>
    </
    td>
    </
    tr>
    <
    tr>
    <
    td width="15%" align="left">
    Abends:
    </
    td>
    <
    td width="15%" align="center">
    {{ 
    basic.symbol('spells_int_11''indego.weather.int_11.spells','','sun_5.png') }}
    {{ 
    basic.symbol('sonne_int_11''indego.weather.int_11.Sonne','','sun_1.png') }}
    {{ 
    basic.symbol('wolken_int_11''indego.weather.int_11.Wolken','','cloud_5.png') }}
    {{ 
    basic.symbol('regen_int_11''indego.weather.int_11.Regen','','cloud_8.png') }}
    {{ 
    basic.symbol('gewitter_int_11''indego.weather.int_11.Gewitter','','cloud_10.png' ) }}
    </
    td>
    <
    td width="30%" align="center">
    {{ 
    basic.float('indego_wetter_int_11_td''indego.weather.int_11.td''°') }} - {{ basic.float('indego_wetter_int_11_tt''indego.weather.int_11.tt''°') }}
    </
    td>
    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_11_rrr''indego.weather.int_11.rrr''l/m²') }}
    </
    td>

    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_11_prrr''indego.weather.int_11.prrr''%') }}
    </
    td>
    </
    td>
    </
    tr>



    </
    table>

    </
    div>
    </
    div>
    </
    div>

    <
    div class="block">
    <
    div class="set-2" data-role="collapsible-set" data-theme="c" data-content-theme="a" data-mini="true">
    <
    div data-role="collapsible" data-collapsed="false">
    <
    h3>Vorhersage {{ basic.value('indego_weather_day_3_wochentag','inde go.weather.day_3.wochentag') }} Temperaturen Regenwahrscheinlichkeit</h3>


    <
    table height="90%" width="98%" align="center">
    <
    tr>
    <
    td width="50%" align="left">
    <
    font size="+1">
    Sonnenstunden: {{ basic.value('indego_weather_day_3_sun''indego.weather.day_3.sun''') }}
    </
    font>
    </
    td>
    <
    td width="50%" align="right">
    <
    font size="+1">
    {{ 
    basic.float('indego_weather_day_3_tn''indego.weather.day_3.tn''°') }} - {{ basic.float('indego_weather_day_3_tx''indego.weather.day_3.tx''°') }}
    </
    font>
    </
    td>
    </
    tr>
    </
    table>


    <
    table height="90%" width="98%" align="center">

    <
    tr>
    <
    td width="15%" align="left">
    Nachts:
    </
    td>
    <
    td width="15%" align="center">
    {{ 
    basic.symbol('spells_int_12''indego.weather.int_12.spells','','sun_5.png') }}
    {{ 
    basic.symbol('sonne_int_12''indego.weather.int_12.Sonne','','sun_1.png') }}
    {{ 
    basic.symbol('wolken_int_12''indego.weather.int_12.Wolken','','cloud_5.png') }}
    {{ 
    basic.symbol('regen_int_12''indego.weather.int_12.Regen','','cloud_8.png') }}
    {{ 
    basic.symbol('gewitter_int_12''indego.weather.int_12.Gewitter','','cloud_10.png' ) }}
    </
    td>
    <
    td width="30%" align="center">
    {{ 
    basic.float('indego_wetter_int_12_td''indego.weather.int_12.td''°') }} - {{ basic.float('indego_wetter_int_12_tt''indego.weather.int_12.tt''°') }}
    </
    td>
    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_12_rrr''indego.weather.int_12.rrr''l/m²') }}
    </
    td>
    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_12_prrr''indego.weather.int_12.prrr''%') }}
    </
    td>
    </
    td>
    </
    tr>



    </
    tr>

    <
    tr>
    <
    td width="15%" align="left">
    Morgens:
    </
    td>
    <
    td width="15%" align="center">
    {{ 
    basic.symbol('spells_int_13''indego.weather.int_13.spells','','sun_5.png') }}
    {{ 
    basic.symbol('sonne_int_13''indego.weather.int_13.Sonne','','sun_1.png') }}
    {{ 
    basic.symbol('wolken_int_13''indego.weather.int_13.Wolken','','cloud_5.png') }}
    {{ 
    basic.symbol('regen_int_13''indego.weather.int_13.Regen','','cloud_8.png') }}
    {{ 
    basic.symbol('gewitter_int_13''indego.weather.int_13.Gewitter','','cloud_10.png' ) }}
    </
    td>
    <
    td width="30%" align="center">
    {{ 
    basic.float('indego_wetter_int_13_td''indego.weather.int_13.td''°') }} - {{ basic.float('indego_wetter_int_13_tt''indego.weather.int_13.tt''°') }}
    </
    td>
    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_13_rrr''indego.weather.int_13.rrr''l/m²') }}
    </
    td>
    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_13_prrr''indego.weather.int_13.prrr''%') }}
    </
    td>
    </
    td>
    </
    tr>
    <
    tr>
    <
    td width="15%" align="left">
    Mittags:
    </
    td>
    <
    td width="15%" align="center">
    {{ 
    basic.symbol('spells_int_14''indego.weather.int_14.spells','','sun_5.png') }}
    {{ 
    basic.symbol('sonne_int_14''indego.weather.int_14.Sonne','','sun_1.png') }}
    {{ 
    basic.symbol('wolken_int_14''indego.weather.int_14.Wolken','','cloud_5.png') }}
    {{ 
    basic.symbol('regen_int_14''indego.weather.int_14.Regen','','cloud_8.png') }}
    {{ 
    basic.symbol('gewitter_int_14''indego.weather.int_14.Gewitter','','cloud_10.png' ) }}
    </
    td>
    <
    td width="30%" align="center">
    {{ 
    basic.float('indego_wetter_int_14_td''indego.weather.int_14.td''°') }} - {{ basic.float('indego_wetter_int_14_tt''indego.weather.int_14.tt''°') }}
    </
    td>
    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_14_rrr''indego.weather.int_14.rrr''l/m²') }}
    </
    td>
    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_14_prrr''indego.weather.int_14.prrr''%') }}
    </
    td>
    </
    td>
    </
    tr>
    <
    tr>
    <
    td width="15%" align="left">
    Abends:
    </
    td>
    <
    td width="15%" align="center">
    {{ 
    basic.symbol('spells_int_15''indego.weather.int_15.spells','','sun_5.png') }}
    {{ 
    basic.symbol('sonne_int_15''indego.weather.int_15.Sonne','','sun_1.png') }}
    {{ 
    basic.symbol('wolken_int_15''indego.weather.int_15.Wolken','','cloud_5.png') }}
    {{ 
    basic.symbol('regen_int_15''indego.weather.int_15.Regen','','cloud_8.png') }}
    {{ 
    basic.symbol('gewitter_int_15''indego.weather.int_15.Gewitter','','cloud_10.png' ) }}
    </
    td>
    <
    td width="30%" align="center">
    {{ 
    basic.float('indego_wetter_int_15_td''indego.weather.int_15.td''°') }} - {{ basic.float('indego_wetter_int_15_tt''indego.weather.int_15.tt''°') }}
    </
    td>
    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_15_rrr''indego.weather.int_15.rrr''l/m²') }}
    </
    td>

    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_15_prrr''indego.weather.int_15.prrr''%') }}
    </
    td>
    </
    td>
    </
    tr>



    </
    table>

    </
    div>
    </
    div>
    </
    div>


    <
    div class="block">
    <
    div class="set-2" data-role="collapsible-set" data-theme="c" data-content-theme="a" data-mini="true">
    <
    div data-role="collapsible" data-collapsed="false">
    <
    h3>Vorhersage {{ basic.value('indego_weather_day_4_wochentag','inde go.weather.day_4.wochentag') }} Temperaturen Regenwahrscheinlichkeit</h3>


    <
    table height="90%" width="98%" align="center">
    <
    tr>
    <
    td width="50%" align="left">
    <
    font size="+1">
    Sonnenstunden: {{ basic.value('indego_weather_day_4_sun''indego.weather.day_4.sun''') }}
    </
    font>
    </
    td>
    <
    td width="50%" align="right">
    <
    font size="+1">
    {{ 
    basic.float('indego_weather_day_4_tn''indego.weather.day_4.tn''°') }} - {{ basic.float('indego_weather_day_4_tx''indego.weather.day_4.tx''°') }}
    </
    font>
    </
    td>
    </
    tr>
    </
    table>


    <
    table height="90%" width="98%" align="center">

    <
    tr>
    <
    td width="15%" align="left">
    Nachts:
    </
    td>
    <
    td width="15%" align="center">
    {{ 
    basic.symbol('spells_int_16''indego.weather.int_16.spells','','sun_5.png') }}
    {{ 
    basic.symbol('sonne_int_16''indego.weather.int_16.Sonne','','sun_1.png') }}
    {{ 
    basic.symbol('wolken_int_16''indego.weather.int_16.Wolken','','cloud_5.png') }}
    {{ 
    basic.symbol('regen_int_16''indego.weather.int_16.Regen','','cloud_8.png') }}
    {{ 
    basic.symbol('gewitter_int_16''indego.weather.int_16.Gewitter','','cloud_10.png' ) }}
    </
    td>
    <
    td width="30%" align="center">
    {{ 
    basic.float('indego_wetter_int_16_td''indego.weather.int_16.td''°') }} - {{ basic.float('indego_wetter_int_16_tt''indego.weather.int_16.tt''°') }}
    </
    td>
    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_16_rrr''indego.weather.int_16.rrr''l/m²') }}
    </
    td>
    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_16_prrr''indego.weather.int_16.prrr''%') }}
    </
    td>
    </
    td>
    </
    tr>



    </
    tr>

    <
    tr>
    <
    td width="15%" align="left">
    Morgens:
    </
    td>
    <
    td width="15%" align="center">
    {{ 
    basic.symbol('spells_int_17''indego.weather.int_17.spells','','sun_5.png') }}
    {{ 
    basic.symbol('sonne_int_17''indego.weather.int_17.Sonne','','sun_1.png') }}
    {{ 
    basic.symbol('wolken_int_17''indego.weather.int_17.Wolken','','cloud_5.png') }}
    {{ 
    basic.symbol('regen_int_17''indego.weather.int_17.Regen','','cloud_8.png') }}
    {{ 
    basic.symbol('gewitter_int_17''indego.weather.int_17.Gewitter','','cloud_10.png' ) }}
    </
    td>
    <
    td width="30%" align="center">
    {{ 
    basic.float('indego_wetter_int_17_td''indego.weather.int_17.td''°') }} - {{ basic.float('indego_wetter_int_17_tt''indego.weather.int_17.tt''°') }}
    </
    td>
    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_17_rrr''indego.weather.int_17.rrr''l/m²') }}
    </
    td>
    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_17_prrr''indego.weather.int_17.prrr''%') }}
    </
    td>
    </
    td>
    </
    tr>
    <
    tr>
    <
    td width="15%" align="left">
    Mittags:
    </
    td>
    <
    td width="15%" align="center">
    {{ 
    basic.symbol('spells_int_18''indego.weather.int_18.spells','','sun_5.png') }}
    {{ 
    basic.symbol('sonne_int_18''indego.weather.int_18.Sonne','','sun_1.png') }}
    {{ 
    basic.symbol('wolken_int_18''indego.weather.int_18.Wolken','','cloud_5.png') }}
    {{ 
    basic.symbol('regen_int_18''indego.weather.int_18.Regen','','cloud_8.png') }}
    {{ 
    basic.symbol('gewitter_int_18''indego.weather.int_18.Gewitter','','cloud_10.png' ) }}
    </
    td>
    <
    td width="30%" align="center">
    {{ 
    basic.float('indego_wetter_int_18_td''indego.weather.int_18.td''°') }} - {{ basic.float('indego_wetter_int_18_tt''indego.weather.int_18.tt''°') }}
    </
    td>
    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_18_rrr''indego.weather.int_18.rrr''l/m²') }}
    </
    td>
    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_18_prrr''indego.weather.int_18.prrr''%') }}
    </
    td>
    </
    td>
    </
    tr>
    <
    tr>
    <
    td width="15%" align="left">
    Abends:
    </
    td>
    <
    td width="15%" align="center">
    {{ 
    basic.symbol('spells_int_19''indego.weather.int_19.spells','','sun_5.png') }}
    {{ 
    basic.symbol('sonne_int_19''indego.weather.int_19.Sonne','','sun_1.png') }}
    {{ 
    basic.symbol('wolken_int_19''indego.weather.int_19.Wolken','','cloud_5.png') }}
    {{ 
    basic.symbol('regen_int_19''indego.weather.int_19.Regen','','cloud_8.png') }}
    {{ 
    basic.symbol('gewitter_int_19''indego.weather.int_19.Gewitter','','cloud_10.png' ) }}
    </
    td>
    <
    td width="30%" align="center">
    {{ 
    basic.float('indego_wetter_int_19_td''indego.weather.int_19.td''°') }} - {{ basic.float('indego_wetter_int_19_tt''indego.weather.int_19.tt''°') }}
    </
    td>
    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_19_rrr''indego.weather.int_19.rrr''l/m²') }}
    </
    td>

    <
    td width="20%" align="right">
    {{ 
    basic.float('indego_wetter_int_19_prrr''indego.weather.int_19.prrr''%') }}
    </
    td>
    </
    td>
    </
    tr>



    </
    table>

    </
    div>
    </
    div>
    </
    div>
    {% 
    endblock 
    Angehängte Dateien
    Zuletzt geändert von Marcov; 24.08.2017, 15:25.

    Einen Kommentar schreiben:


  • Marcov
    antwortet
    ich lasse die leeren Posts mal als Mahnmal stehen!

    indego.conf im Anhang als Zip (kann ich hier nicht einfügen)

    plugin.conf:
    PHP-Code:
    [indego]
        
    class_name INDEGO
        class_path 
    plugins.indego
        user 
    'NUTZERNAME'
        
    password 'PASSWORT'
        
    cycle 30 # Frequenz in welcher der Status abgerufen wird
        
    img_pfad '/tmp/garden.svg'  # Pfad unter welchem die Gartengrafik gespeichert wird, muss Schreibrechte haben. 


    init.py:
    PHP-Code:
    #!/usr/bin/env python3
    # vim: set encoding=utf-8 tabstop=4 softtabstop=4 shiftwidth=4 expandtab
    #########################################################################
    # Copyright 2013 KNX-User-Forum e.V.            http://knx-user-forum.de/
    #########################################################################
    #  This file is part of SmartHome.py.    http://mknx.github.io/smarthome/
    #
    #  SmartHome.py is free software: you can redistribute it and/or modify
    #  it under the terms of the GNU General Public License as published by
    #  the Free Software Foundation, either version 3 of the License, or
    #  (at your option) any later version.
    #
    #  SmartHome.py is distributed in the hope that it will be useful,
    #  but WITHOUT ANY WARRANTY; without even the implied warranty of
    #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    #  GNU General Public License for more details.
    #
    #  You should have received a copy of the GNU General Public License
    #  along with SmartHome.py. If not, see <http://www.gnu.org/licenses/>.
    #########################################################################

    import logging
    import base64
    import os
    import ast
    import datetime
    import json
    import http
    .client
    from dateutil import tz

    #logger = logging.getLogger('')
    logger logging.getLogger(__name__)


    class 
    INDEGO():

        
    def __init__(selfsmarthomeuser=Nonepassword=Nonecycle=60img_pfad=None):
            
    self.indego_url 'https://api.indego.iot.bosch-si.com/api/v1/'
            
    self._sh smarthome
            self
    .user user
            self
    .password password
            self
    .alert_reset True
            self
    .auth()
            
    self.img_pfad img_pfad
            self
    .cycle cycle
            self
    .add_keys = {}

        
    def parse_item(selfitem):
            if 
    'indego_command' in item.conf:
                
    logger.debug("item indego gefunden" str(item.conf['indego_command']) +' ' str(item()))
                return 
    self.send_command
            
    if 'indego_smart' in item.conf:
                
    logger.debug(str(item) + " ist item indego smart Wert " str(item()))
                return 
    self.set_smart
            
    if 'indego_frequency' in item.conf:
                
    logger.debug(str(item) + " ist item indego smart frequency mit Wert: " str(item()))
                return 
    self.set_smart_frequency
            
    if 'indego_add_key' in item.conf:
                
    logger.debug(str(item) + " ist item indego add_key: " str(item.conf['indego_add_key']))
                
    self.add_keys[item.conf['indego_add_key']] = item
            
    else:
                return 
    None

        def fetch_url
    (selfurlusername=Nonepassword=Nonetimeout=2body=None):
            
    headers = {'Accept''text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'}
            
    headers = {'Content-Type''application/json'}
            
    plain True
            
    if url.startswith('https'):
                
    plain False
            lurl 
    url.split('/')
            
    host lurl[2]
            
    purl '/' '/'.join(lurl[3:])
            if 
    plain:
                
    conn http.client.HTTPConnection(hosttimeout=timeout)
            else:
                
    conn http.client.HTTPSConnection(hosttimeout=timeout)
            if 
    username and password:
                
    headers['Authorization'] = ('Basic '.encode() + base64.b64encode((username ':' password).encode()))
                
    logger.debug("headers: " str(headers))
            try:
                
    conn.request("POST"purlbody=bodyheaders=headers)
            
    except Exception as e:
                
    logger.warning("Problem fetching {0}: {1}".format(urle))
                
    conn.close()
                return 
    False
            resp 
    conn.getresponse()
            if 
    resp.status == 200 or resp.status == 201:
                
    content resp.read()
            else:
                
    logger.warning("Problem fetching {0}: {1} {2}".format(urlresp.statusresp.reason))
                
    content False
            conn
    .close()
            return 
    content

        def get_url
    (selfurlcontextid=Nonetimeout=40method='GET'):
            
    headers = {'Content-Type''application/json'}
            
    headers['Accept'] = 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
            
    headers['x-im-context-id'] = contextid
            plain 
    True
            
    if url.startswith('https'):
                
    plain False
            lurl 
    url.split('/')
            
    host lurl[2]
            
    purl '/' '/'.join(lurl[3:])
            if 
    plain:
                
    conn http.client.HTTPConnection(hosttimeout=timeout)
            else:
                
    conn http.client.HTTPSConnection(hosttimeout=timeout)
            try:
                
    conn.request(methodpurlheaders=headers)
            
    except Exception as e:
                
    logger.warning("Problem fetching {0}: {1}".format(urle))
                
    conn.close()
                return 
    False
            resp 
    conn.getresponse()
            if 
    resp.status == 401:
                
    logger.warning("get_url returned 401, reconnecting and trying again")
                
    self._sh.return_item('indego.online')(False,'indego plugin')
                
    self.auth()
                try:
                    
    conn.request(methodpurlheaders=headers)
                
    except Exception as e:
                    
    logger.warning("Problem fetching {0}: {1}".format(urle))
                    
    conn.close()
                    return 
    False
                resp 
    conn.getresponse()
            if 
    resp.status == 200 or resp.status == 201:
                
    content resp.read()
            else:
                
    logger.warning("Problem fetching {0}: {1} {2}".format(urlresp.statusresp.reason))
                
    content False
            conn
    .close()
            return 
    content

        def put_url
    (selfurlcontextid=Nonestate=Nonetimeout=2):
            
    headers = {'Accept''text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'}
            
    headers = {'Content-Type''application/json'}
            
    plain True
            
    if url.startswith('https'):
                
    plain False
            lurl 
    url.split('/')
            
    host lurl[2]
            
    purl '/' '/'.join(lurl[3:])
            if 
    plain:
                
    conn http.client.HTTPConnection(hosttimeout=timeout)
            else:
                
    conn http.client.HTTPSConnection(hosttimeout=timeout)
                
    headers['x-im-context-id'] = contextid
            body 
    state
            
    try:
                
    conn.request("PUT"purlbody=bodyheaders=headers)
            
    except Exception as e:
                
    logger.warning("Problem fetching {0}: {1}".format(urle))
                
    conn.close()
                return 
    False
            
    #resp = conn.getresponse()
            #content = resp.read()
            
    conn.close()
            
    logger.debug('put gesendet an URL: ' str(url) +'context id: ' str(contextid) +'command: ' str(state))
            return 
    True
            



        def send_command
    (selfitemcommand=Nonecaller=Nonesource=Nonedest=None):
            
    command =  str(item.conf['indego_command'])
            
    logger.debug("Function Command " command +' ' str(item()))
            if 
    item():
                
    message self.put_url(self.indego_url 'alms/'+self.alm_sn+'/state',self.context_id,command,10)
                
    logger.debug("Command " command +' gesendet! ' str(message))

        
    def set_smart(selfitemcommand=Nonecaller=Nonesource=Nonedest=None):
            
    logger.debug("Smart Mode Command " str(item()))
            if 
    item():
                
    logger.debug("SMAAAAAAAAAAAAAAAAAAAAART aktivieren")
                
    command '{"enabled": true}'
            
    else:
                
    logger.debug("SMAAAAAAAAAAAAAAAAAAAAART deaktivieren")
                
    command '{"enabled": false}'
            
    logger.debug("Smart URL: " self.indego_url 'alms/'+self.alm_sn +'/predictive')
            
    message self.put_url(self.indego_url 'alms/'+self.alm_sn +'/predictive',self.context_id,command,10)
            
    logger.debug("Smart Command " command +' gesendet! ' str(message))

        
    def set_smart_frequency(selfitemfrequency=0caller=Nonesource=Nonedest=None):
            
    frequency =  str(item())
            
    command '{"user_adjustment": 'frequency +'}'
            
    logger.debug("frequency smart " command +' ' str(item()))
            
    message self.put_url(self.indego_url 'alms/'+self.alm_sn +'/predictive/useradjustment',self.context_id,command,10)
            
    logger.debug("Command " command +' gesendet! ' str(message))
            
        
    def auth(self):
            
    auth_response self.fetch_url(self.indego_url 'authenticate',self.userself.password25'{"device":"","os_type":"Android","os_version":"4.0","dvc_manuf":"unknown","dvc_type":"unknown"}')
            if 
    auth_response == False:
                
    logger.error('AUTHENTICATION INDEGO FAILED! Plugin not working now.')
            else:    
                
    auth_response json.loads(auth_response.decode(encoding='UTF-8',errors='strict'))        
                
    logger.debug("String Auth: " +str(auth_response))
                
    self.context_id auth_response['contextId']
                
    logger.info("context ID received "+self.context_id)
                
    self.user_id auth_response['userId']
                
    logger.info("User ID received "+self.user_id)
                
    self.alm_sn auth_response['alm_sn']            
                
    logger.info("Serial received "+self.alm_sn)

        
    def get_next_time(self):
            
    next_time self.get_url(self.indego_url +'alms/'self.alm_sn +'/predictive/nextcutting?last=YYYY-MM-DDTHH:MM:SS%2BHH:MM',self.context_id,10)
            if 
    next_time == False:
                
    logger.error("Error getting next smartmow time")
            else:
                
    logger.debug("Next time raw"+str(next_time))
                
    next_time next_time.decode(encoding='UTF-8',errors='ignore')
                
    next_time json.loads(next_time)
                
    next_time next_time['mow_next']
                
                
    logger.debug("Next time raw 2: "+str(next_time))
                
    #next_time = next_time[:-6]
                #next_time = datetime.datetime.strptime(next_time,'%Y-%m-%dT%H:%M:%S').replace(tzinfo=tz.gettz('UTC')).astimezone(self._sh.tzinfo()) #datetime.datetime.strptime(next_time,'%Y-%m-%dT%H:%M:%S+02:00').replace(tzinfo=self._sh.tzinfo())
                
    next_time next_time.replace(":","")
                
    next_time datetime.datetime.strptime(next_time,'%Y-%m-%dT%H%M%S%z')
                
    logger.debug("Next time final "+str(next_time))
                
    self._sh.return_item('indego.next_time')(next_time,'indego plugin')


        
    def run(self):
            
    self.alive True
            self
    ._sh.scheduler.add('state'self.statecycle self.cycle)
            
    self._sh.scheduler.add('alert'self.alertcycle=3600)
            
    #self._sh.scheduler.add('auth', self.auth, cycle=7190)
            
    self._sh.scheduler.add('device_date'self.device_datacycle=6000)
            
    self._sh.scheduler.add('get_weather'self.get_weathercycle=600)
            
    self._sh.scheduler.add('get_next_time'self.get_next_timecycle=300)
            
    self._sh.scheduler.add('get_smart_frequency'self.get_smart_frequencycycle=500)

            
    # if you want to create child threads, do not make them daemon = True!
            # They will not shutdown properly. (It's a python bug)
            




        
    def get_weather(self):
            
    weather self.get_url(self.indego_url +'alms/'self.alm_sn +'/predictive/weather',self.context_id,10)
            
    weather weather.decode(encoding='UTF-8',errors='ignore')
            
    weather json.loads(weather)
            for 
    i in weather['LocationWeather']['forecast']['intervals']:
                
    position str(weather['LocationWeather']['forecast']['intervals'].index(i))
                
    logger.debug("POSITION "+str(position))
                for 
    x in i:
                    
    wertpunkt x
                    wert 
    str(i[x])
                    
    logger.debug("ITEEEEEM "+'indego.weather.int_'+position+'.'+wertpunkt)
                    if 
    wertpunkt == 'dateTime':
                        
    #wert = wert.replace('+00:00','+0000')
                        
    logger.debug("DATE__TIME "wert)
                        
    wertdatetime.datetime.strptime(wert,'%Y-%m-%dT%H:%M:%SZ').replace(tzinfo=self._sh.tzinfo())
                    if 
    wertpunkt == 'wwsymbol_mg2008':
                        
    logger.debug("WERTPUNKT "str(wertpunkt))
                        if 
    wert == '110000' or wert ==  '111000' or wert == '211000' or wert ==  '210000':
                            
    logger.debug("WERTCHEN SPELLS "wert)
                            
    self._sh.return_item('indego.weather.int_'+position+'.'+'spells')(True,'indego plugin')
                            
    self._sh.return_item('indego.weather.int_'+position+'.'+'Sonne')(False,'indego plugin')
                            
    self._sh.return_item('indego.weather.int_'+position+'.'+'Wolken')(False,'indego plugin')
                            
    self._sh.return_item('indego.weather.int_'+position+'.'+'Regen')(False,'indego plugin')
                            
    self._sh.return_item('indego.weather.int_'+position+'.'+'Gewitter')(False,'indego plugin')
                        
    elif wert == '100000' or wert ==  '200000':
                            
    logger.debug("WERTCHEN SONNE "wert)
                            
    self._sh.return_item('indego.weather.int_'+position+'.'+'spells')(False,'indego plugin')
                            
    self._sh.return_item('indego.weather.int_'+position+'.'+'Sonne')(True,'indego plugin')
                            
    self._sh.return_item('indego.weather.int_'+position+'.'+'Wolken')(False,'indego plugin')
                            
    self._sh.return_item('indego.weather.int_'+position+'.'+'Regen')(False,'indego plugin')
                            
    self._sh.return_item('indego.weather.int_'+position+'.'+'Gewitter')(False,'indego plugin')
                        
    elif wert == '220000' or wert == '121000' or wert == '120000' or wert == '330000' or wert == '320000':
                            
    logger.debug("WERTCHEN WOLKEN "wert)
                            
    self._sh.return_item('indego.weather.int_'+position+'.'+'spells')(False,'indego plugin')
                            
    self._sh.return_item('indego.weather.int_'+position+'.'+'Sonne')(False,'indego plugin')
                            
    self._sh.return_item('indego.weather.int_'+position+'.'+'Wolken')(True,'indego plugin')
                            
    self._sh.return_item('indego.weather.int_'+position+'.'+'Regen')(False,'indego plugin')
                            
    self._sh.return_item('indego.weather.int_'+position+'.'+'Gewitter')(False,'indego plugin')
                        
    elif wert == '122000' or wert == '331000' or wert == '221000' or wert == '321000':
                            
    logger.debug("WERTCHEN REGEN "wert)
                            
    self._sh.return_item('indego.weather.int_'+position+'.'+'spells')(False,'indego plugin')
                            
    self._sh.return_item('indego.weather.int_'+position+'.'+'Sonne')(False,'indego plugin')
                            
    self._sh.return_item('indego.weather.int_'+position+'.'+'Wolken')(False,'indego plugin')
                            
    self._sh.return_item('indego.weather.int_'+position+'.'+'Regen')(True,'indego plugin')
                            
    self._sh.return_item('indego.weather.int_'+position+'.'+'Gewitter')(False,'indego plugin')
                        
    elif wert == '110001' or wert == '113001' or wert == '123001' or wert == '223001' or wert == '213001' or wert == '210001':
                            
    logger.debug("WERTCHEN GEWITTER "wert)
                            
    self._sh.return_item('indego.weather.int_'+position+'.'+'spells')(False,'indego plugin')
                            
    self._sh.return_item('indego.weather.int_'+position+'.'+'Sonne')(False,'indego plugin')
                            
    self._sh.return_item('indego.weather.int_'+position+'.'+'Wolken')(False,'indego plugin')
                            
    self._sh.return_item('indego.weather.int_'+position+'.'+'Regen')(False,'indego plugin')
                            
    self._sh.return_item('indego.weather.int_'+position+'.'+'Gewitter')(True,'indego plugin')
                    
    self._sh.return_item('indego.weather.int_'+position+'.'+wertpunkt)(wert,'indego plugin')

            for 
    i in weather['LocationWeather']['forecast']['days']:
                
    position_day str(weather['LocationWeather']['forecast']['days'].index(i))
                
    logger.debug("POSITION_day "+str(position_day))
                for 
    x in i:
                    
    wertpunkt_day x
                    wert_day 
    str(i[x])
                    
    logger.debug("ITEEEEEM DAY "+'indego.weather.day_'+position_day+'.'+wertpunkt_day)
                    if 
    wertpunkt_day == 'date':
                        
    wert_day datetime.datetime.strptime(wert_day,'%Y-%m-%d').replace(tzinfo=self._sh.tzinfo())
                        
    days = ["Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","Sonntag"]
                        
    dayNumber wert_day.weekday()
                        
    wochentag days[dayNumber]
                        
    logger.debug("WOCHENTAG GEWITTER "wochentag)
                        
    self._sh.return_item('indego.weather.day_'+position_day+'.'+'wochentag')(wochentag,'indego plugin')
                    
    self._sh.return_item('indego.weather.day_'+position_day+'.'+wertpunkt_day)(wert_day,'indego plugin')



        
    def stop(self):
            
    #Delete AUthentication
            
    self._sh.scheduler.remove('state')
            
    self._sh.scheduler.remove('device_date')
            
    #self._sh.scheduler.remove('alert')
            
    self.get_url(self.indego_url 'authenticate',self.context_id,5,'DELETE')
            
    logger.debug('closing indego plugin')
            
    self.alive False
        
        def alert
    (self):
            
    logger.debug("ÄLÄRMCHEN START")
            
    alert_response self.get_url(self.indego_url 'alerts',self.context_id,10)
            if 
    alert_response == False:
                
    logger.debug("No Alert or error")
                
    self.alert_reset False
            
    else:
                
    logger.debug("ALARM ELSE")
                
    alert_response alert_response.decode(encoding='UTF-8',errors='ignore')
                
    logger.debug("Alärmchen: " str(alert_response))
                
    alert_response json.loads(alert_response)
                
    logger.debug("Alärmchen 2: " str(alert_response))
                if 
    len(alert_response) == 0:
                    
    logger.debug("No new Alert Messages")
                    
                else:
                    
    logger.warning("alert_response "+str(alert_response))                
                    
    alerts len(alert_response)
                    
    logger.debug("ALERTS "+str(alerts))
                    if 
    len(alert_response) == 1:
                        
    alert_latest alert_response[0]
                        
    self.alert_reset False
                    
    else:
                        
    #alert_latest = ast.literal_eval(alert_response[0]+'}')
                        
    logger.debug("ALERTerS "+str(alert_response[len(alert_response)-1]))
                        
    alert_latest alert_response[len(alert_response)-1]
                        
    self.alert_reset True
            
                    alert_id 
    alert_latest['alert_id']
                    
    self._sh.return_item('indego.alert_id')(alert_id,'indego plugin')
                    
    logger.debug("alert_id "+str(alert_id))

                    
    alert_message alert_latest['message'].replace(' Bitte folgen Sie den Anweisungen im Display des Mähers.','')
                    
    self._sh.return_item('indego.alert_message')(alert_message,'indego plugin')
                    
    logger.debug("alert_message "+str(alert_message))

                    
    alert_date datetime.datetime.strptime(alert_latest['date'],'%Y-%m-%dT%H:%M:%S.%fZ').replace(tzinfo=tz.gettz('UTC')).astimezone(self._sh.tzinfo())                #alert_date = datetime.datetime.strptime(alert_latest['date'],'%Y-%m-%dT%H:%M:%S.%fZ')
                    
    self._sh.return_item('indego.alert_date')(alert_date,'indego plugin')
                    
    logger.debug("alert_date "+str(alert_date))

                    
    alert_headline alert_latest['headline']
                    
    self._sh.return_item('indego.alert_headline')(alert_headline ,'indego plugin')
                    
    logger.debug("alert_headline  "+str(alert_headline))

                    
    alert_flag alert_latest['flag']
                    
    self._sh.return_item('indego.alert_flag')(alert_flag,'indego plugin')
                    
    logger.debug("alert_flag "+str(alert_flag))

                    
    self.alert_delete(alert_id)

        
    def get_smart_frequency(self):
            
    logger.debug("getting smart frequency")
            
    smart_frequency_response self.get_url(self.indego_url 'alms/'+self.alm_sn '/predictive/useradjustment',self.context_id)
            
    smart_frequency_response smart_frequency_response.decode(encoding='UTF-8',errors='strict')
            
    smart_frequency_response json.loads(smart_frequency_response)
            
    frequency smart_frequency_response['user_adjustment']
            
    self._sh.return_item('indego.SMART.frequenz')(frequency,'indego plugin')
            
    logger.debug("smart_frequenz "+str(frequency))

        
    def alert_delete(self,alert_id):
            
    logger.debug("deleting alert_id "+str(alert_id))
            
    self.get_url(self.indego_url 'alerts/'+alert_id,self.context_id,50,'DELETE')

        
    def device_data(self):
            
    logger.debug('device_date')
            
    device_data_response self.get_url(self.indego_url 'alms/'+self.alm_sn,self.context_id)
            if 
    device_data_response == False:
                
    logger.error('Device Data disconnected')
            else:
                
    logger.debug('device data RAW: ' str(device_data_response))
                
    device_data_response device_data_response.decode(encoding='UTF-8',errors='ignore')
                
    logger.debug('device date stringtanga: ' device_data_response)
                
    #device_data_response = str(device_data_response).replace('false','False').replace('true','True')
                
    device_data_response json.loads(device_data_response)
                
    logger.debug('device date JASON: ' str(device_data_response))

                
    alm_sn device_data_response['alm_sn']
                
    self._sh.return_item('indego.alm_sn')(alm_sn,'indego plugin')
                
    logger.debug("alm_sn "+str(alm_sn))

                if 
    'alm_name' in device_data_response:
                    
    alm_name device_data_response['alm_name']
                    
    self._sh.return_item('indego.alm_name')(alm_name,'indego plugin')
                    
    logger.debug("alm_name "+str(alm_name))

                
    service_counter device_data_response['service_counter']
                
    self._sh.return_item('indego.service_counter')(service_counter,'indego plugin')
                
    logger.debug("service_counter "+str(service_counter))

                
    needs_service device_data_response['needs_service']
                
    self._sh.return_item('indego.needs_service')(needs_service,'indego plugin')
                
    logger.debug("needs_service "+str(needs_service))
        
                
    alm_mode device_data_response['alm_mode']
                
    self._sh.return_item('indego.alm_mode')(alm_mode,'indego plugin')
                if 
    alm_mode == 'smart':
                    
    logger.debug("ALM_MODE smaAAAAArt")
                    
    self._sh.return_item('indego.SMART')(True,'indego plugin')
                else:
                    
    logger.debug("ALM_MODE MANUAAAAAAAAL")
                    
    self._sh.return_item('indego.SMART')(False,'indego plugin')                
                
    logger.debug("alm_mode "+str(alm_mode))

                
    bareToolnumber device_data_response['bareToolnumber']
                
    self._sh.return_item('indego.bareToolnumber')(bareToolnumber,'indego plugin')
                
    logger.debug("bareToolnumber "+str(bareToolnumber))
                
                if 
    'alm_firmware_version' in device_data_response:
                    
    alm_firmware_version device_data_response['alm_firmware_version']
                    if 
    alm_firmware_version != self._sh.indego.alm_firmware_version():
                        
    self._sh.return_item('indego.alm_firmware_version.before')(self._sh.indego.alm_firmware_version(),'indego plugin')
                        
    self._sh.return_item('indego.alm_firmware_version.changed')(self._sh.now(),'indego plugin')
                        
    logger.info("indego updated firmware from " +self._sh.indego.alm_firmware_version() +' to ' +str(alm_firmware_version))
                                    
                    
    self._sh.return_item('indego.alm_firmware_version')(alm_firmware_version,'indego plugin')
                    
    logger.debug("alm_firmware_version "+str(alm_firmware_version))



        
    def state(self):
            
    state__str = {0:['Lese Status','unknown'], 257:['lädt''dock'],258:['docked','dock'], 259:['Docked-Softwareupdate','dock'], 260:['Docked','dock'], 261:['docked','dock'], 262:['docked - lädt Karte','dock'], 263:['docked-speichert Karte''dock'],513:['mäht','moving'], 514:['bestimme Ort','moving'], 515:['lade Karte','moving'], 516:['lerne Garten','moving'], 517:['Pause','pause'], 518:['schneide Rand','moving'], 519:['stecke fest','hilfe'], 769:['fährt in Station','moving'],  770:['fährt in Station','moving'], 771:['fährt zum Laden in Station','moving'], 772:['fährt in Station – Mähzeit beendet','moving'], 773:['fährt in Station - überhitzt','help'], 774:['fährt in Station','moving'], 775:['fährt in Station - fertig gemäht','moving'], 776:['fährt in Station - bestimmt Ort','moving'], 1025:['Diagnosemodus','unknown'], 1026:['Endoflive','hilfe'], 1281:['Softwareupdate','dock']}
            
    state_response self.get_url(self.indego_url 'alms/'+self.alm_sn+'/state',self.context_id)
            
            
    #now reconnection in get_url directly
            #if state_response == False:
            #    logger.error('Indego disconnected')
            #    self._sh.return_item('indego.online')(False,'indego plugin')
            #    self.auth()

            
    if state_response != False:
                
    state_response state_response.decode(encoding='UTF-8',errors='ignore')
                
    self._sh.return_item('indego.online')(True,'indego plugin')
                
    logger.debug("indego state received "+str(state_response))
                
    states json.loads(state_response)
                                
                if 
    'error' in states:
                    
    error_code states['error']
                    
    self._sh.return_item('indego.stateError')(error_code,'indego plugin')
                    
    logger.error("error_code "+str(error_code))
                else:
                    
    error_code 0
                    self
    ._sh.return_item('indego.stateError')(error_code,'indego plugin')
                
                
    state_code states['state']
                
    self._sh.return_item('indego.stateCode')(state_code,'indego plugin')
                
    logger.debug("state code "str(state_code))
                if 
    state__str[state_code][1] == 'dock':
                    
    logger.debug('indego docked')
                    
    self.alert_reset True
                    self
    ._sh.return_item('indego.docked')(True,'indego plugin')
                    
    self._sh.return_item('indego.moving')(False,'indego plugin')
                    
    self._sh.return_item('indego.pause')(False,'indego plugin')
                    
    self._sh.return_item('indego.help')(False,'indego plugin')
                if 
    state__str[state_code][1] == 'moving':
                    
    logger.debug('indego moving')
                    
    self.alert_reset True
                    self
    ._sh.return_item('indego.mowedDate')(self._sh.now(),'indego plugin')
                    
    self._sh.return_item('indego.docked')(False,'indego plugin')
                    
    self._sh.return_item('indego.moving')(True,'indego plugin')
                    
    self._sh.return_item('indego.pause')(False,'indego plugin')
                    
    self._sh.return_item('indego.help')(False,'indego plugin')
                if 
    state__str[state_code][1] == 'pause':
                    
    logger.debug('indego pause')
                    
    self.alert_reset True
                    self
    ._sh.return_item('indego.docked')(False,'indego plugin')
                    
    self._sh.return_item('indego.moving')(False,'indego plugin')
                    
    self._sh.return_item('indego.pause')(True,'indego plugin')
                    
    self._sh.return_item('indego.help')(False,'indego plugin')
                if 
    state__str[state_code][1] == 'hilfe':
                    
    logger.debug('indego hilfe')
                    
    self._sh.return_item('indego.docked')(False,'indego plugin')
                    
    self._sh.return_item('indego.moving')(False,'indego plugin')
                    
    self._sh.return_item('indego.pause')(False,'indego plugin')
                    
    self._sh.return_item('indego.help')(True,'indego plugin')
                    if 
    self.alert_reset == True:
                        
    logger.debug("Alert aufgefrufen, self_alert_reset = True")
                        
    self.alert()
                    else:
                        
    logger.debug("Alert nicht aufgefrufen, self_alert_reset = False")
                

                
    state_str state__str[state_code][0]
                
    self._sh.return_item('indego.state_str')(state_str,'indego plugin')
                
    logger.debug("state str "state_str)

                
    mowed states['mowed']
                
    self._sh.return_item('indego.mowedPercent')(mowed,'indego plugin')
                
    logger.debug("mowed "+str(mowed))

                
    mowmode states['mowmode']
                
    self._sh.return_item('indego.mowmode')(mowmode,'indego plugin')
                
    logger.debug("mowmode  "+str(mowmode))

                
    total_operate states['runtime']['total']['operate']
                
    self._sh.return_item('indego.runtimeTotalOperationMins')(total_operate,'indego plugin')
                
    logger.debug("total_operate "+str(total_operate))

                
    total_charge states['runtime']['total']['charge']
                
    self._sh.return_item('indego.runtimeTotalChargeMins')(total_charge,'indego plugin')
                
    logger.debug("total_charge "+str(total_charge))

                
    session_operate states['runtime']['session']['operate']
                
    self._sh.return_item('indego.runtimeSessionOperationMins')(session_operate,'indego plugin')
                
    logger.debug("session_operate "+str(session_operate))

                
    session_charge states['runtime']['session']['charge']
                
    self._sh.return_item('indego.runtimeSessionChargeMins')(session_charge,'indego plugin')
                
    logger.debug("session_charge "+str(session_charge))

                if 
    'xPos' in states:
                    
    xPos states['xPos']
                    
    self._sh.return_item('indego.xPos')(xPos,'indego plugin')
                    
    logger.debug("xPos "+str(xPos))

                    
    yPos states['yPos']
                    
    self._sh.return_item('indego.yPos')(yPos,'indego plugin')
                    
    logger.debug("yPos "+str(yPos))

                    
    svg_xPos states['svg_xPos']
                    
    self._sh.return_item('indego.svg_xPos')(svg_xPos,'indego plugin')
                    
    logger.debug("svg_xPos "+str(svg_xPos))

                    
    svg_yPos states['svg_yPos']
                    
    self._sh.return_item('indego.svg_yPos')(svg_yPos,'indego plugin')
                    
    logger.debug("svg_yPos "+str(svg_yPos))
                
                if 
    'config_change' in states and 'config_change' in self.add_keys:
                    
    config_change states['config_change']
                    
    self._sh.return_item(str(self.add_keys['config_change']))(config_change,'indego plugin')
                    
    logger.debug("config_change "+str(config_change))

                if 
    'mow_trig' in states and 'mow_trig' in self.add_keys:
                    
    mow_trig states['mow_trig']
                    
    self._sh.return_item(str(self.add_keys['mow_trig']))(mow_trig,'indego plugin')
                    
    logger.debug("mow_trig "+str(mow_trig))

                
    #if 'map_update_available' in states and 'mow_trig' in self.add_keys:
                #    mow_trig = states['map_update_available']
                #    self._sh.return_item(str(self.add_keys['mow_trig']))(mow_trig,'indego plugin')
                #    logger.debug("mow_trig "+str(mow_trig))

                
    map_update states['map_update_available']
                
    logger.debug("map_update "+str(map_update))
                
    self._sh.return_item('indego.mapUpdateAvailable')(map_update,'indego plugin')
                if 
    map_update:
                    
    logger.debug('lade neue Karte')
                    
    garden self.get_url(self.indego_url 'alms/'+self.alm_sn+'/map',self.context_id,120)
                    if 
    garden == False:
                        
    logger.warning('Map returned false')
                    else:
                        
    with open(self.img_pfad'wb') as outfile:
                            
    outfile.write(garden)
                            
    logger.debug('You have a new MAP')
                            
    self._sh.return_item('indego.mapSvgCacheDate')(self._sh.now(),'indego plugin'
    Angehängte Dateien
    Zuletzt geändert von Marcov; 24.10.2018, 22:24.

    Einen Kommentar schreiben:


  • Marcov
    antwortet

    Einen Kommentar schreiben:

Lädt...
X