Ankündigung

Einklappen
Keine Ankündigung bisher.

Group Picture auf Basis des Status

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

    [Featurewunsch] Group Picture auf Basis des Status

    Hallo zusammen,

    Wär es derzeit schon möglich, das Bild einer Gruppe zu ändern aufgrund eines Stati??

    Ich habe eine Gruppe 'Haus Status' in der sich z.B. die Fensterkontakte, Lampen (alle Aus) und der Zustand des Garagentores befindet.

    Als Icon habe ich das Schild gewählt und würde dies gerne ändern, solange ein Item der Gruppe nicht Off ist.

    Viele Grüße,
    Jörg

    #2
    Hi Jörg,

    das Icon eines Items (gleich ob es "normal" oder Gruppe ist) ändert sich immer gemäß des Item-Status, wenn es ein passendes Icon zum Status gibt. Ob ein Icon passt, wird aufgrund des Namensbestandteiles hinter dem "-" entschieden.

    Generell wird also das Icon "shield.png" angezeigt, wenn der Status UNDEF ist oder nicht passend ist. Das Icon "shield-0" wird demnach dann verwendet, wenn das zugehörige Item den Status "0" annimmt, "shield-1" wenn es den Status "1" annimmt, usw..

    Für Deinen Fall könntest Du Dir also entweder ein spezielles Item für den "Allgemeinen Zustand" vom Typ "Number" anlegen und dann den Status dann per Regel setzen, oder Du kopierst das shield-icon und nennst es "shield-on.png" bzw. "shield-off.png".

    Klar geworden?

    Gruß,

    Thomas E.-E.
    Visualisierung, Rule/Logic-Engine, Integrationsplattform mit openhab (Supportforum)

    Kommentar


      #3
      Zitat von teichsta Beitrag anzeigen
      Klar geworden?

      Gruß,

      Thomas E.-E.

      Hallo Thomas,

      ja, klar geworden. Danke ;-)


      Nun habe ich aber direkt die nächste Herausforderung für mich :-/

      Ich habe an meinem Garagentor 2 Kontakte, mit denen ich den Zustand (Offen-Fährt-Geschlossen) abfragen möchte.

      Hierzu habe ich folgendes in der Items
      Code:
      [B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]
      [LEFT]Contact[/LEFT][/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055][LEFT][/LEFT][/COLOR][LEFT][/LEFT][/SIZE][LEFT][/LEFT][/COLOR][LEFT][/LEFT][/SIZE][LEFT][SIZE=2][COLOR=#000000] Tor_Garage_o [/COLOR][/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"[U]Tor[/U] [U]oben[/U] [MAP(de.map):%s]"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] (Garage) { knx=[/COLOR][/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"0/1/1"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] }[/COLOR][/SIZE][/LEFT][SIZE=2]
      [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055][LEFT]Contact[/LEFT][/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055][LEFT][/LEFT][/COLOR][LEFT][/LEFT][/SIZE][LEFT][/LEFT][/COLOR][LEFT][/LEFT][/SIZE][LEFT][SIZE=2][COLOR=#000000] Tor_Garage_u [/COLOR][/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"[U]Tor[/U] [U]unten[/U] [MAP(de.map):%s]"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] (Garage) { knx=[/COLOR][/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"0/1/2"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] }[/COLOR][/SIZE][/LEFT][SIZE=2]
      [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055][LEFT]Contact[/LEFT][/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055][LEFT][/LEFT][/COLOR][LEFT][/LEFT][/SIZE][LEFT][/LEFT][/COLOR][LEFT][/LEFT][/SIZE][LEFT][SIZE=2][COLOR=#000000] Tor_Garage [/COLOR][/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"[U]Garagentor[/U] [MAP(de.map):%s]"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#000000] <garage> (Garage)[/COLOR][/SIZE][/LEFT][SIZE=2]
      [/SIZE]
      Und folgende Rule
      Code:
      [B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]
      [LEFT]rule[/LEFT][/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055][LEFT][/LEFT][/COLOR][LEFT][/LEFT][/SIZE][LEFT][/LEFT][/COLOR][LEFT][/LEFT][/SIZE][LEFT][SIZE=2][COLOR=#000000] Garagentor[/COLOR]
      [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]when[/COLOR][/SIZE][/COLOR][/SIZE][/B][/LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]
      [/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][LEFT][/LEFT][/SIZE][LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]Item[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Tor_Garage_o [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]changed[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]or[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]Item[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] Tor_Garage_u [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]changed[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]or[/COLOR][/SIZE][/COLOR][/SIZE][/B][/LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]
      [/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][LEFT][/LEFT][/SIZE][LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]System[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]started[/COLOR][/SIZE][/COLOR][/SIZE][/B][/LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]
      [/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][LEFT][/LEFT][/SIZE][LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]then[/COLOR][/SIZE][/COLOR][/SIZE][/B][/LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]
      [/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][LEFT][/LEFT][/SIZE][LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]if[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] (Tor_Garage_o.state == CLOSED && Tor_Garage_u.state == OPEN) {
      Tor_Garage.[/SIZE][I][SIZE=2][COLOR=#ab3000][SIZE=2][COLOR=#ab3000]postUpdate[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2][COLOR=#ab3000][SIZE=2][COLOR=#ab3000][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"OPEN"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])
      } [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]else[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]if[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] (Tor_Garage_o.state == OPEN && Tor_Garage_u.state == CLOSED) {
      Tor_Garage.[/SIZE][I][SIZE=2][COLOR=#ab3000][SIZE=2][COLOR=#ab3000]postUpdate[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2][COLOR=#ab3000][SIZE=2][COLOR=#ab3000][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"CLOSED"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])
      } [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]else[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]if[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] (Tor_Garage_o.state == OPEN && Tor_Garage_u.state == OPEN) {
      Tor_Garage.[/SIZE][I][SIZE=2][COLOR=#ab3000][SIZE=2][COLOR=#ab3000]postUpdate[/COLOR][/SIZE][/COLOR][/SIZE][/I][SIZE=2][COLOR=#ab3000][SIZE=2][COLOR=#ab3000][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]([/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"MOVE"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])
      }
      [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]end[/COLOR][/SIZE][/COLOR][/SIZE][/B][/LEFT][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]
      [/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055][/COLOR][/SIZE][/COLOR][/SIZE]
      Bis auf das Move funktioniert dies auch; in der Map.e habe ich die übersetzten Texte.

      Nur Move wird halt nicht verstanden un im LOG steht
      20:59:20.654 WARN o.o.c.i.e.EventPublisherImpl[:100] - given new state is NULL,
      couldn't post update for 'Tor_Garage'
      Ich vermute einmal, dass das Item nur Closed oder Open kann?? Welches Item könnte ich denn sonst mit 3 Statis abfragen??


      Ein Helau und viele Grüße

      Joerg

      Kommentar


        #4
        Wer lesen kann ist klar im Vorteil ;-)

        Für mich etwas versteckt habe ich die Übersicht der möglichen Items gefunden. Leider steht dort auch nicht welche Werte welches item annehmen kann.

        Mit String hat es zumindest funktioniert ;-))

        VG
        Joerg

        Kommentar


          #5
          Hi Jörg,

          Zitat von JoergA Beitrag anzeigen
          Ich vermute einmal, dass das Item nur Closed oder Open kann??
          richtig! Die möglichen Status eines bestimmten Item-Typs kannst Du in den jeweiligen ItemType-Implementierungen nachlesen. Bspw. hier ContactItem.java - openhab - empowering the smart home - Google Project Hosting

          Zitat von JoergA Beitrag anzeigen
          Welches Item könnte ich denn sonst mit 3 Statis abfragen??
          ein NumberItem z.B. So wurde das hier schon in einem anderen Thread diskutiert.

          Gruß,

          Thomas E.-E.
          Visualisierung, Rule/Logic-Engine, Integrationsplattform mit openhab (Supportforum)

          Kommentar

          Lädt...
          X