OH 3.4.4 - animated energy widget aufbohren auf 4 Solarquellen

GUI Relevanten, PaperUI, BasicUI, HabPanel ...

Moderatoren: seppy, udo1toni

Antworten
Benutzeravatar
openHAB-Rookie
Beiträge: 18
Registriert: 7. Jul 2021 18:22

OH 3.4.4 - animated energy widget aufbohren auf 4 Solarquellen

Beitrag von openHAB-Rookie »

Liebe openHAB- und Solar-Mitstreiter,
ich habe auf meinem System das beschriebene widget auf zum Laufen bekommen https://community.openhab.org/t/animate ... get/133510.

Das passt soweit und gefällt mir in seiner Darstellungsweise mit meiner primären Solaranlage (Fronius Symo Gen24 Plus 10 + Akku, Solar 5,58kW auf dem Garagendach in Westausrichtung)

Leider bin ich schlicht zu dämlich, diese f7-Programmierung an den entscheidenen Punkten zu verstehen, um diese Darstellung jetzt für mich passend aufzubohren.

Ich habe neben meinem vorgenannten primären Wechselrichter noch ein kleines BKW (600W) laufen, denmächst kommen noch zwei weitere Kleinanlagen hinzu, welche am Treppenhaus in Südausrichtung an kleineren Teilflächen montiert sein werden.

FRAGE:
Wie kriege ich die Darstellung seitlich gesteckt / gespreizt, um oben vier statt einer Solaranlage zu platzieren und noch eine Benennungszeile beim Energiewert zusätzlich einzufügen (links neben der Hauptanlage mit Akkuverbindung soll der Grid also nach links wandern und noch zusätzlich drei weitere Mini-PVs mit darstellen. Im widget-Code ganz oben habe ich diese schon mal mit eingefügt als "pv_leistung_apsys", "pv_leistung_deye1k" und "pv_leistung_deye2k".
Nice to have wäre natürlich, wenn ich auch jeweils die Leistungsfluß-Linie wieder mit unter jeder PV-Anlage parallel nach unten ans Hausnetz / die Verbraucher dargestellt bekomme.

Ich scheitere wirklich schlicht am Thema das widget im Code sinnvoll umzubauen / zu erweitern.
Die Items bekomme ich hin (bzw. habe das erste kleine BKW ja schon in anderen Darstellungen mit eingebunden), also die darzustellenden Energiewerte kriege ich hin.

Vielen Dank schon mal vorab für die Deppen-Hilfe! :D

Code: Alles auswählen

uid: FRONIUS_widget
tags: []
props:
  parameters:
    - context: item
      label: Netzeinspeisung
      name: netzeinspeisung
      required: true
      type: TEXT
    - context: item
      label: Netzbezug
      name: netzbezug
      required: true
      type: TEXT
    - context: item
      label: Gesamtverbrauch
      name: gesamtverbrauch
      required: true
      type: TEXT
    - context: item
      label: PV Leistung Fronius
      name: pv_leistung_fronius
      required: true
    - context: item
      label: PV Leistung APSys
      name: pv_leistung_apsys
      required: true
    - context: item
      label: PV Leistung DEYE1k
      name: pv_leistung_deye1k
      required: true
      type: TEXT
    - context: item
      label: PV Leistung DEYE2k
      name: pv_leistung_deye2k
      required: true
    - context: item
      label: Batterieleistung
      name: batterieleistung
      required: true
      type: TEXT
    - context: item
      label: Batterie Ladezustand
      name: batterylevel
      required: true
      type: TEXT
  parameterGroups: []
timestamp: May 13, 2023, 11:09:37 AM
component: f7-card
config:
  class:
    - display-flex
    - flex-direction-column
    - align-items-center
  style:
    height: 383px
slots:
  content:
    - component: f7-block
      config:
        style:
          --f7-theme-color: var(--f7-text-color)
          display: flex
          justify-content: space-between
          padding: 0
      slots:
        default:
          - component: f7-col
            config:
              style:
                align-items: center
                display: flex
                flex-direction: row
            slots:
              default:
                - component: f7-block
                  config:
                    style:
                      align-items: center
                      display: flex
                      flex-direction: column
                      height: 110px
                      justify-content: center
                      margin-top: 0
                      width: 110px
                  slots:
                    default:
                      - component: oh-icon
                        config:
                          height: 110px
                          icon: INVERTER_grid_2
                      - component: Label
                        config:
                          style:
                            color: red
                            font-size: 25px
                            font-weight: bold
                            margin-top: -10px
                            text-align: center
                            width: 100px
                          text: =items[props.netzbezug].displayState
                          visible: '=(Number.parseFloat(items[props.netzeinspeisung].state.split(" ")[0]) == 0) ? true : false'
                      - component: Label
                        config:
                          style:
                            color: green
                            font-size: 25px
                            font-weight: bold
                            margin-top: -10px
                            text-align: center
                            width: 100px
                          text: =items[props.netzeinspeisung].displayState
                          visible: '=(Number.parseFloat(items[props.netzeinspeisung].state.split(" ")[0]) > 0) ? true : false'
          - component: f7-col
            config:
              style:
                align-items: center
                display: flex
                flex-direction: column
                flex-grow: 1
            slots:
              default:
                - component: f7-block
                  config:
                    style:
                      align-items: center
                      display: flex
                      flex-direction: column
                      height: 110px
                      justify-content: center
                      margin-top: 0
                      width: 110px
                  slots:
                    default:
                      - component: Label
                        config:
                          style:
                            color: green
                            font-size: 25px
                            font-weight: bold
                            text-align: center
                            width: 100px
                          text: =items[props.pv_leistung_fronius].displayState
                      - component: oh-icon
                        config:
                          height: 110px
                          icon: INVERTER_pv_2
                          style:
                            margin-top: -20px
                - component: f7-block
                  config:
                    style:
                      display: flex
                      justify-content: center
                      margin: 0
                      padding: 0
                      width: 100%
                  slots:
                    default:
                      - component: f7-row
                        config:
                          preserveAspectRatio: xMidYMid slice
                          style:
                            height: auto
                            width: auto
                          tag: svg
                          viewBox: 0 0 100 100
                          xmlns: http://www.w3.org/2000/svg
                        slots:
                          default:
                            - component: f7-row
                              config:
                                d: M60 -5 v10 c0 30 10 35 30 35 h20
                                fill: none
                                id: path1
                                stroke: rgba(100, 150, 200, 0.8)
                                stroke-width: 2
                                tag: path
                                vector-effect: non-scaling-stroke
                                visible: '=(Number.parseFloat(items[props.batterieleistung].state.split(" ")[0]) < 0) ? true : false'
                            - component: f7-row
                              config:
                                fill: rgba(100, 150, 200, 0.8)
                                r: 6
                                style:
                                  stroke-width: 4
                                tag: circle
                                vector-effect: non-scaling-stroke
                                visible: '=(Number.parseFloat(items[props.batterieleistung].state.split(" ")[0]) < 0) ? true : false'
                              slots:
                                default:
                                  - component: f7-row
                                    config:
                                      calcMode: linear
                                      dur: 4s
                                      repeatCount: indefinite
                                      tag: animateMotion
                                    slots:
                                      default:
                                        - component: f7-row
                                          config:
                                            tag: mpath
                                            xlink:href: "#path1"
                            - component: f7-row
                              config:
                                d: M40 -5 v10 c0 40 -10 35 -30 35 h-20
                                fill: none
                                id: path2
                                stroke: rgba(100, 150, 200, 0.8)
                                stroke-width: 2
                                tag: path
                                vector-effect: non-scaling-stroke
                                visible: '=(Number.parseFloat(items[props.netzeinspeisung].state.split(" ")[0]) > 0 && Number.parseFloat(items[props.netzbezug].state.split(" ")[0]) == 0) ? true : false'
                            - component: f7-row
                              config:
                                fill: rgba(100, 150, 200, 0.8)
                                r: 6
                                strokeWidth: 10
                                tag: circle
                                vectorEffect: non-scaling-stroke
                                visible: '=(Number.parseFloat(items[props.netzeinspeisung].state.split(" ")[0]) > 0 && Number.parseFloat(items[props.netzbezug].state.split(" ")[0]) == 0) ? true : false'
                              slots:
                                default:
                                  - component: f7-row
                                    config:
                                      calcMode: linear
                                      dur: 4s
                                      repeatCount: indefinite
                                      tag: animateMotion
                                    slots:
                                      default:
                                        - component: f7-row
                                          config:
                                            tag: mpath
                                            xlink:href: "#path2"
                            - component: f7-row
                              config:
                                d: M50, 0 v100
                                fill: none
                                id: path3
                                stroke: rgba(100, 150, 200, 0.8)
                                stroke-width: 2
                                tag: path
                                vector-effect: non-scaling-stroke
                                visible: '=(Number.parseFloat(items[props.pv_leistung].state.split(" ")[0]) - (Number.parseFloat(items[props.netzeinspeisung].state.split(" ")[0]) + Math.abs(Number.parseFloat(items[props.batterieleistung].state.split(" ")[0]))) > 0) ? true : false'
                            - component: f7-row
                              config:
                                fill: rgba(100, 150, 200, 0.8)
                                r: 6
                                strokeWidth: 10
                                tag: circle
                                vectorEffect: non-scaling-stroke
                                visible: '=(Number.parseFloat(items[props.pv_leistung].state.split(" ")[0]) - (Number.parseFloat(items[props.netzeinspeisung].state.split(" ")[0]) + Math.abs(Number.parseFloat(items[props.batterieleistung].state.split(" ")[0]))) > 0) ? true : false'
                              slots:
                                default:
                                  - component: f7-row
                                    config:
                                      calcMode: linear
                                      dur: 4s
                                      repeatCount: indefinite
                                      tag: animateMotion
                                    slots:
                                      default:
                                        - component: f7-row
                                          config:
                                            tag: mpath
                                            xlink:href: "#path3"
                            - component: f7-row
                              config:
                                d: M-5 50 l10 0 c40 0 35 10 35 50 l 0 20
                                fill: none
                                id: path4
                                stroke: rgba(100, 150, 200, 0.8)
                                stroke-width: 2
                                tag: path
                                vector-effect: non-scaling-stroke
                                visible: '=(Number.parseFloat(items[props.netzbezug].state.split(" ")[0]) > 0) ? true : false'
                            - component: f7-row
                              config:
                                fill: rgba(100, 150, 200, 0.8)
                                r: 6
                                strokeWidth: 10
                                tag: circle
                                vectorEffect: non-scaling-stroke
                                visible: '=(Number.parseFloat(items[props.netzbezug].state.split(" ")[0]) > 0) ? true : false'
                              slots:
                                default:
                                  - component: f7-row
                                    config:
                                      calcMode: linear
                                      dur: 4s
                                      repeatCount: indefinite
                                      tag: animateMotion
                                    slots:
                                      default:
                                        - component: f7-row
                                          config:
                                            tag: mpath
                                            xlink:href: "#path4"
                            - component: f7-row
                              config:
                                d: M 105 50 l -10 0 c -40 0 -35 10 -35 50 l 0 20
                                fill: none
                                id: path5
                                stroke: rgba(100, 150, 200, 0.8)
                                stroke-width: 2
                                tag: path
                                vector-effect: non-scaling-stroke
                                visible: '=(Number.parseFloat(items[props.batterieleistung].state.split(" ")[0]) > 0) ? true : false'
                            - component: f7-row
                              config:
                                fill: rgba(100, 150, 200, 0.8)
                                r: 6
                                strokeWidth: 10
                                tag: circle
                                vectorEffect: non-scaling-stroke
                                visible: '=(Number.parseFloat(items[props.batterieleistung].state.split(" ")[0]) > 0) ? true : false'
                              slots:
                                default:
                                  - component: f7-row
                                    config:
                                      calcMode: linear
                                      dur: 4s
                                      repeatCount: indefinite
                                      tag: animateMotion
                                    slots:
                                      default:
                                        - component: f7-row
                                          config:
                                            tag: mpath
                                            xlink:href: "#path5"
                - component: f7-block
                  config:
                    style:
                      align-items: center
                      display: flex
                      flex-direction: column
                      height: 110px
                      justify-content: center
                      margin-top: -10px
                      width: 110px
                  slots:
                    default:
                      - component: oh-icon
                        config:
                          color: orange
                          height: 110px
                          icon: INVERTER_consumption_2
                      - component: Label
                        config:
                          style:
                            font-size: 25px
                            font-weight: bold
                            margin-top: -10px
                            text-align: center
                            width: 100px
                          text: =items[props.gesamtverbrauch].displayState
          - component: f7-col
            config:
              style:
                align-items: center
                display: flex
                flex-direction: row
            slots:
              default:
                - component: f7-block
                  config:
                    style:
                      align-items: center
                      display: flex
                      flex-direction: column
                      height: 110px
                      justify-content: center
                      margin-top: -40px
                      width: 110px
                  slots:
                    default:
                      - component: oh-link
                        config:
                          iconColor: red
                          iconF7: battery_0
                          iconSize: 33px
                          style:
                            font-size: 25px
                            font-weight: bold
                            white-space: nowrap
                          text: =items[props.batterylevel].state
                          visible: '=(Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) < 10) ? true : false'
                      - component: oh-link
                        config:
                          iconColor: orange
                          iconF7: battery_25
                          iconSize: 33px
                          style:
                            font-size: 25px
                            font-weight: bold
                            white-space: nowrap
                          text: =items[props.batterylevel].state
                          visible: '=(Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) >= 10 && Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) < 75) ? true : false'
                      - component: oh-link
                        config:
                          iconColor: green
                          iconF7: battery_100
                          iconSize: 33px
                          style:
                            font-size: 25px
                            font-weight: bold
                            white-space: nowrap
                          text: =items[props.batterylevel].state
                          visible: '=(Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) >= 75) ? true : false'
                      - component: oh-icon
                        config:
                          height: 110px
                          icon: INVERTER_battery_2
                          style:
                            margin-top: -20px
                      - component: Label
                        config:
                          style:
                            color: '=(Number.parseFloat(items[props.batterieleistung].state.split(" ")[0]) > 0) ? "red" : "green"'
                            font-size: 25px
                            font-weight: bold
                            margin-top: -10px
                            text-align: center
                            white-space: nowrap
                            width: 100px
                          text: =Math.abs((Number.parseFloat(items[props.batterieleistung].state.split(" ")[0])).toFixed(0)) + ' W'
                          visible: '=(Number.parseFloat(items[props.batterieleistung].state.split(" ")[0]) !== 0) ? true : false'
-------------------------------
viele Grüße
openHAB-Rookie / Tommy

Benutzeravatar
openHAB-Rookie
Beiträge: 18
Registriert: 7. Jul 2021 18:22

Re: OH 3.4.4 - animated energy widget aufbohren auf 4 Solarquellen

Beitrag von openHAB-Rookie »

Hallo in die Runde,
zwischenzeitlich ist es mir in der vorhandenen Darstellung gelungen, einige Anpassungen, u.a. in der Akkusymboldarstellung hinzubekommen.

Ich habe noch arge Probleme mich in die Syntax einzudenken und wie ich weitere Darstellungen so einpflege, dass diese an der gewünschten Stelle landen, wo ich diese gerne hätte.

Code: Alles auswählen

uid: FRONIUS_widget
tags: []
props:
  parameters:
    - context: item
      label: Netzeinspeisung
      name: netzeinspeisung
      required: true
      type: TEXT
    - context: item
      label: Netzbezug
      name: netzbezug
      required: true
      type: TEXT
    - context: item
      label: Gesamtverbrauch
      name: gesamtverbrauch
      required: true
      type: TEXT
    - context: item
      label: PV Leistung
      name: pv_leistung
      required: true
      type: TEXT
    - context: item
      label: PV Leistung APSys
      name: pv_leistungapsys
      required: false
      type: TEXT
    - context: item
      label: PV Leistung DEYE1k
      name: pv_leistungdeye1k
      required: false
      type: TEXT
    - context: item
      label: PV Leistung DEYE2k
      name: pv_leistungdeye2k
      required: false
      type: TEXT
    - context: item
      label: Batterieleistung
      name: batterieleistung
      required: true
      type: TEXT
    - context: item
      label: Batterie Ladezustand
      name: batterylevel
      required: true
      type: TEXT
  parameterGroups: []
timestamp: May 15, 2023, 1:35:48 PM
component: f7-card
config:
  class:
    - display-flex
    - flex-direction-column
    - align-items-center
  style:
    height: 383px
slots:
  content:
    - component: f7-block
      config:
        style:
          --f7-theme-color: var(--f7-text-color)
          display: flex
          justify-content: space-between
          padding: 0
      slots:
        default:
          - component: f7-col
            config:
              style:
                align-items: center
                display: flex
                flex-direction: row
            slots:
              default:
                - component: f7-block
                  config:
                    style:
                      align-items: center
                      display: flex
                      flex-direction: column
                      height: 110px
                      justify-content: center
                      margin-top: 0
                      width: 110px
                  slots:
                    default:
                      - component: oh-icon
                        config:
                          height: 110px
                          icon: INVERTER_grid_2
                      - component: Label
                        config:
                          style:
                            color: red
                            font-size: 25px
                            font-weight: bold
                            margin-top: -10px
                            text-align: center
                            white-space: nowrap
                            width: 100px
                          text: =(Number.parseFloat(items[props.netzbezug].state.split(" ")[0]) - Number.parseFloat(items[props.netzeinspeisung].state.split(" ")[0])) + " W"
                          visible: '=(Number.parseFloat(items[props.netzbezug].state.split(" ")[0]) - Number.parseFloat(items[props.netzeinspeisung].state.split(" ")[0])   > 0) ? true : false'
                      - component: Label
                        config:
                          style:
                            color: green
                            font-size: 25px
                            font-weight: bold
                            margin-top: -10px
                            text-align: center
                            white-space: nowrap
                            width: 100px
                          text: =((Number.parseFloat(items[props.netzbezug].state.split(" ")[0]) - Number.parseFloat(items[props.netzeinspeisung].state.split(" ")[0])) * -1) + " W"
                          visible: '=(Number.parseFloat(items[props.netzbezug].state.split(" ")[0]) - Number.parseFloat(items[props.netzeinspeisung].state.split(" ")[0])   < 0) ? true : false'
          - component: f7-col
            config:
              style:
                align-items: center
                display: flex
                flex-direction: column
                flex-grow: 1
            slots:
              default:
                - component: f7-block
                  config:
                    style:
                      align-items: center
                      display: flex
                      flex-direction: column
                      height: 110px
                      justify-content: center
                      margin-top: 0
                      width: 110px
                  slots:
                    default:
                      - component: Label
                        config:
                          style:
                            font-size: 25px
                            font-weight: bold
                            text-align: center
                            white-space: wrap
                            width: 100px
                          text: ="Fronius "
                      - component: Label
                        config:
                          style:
                            color: orange
                            font-size: 25px
                            font-weight: bold
                            text-align: center
                            white-space: wrap
                            width: 100px
                          text: =items[props.pv_leistung].displayState
                      - component: oh-icon
                        config:
                          height: 110px
                          icon: INVERTER_pv_2
                          style:
                            margin-top: -20px
                - component: f7-block
                  config:
                    style:
                      display: flex
                      justify-content: center
                      margin: 0
                      padding: 0
                      width: 100%
                  slots:
                    default:
                      - component: f7-row
                        config:
                          preserveAspectRatio: xMidYMid slice
                          style:
                            height: auto
                            width: auto
                          tag: svg
                          viewBox: 0 0 100 100
                          xmlns: http://www.w3.org/2000/svg
                        slots:
                          default:
                            - component: f7-row
                              config:
                                d: M60 -5 v10 c0 30 10 35 30 35 h20
                                fill: none
                                id: path1
                                stroke: rgba(100, 150, 200, 0.8)
                                stroke-width: 2
                                tag: path
                                vector-effect: non-scaling-stroke
                                visible: '=(items[props.batterieleistung].state.split(" ")[0]) < 0 ? true : false'
                            - component: f7-row
                              config:
                                fill: rgba(100, 150, 200, 0.8)
                                r: 6
                                style:
                                  stroke-width: 4
                                tag: circle
                                vector-effect: non-scaling-stroke
                                visible: '=(items[props.batterieleistung].state.split(" ")[0]) < 0 ? true : false'
                              slots:
                                default:
                                  - component: f7-row
                                    config:
                                      calcMode: linear
                                      dur: 4s
                                      repeatCount: indefinite
                                      tag: animateMotion
                                    slots:
                                      default:
                                        - component: f7-row
                                          config:
                                            tag: mpath
                                            xlink:href: "#path1"
                            - component: f7-row
                              config:
                                d: M40 -5 v10 c0 40 -10 35 -30 35 h-20
                                fill: none
                                id: path2
                                stroke: rgba(100, 150, 200, 0.8)
                                stroke-width: 2
                                tag: path
                                vector-effect: non-scaling-stroke
                                visible: '=(Number.parseFloat(items[props.netzeinspeisung].state.split(" ")[0]) > 0 && Number.parseFloat(items[props.netzbezug].state.split(" ")[0]) == 0) ? true : false'
                            - component: f7-row
                              config:
                                fill: rgba(100, 150, 200, 0.8)
                                r: 6
                                strokeWidth: 10
                                tag: circle
                                vectorEffect: non-scaling-stroke
                                visible: '=(Number.parseFloat(items[props.netzeinspeisung].state.split(" ")[0]) > 0 && Number.parseFloat(items[props.netzbezug].state.split(" ")[0]) == 0) ? true : false'
                              slots:
                                default:
                                  - component: f7-row
                                    config:
                                      calcMode: linear
                                      dur: 4s
                                      repeatCount: indefinite
                                      tag: animateMotion
                                    slots:
                                      default:
                                        - component: f7-row
                                          config:
                                            tag: mpath
                                            xlink:href: "#path2"
                            - component: f7-row
                              config:
                                d: M50, 0 v100
                                fill: none
                                id: path3
                                stroke: rgba(100, 150, 200, 0.8)
                                stroke-width: 2
                                tag: path
                                vector-effect: non-scaling-stroke
                                visible: '=(Number.parseFloat(items[props.pv_leistung].state.split(" ")[0])) > 1 ? true : false'
                            - component: f7-row
                              config:
                                fill: rgba(100, 150, 200, 0.8)
                                r: 6
                                strokeWidth: 10
                                tag: circle
                                vectorEffect: non-scaling-stroke
                                visible: '=(Number.parseFloat(items[props.pv_leistung].state.split(" ")[0])) > 1 ? true : false'
                              slots:
                                default:
                                  - component: f7-row
                                    config:
                                      calcMode: linear
                                      dur: 4s
                                      repeatCount: indefinite
                                      tag: animateMotion
                                    slots:
                                      default:
                                        - component: f7-row
                                          config:
                                            tag: mpath
                                            xlink:href: "#path3"
                            - component: f7-row
                              config:
                                d: M-5 50 l10 0 c40 0 35 10 35 50 l 0 20
                                fill: none
                                id: path4
                                stroke: rgba(100, 150, 200, 0.8)
                                stroke-width: 2
                                tag: path
                                vector-effect: non-scaling-stroke
                                visible: '=(Number.parseFloat(items[props.netzbezug].state.split(" ")[0]) > 0) ? true : false'
                            - component: f7-row
                              config:
                                fill: rgba(100, 150, 200, 0.8)
                                r: 6
                                strokeWidth: 10
                                tag: circle
                                vectorEffect: non-scaling-stroke
                                visible: '=(Number.parseFloat(items[props.netzbezug].state.split(" ")[0]) > 0) ? true : false'
                              slots:
                                default:
                                  - component: f7-row
                                    config:
                                      calcMode: linear
                                      dur: 4s
                                      repeatCount: indefinite
                                      tag: animateMotion
                                    slots:
                                      default:
                                        - component: f7-row
                                          config:
                                            tag: mpath
                                            xlink:href: "#path4"
                            - component: f7-row
                              config:
                                d: M 105 50 l -10 0 c -40 0 -35 10 -35 50 l 0 20
                                fill: none
                                id: path5
                                stroke: rgba(100, 150, 200, 0.8)
                                stroke-width: 2
                                tag: path
                                vector-effect: non-scaling-stroke
                                visible: '=(Number.parseFloat(items[props.batterieleistung].state.split(" ")[0]) > 0) ? true : false'
                            - component: f7-row
                              config:
                                fill: rgba(100, 150, 200, 0.8)
                                r: 6
                                strokeWidth: 10
                                tag: circle
                                vectorEffect: non-scaling-stroke
                                visible: '=(Number.parseFloat(items[props.batterieleistung].state.split(" ")[0]) > 0) ? true : false'
                              slots:
                                default:
                                  - component: f7-row
                                    config:
                                      calcMode: linear
                                      dur: 4s
                                      repeatCount: indefinite
                                      tag: animateMotion
                                    slots:
                                      default:
                                        - component: f7-row
                                          config:
                                            tag: mpath
                                            xlink:href: "#path5"
                - component: f7-block
                  config:
                    style:
                      align-items: center
                      display: flex
                      flex-direction: column
                      height: 110px
                      justify-content: center
                      margin-top: -10px
                      width: 110px
                  slots:
                    default:
                      - component: oh-icon
                        config:
                          color: orange
                          height: 110px
                          icon: INVERTER_consumption_2
                      - component: Label
                        config:
                          style:
                            font-size: 25px
                            font-weight: bold
                            margin-top: -10px
                            text-align: center
                            white-space: nowrap
                            width: 100px
                          text: =items[props.gesamtverbrauch].displayState
          - component: f7-col
            config:
              style:
                align-items: center
                display: flex
                flex-direction: row
            slots:
              default:
                - component: f7-block
                  config:
                    style:
                      align-items: center
                      display: flex
                      flex-direction: column
                      height: 110px
                      justify-content: center
                      margin-top: -40px
                      width: 110px
                  slots:
                    default:
                      - component: oh-icon
                        config:
                          height: 40em
                          icon: akku_12
                          visible: '=(Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) <= 12) ? true : false'
                      - component: oh-link
                        config:
                          style:
                            font-size: 20px
                            font-weight: bold
                            white-space: nowrap
                          text: =items[props.batterylevel].state
                          visible: '=(Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) <= 12) ? true : false'
                      - component: oh-icon
                        config:
                          height: 40em
                          icon: akku_12
                          visible: '=(Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) > 12 && Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) < 25) ? true : false'
                      - component: oh-link
                        config:
                          style:
                            font-size: 20px
                            font-weight: bold
                            white-space: nowrap
                          text: =items[props.batterylevel].state
                          visible: '=(Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) > 12 && Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) < 25) ? true : false'
                      - component: oh-icon
                        config:
                          height: 40em
                          icon: akku_25
                          visible: '=(Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) >= 25 && Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) < 50) ? true : false'
                      - component: oh-link
                        config:
                          style:
                            font-size: 20px
                            font-weight: bold
                            white-space: nowrap
                          text: =items[props.batterylevel].state
                          visible: '=(Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) >= 25 && Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) < 50) ? true : false'
                      - component: oh-icon
                        config:
                          height: 40em
                          icon: akku_50
                          visible: '=(Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) >= 50 && Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) < 75) ? true : false'
                      - component: oh-link
                        config:
                          style:
                            font-size: 20px
                            font-weight: bold
                            white-space: nowrap
                          text: =items[props.batterylevel].state
                          visible: '=(Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) >= 50 && Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) < 75) ? true : false'
                      - component: oh-icon
                        config:
                          height: 40em
                          icon: akku_75
                          visible: '=(Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) >= 75 && Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) < 90) ? true : false'
                      - component: oh-link
                        config:
                          style:
                            font-size: 20px
                            font-weight: bold
                            white-space: nowrap
                          text: =items[props.batterylevel].state
                          visible: '=(Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) >= 75 && Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) < 90) ? true : false'
                      - component: oh-icon
                        config:
                          height: 40em
                          icon: akku_90
                          visible: '=(Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) >= 90 && Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) < 99) ? true : false'
                      - component: oh-link
                        config:
                          style:
                            font-size: 20px
                            font-weight: bold
                            white-space: nowrap
                          text: =items[props.batterylevel].state
                          visible: '=(Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) >= 90 && Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) < 99) ? true : false'
                      - component: oh-icon
                        config:
                          height: 40em
                          icon: akku_100
                          visible: '=(Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) > 99) ? true : false'
                      - component: oh-link
                        config:
                          style:
                            font-size: 20px
                            font-weight: bold
                            white-space: nowrap
                          text: =items[props.batterylevel].state
                          visible: '=(Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) > 99) ? true : false'
                      - component: oh-icon
                        config:
                          height: 110px
                          icon: INVERTER_battery_2
                          style:
                            margin-top: -20px
                      - component: Label
                        config:
                          style:
                            color: '=(Number.parseFloat(items[props.batterieleistung].state.split(" ")[0]) > 0) ? "red" : "green"'
                            font-size: 25px
                            font-weight: bold
                            margin-top: -10px
                            text-align: center
                            white-space: nowrap
                            width: 100px
                          text: =(Number.parseFloat(items[props.batterieleistung].state.split(" ")[0])).toFixed(0) + "  W"
                          visible: '=(Number.parseFloat(items[props.batterieleistung].state.split(" ")[0]) > 0) ? true : false'
                      - component: Label
                        config:
                          style:
                            color: '=(Number.parseFloat(items[props.batterieleistung].state.split(" ")[0]) < 0) ? "green" : "red"'
                            font-size: 25px
                            font-weight: bold
                            margin-top: -10px
                            text-align: center
                            white-space: nowrap
                            width: 100px
                          text: =(Number.parseFloat(items[props.batterieleistung].state.split(" ")[0]) * -1).toFixed(0) + " W"
                          visible: '=(Number.parseFloat(items[props.batterieleistung].state.split(" ")[0]) < 0) ? true : false'
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
-------------------------------
viele Grüße
openHAB-Rookie / Tommy

Benutzeravatar
openHAB-Rookie
Beiträge: 18
Registriert: 7. Jul 2021 18:22

Re: OH 3.4.4 - animated energy widget aufbohren auf 4 Solarquellen

Beitrag von openHAB-Rookie »

Hallo an alle,
ich habe nach ewigem herumpuzzlen eine Anordnung hin bekommen.

Leider klappt es nicht, die Animation weiter bis nach links laufen zu lassen an das Verbraucher Icon. Dies kollidiert dann mit den darüber liegenden Batteriesymbol.

Habe ihr Tipps zur Umsetzung für mich für eine der beiden möglichen Lösungen ??

a.) ENTWEDER die Amination des Stromflusses so anzupassen, dass man diese sozusagen in Ebenen legt, so dass dann alle drei kleinen Mini-PVs (APSys, DEYE 1k und DEYE 2k) ihren Stromfluss direkt zum Verbrauchernetz doch zeigen, ohne die bestehende Grafik zu verwürfeln

b.) ODER ganz unten hinter dem Verbraucher Icon noch einen breiten grünen Streifen sozusagen als Sammellinie aller meiner Verbraucher zu hinterlegen und ich lasse die Mini-PV Animationen des Energieflusses nur gerade herunter laufen.

Ich denke, dass ich nach wie vor einen massiven Mangel an Verständnis habe, wie man die Darstellungen absolut positioniert. Das Zusammenkopieren und Herumdrehen an der relativen Positionswerten ist sicher nicht der beste Weg...

vielen Dank vorab für eure Unterstützung und ein schönes Wochenende!

Code: Alles auswählen

uid: FRONIUS_widget
tags: []
props:
  parameters:
    - context: item
      label: Netzeinspeisung
      name: netzeinspeisung
      required: true
      type: TEXT
    - context: item
      label: Netzbezug
      name: netzbezug
      required: true
      type: TEXT
    - context: item
      label: Gesamtverbrauch
      name: gesamtverbrauch
      required: true
      type: TEXT
    - context: item
      label: PV Leistung
      name: pv_leistung
      required: true
      type: TEXT
    - context: item
      label: PV Leistung APSys
      name: pv_leistungapsys
      required: false
      type: TEXT
    - context: item
      label: PV Leistung DEYE1k
      name: pv_leistungdeye1k
      required: false
      type: TEXT
    - context: item
      label: PV Leistung DEYE2k
      name: pv_leistungdeye2k
      required: false
      type: TEXT
    - context: item
      label: Batterieleistung
      name: batterieleistung
      required: true
      type: TEXT
    - context: item
      label: Batterie Ladezustand
      name: batterylevel
      required: true
      type: TEXT
  parameterGroups: []
timestamp: May 20, 2023, 11:54:36 AM
component: f7-card
config:
  class:
    - display-flex
    - flex-direction-column
    - align-items-center
  style:
    height: 512px
slots:
  content:
    - component: f7-block
      config:
        style:
          --f7-theme-color: var(--f7-text-color)
          display: flex
          justify-content: space-between
          padding: 0
      slots:
        default:
          - component: f7-col
            config:
              style:
                align-items: center
                display: flex
                flex-direction: row
            slots:
              default:
                - component: f7-block
                  config:
                    style:
                      align-items: center
                      display: flex
                      flex-direction: column
                      height: 110px
                      justify-content: center
                      margin-top: 0
                      width: 110px
                  slots:
                    default:
                      - component: oh-icon
                        config:
                          height: 110px
                          icon: INVERTER_grid_2
                          style:
                            margin-top: -130px
                      - component: Label
                        config:
                          style:
                            color: red
                            font-size: 20px
                            font-weight: bold
                            margin-top: -16px
                            text-align: center
                            white-space: nowrap
                            width: 100px
                          text: =(Number.parseFloat(items[props.netzbezug].state.split(" ")[0]) - Number.parseFloat(items[props.netzeinspeisung].state.split(" ")[0])) + " W"
                          visible: '=(Number.parseFloat(items[props.netzbezug].state.split(" ")[0]) - Number.parseFloat(items[props.netzeinspeisung].state.split(" ")[0])   > 0) ? true : false'
                      - component: Label
                        config:
                          style:
                            color: green
                            font-size: 20px
                            font-weight: bold
                            margin-top: -16px
                            text-align: center
                            white-space: nowrap
                            width: 100px
                          text: =((Number.parseFloat(items[props.netzbezug].state.split(" ")[0]) - Number.parseFloat(items[props.netzeinspeisung].state.split(" ")[0])) * -1) + " W"
                          visible: '=(Number.parseFloat(items[props.netzbezug].state.split(" ")[0]) - Number.parseFloat(items[props.netzeinspeisung].state.split(" ")[0])   < 0) ? true : false'
          - component: f7-col
            config:
              style:
                align-items: center
                display: flex
                flex-direction: column
                flex-grow: 1
            slots:
              default:
                - component: f7-block
                  config:
                    style:
                      align-items: center
                      display: flex
                      flex-direction: column
                      height: 110px
                      justify-content: center
                      margin-top: 0
                      width: 110px
                  slots:
                    default:
                      - component: Label
                        config:
                          style:
                            font-size: 20px
                            font-weight: bold
                            text-align: center
                            white-space: wrap
                            width: 100px
                          text: ="Fronius"
                      - component: Label
                        config:
                          style:
                            color: orange
                            font-size: 20px
                            font-weight: bold
                            text-align: center
                            white-space: wrap
                            width: 100px
                          text: =items[props.pv_leistung].displayState
                      - component: oh-icon
                        config:
                          height: 110px
                          icon: INVERTER_pv_2
                          style:
                            margin-top: -30px
                - component: f7-block
                  config:
                    style:
                      display: flex
                      justify-content: center
                      margin: 0
                      padding: 0
                      width: 100%
                  slots:
                    default:
                      - component: f7-row
                        config:
                          preserveAspectRatio: xMidYMid slice
                          style:
                            height: auto
                            width: auto
                          tag: svg
                          viewBox: 0 0 100 100
                          xmlns: http://www.w3.org/2000/svg
                        slots:
                          default:
                            - component: f7-row
                              config:
                                d: M60 -5 v10 c0 30 10 35 30 35 h20
                                fill: none
                                id: path1
                                stroke: rgba(100, 150, 200, 0.8)
                                stroke-width: 2
                                tag: path
                                vector-effect: non-scaling-stroke
                                visible: '=(items[props.batterieleistung].state.split(" ")[0]) < 0 ? true : false'
                            - component: f7-row
                              config:
                                fill: rgba(100, 150, 200, 0.8)
                                r: 6
                                style:
                                  stroke-width: 4
                                tag: circle
                                vector-effect: non-scaling-stroke
                                visible: '=(items[props.batterieleistung].state.split(" ")[0]) < 0 ? true : false'
                              slots:
                                default:
                                  - component: f7-row
                                    config:
                                      calcMode: linear
                                      dur: 4s
                                      repeatCount: indefinite
                                      tag: animateMotion
                                    slots:
                                      default:
                                        - component: f7-row
                                          config:
                                            tag: mpath
                                            xlink:href: "#path1"
                            - component: f7-row
                              config:
                                d: M40 -5 v10 c0 40 -10 35 -30 35 h-20
                                fill: none
                                id: path2
                                stroke: rgba(100, 150, 200, 0.8)
                                stroke-width: 2
                                tag: path
                                vector-effect: non-scaling-stroke
                                visible: '=(Number.parseFloat(items[props.netzeinspeisung].state.split(" ")[0]) > 0 && Number.parseFloat(items[props.netzbezug].state.split(" ")[0]) == 0) ? true : false'
                            - component: f7-row
                              config:
                                fill: rgba(100, 150, 200, 0.8)
                                r: 6
                                strokeWidth: 10
                                tag: circle
                                vectorEffect: non-scaling-stroke
                                visible: '=(Number.parseFloat(items[props.netzeinspeisung].state.split(" ")[0]) > 0 && Number.parseFloat(items[props.netzbezug].state.split(" ")[0]) == 0) ? true : false'
                              slots:
                                default:
                                  - component: f7-row
                                    config:
                                      calcMode: linear
                                      dur: 4s
                                      repeatCount: indefinite
                                      tag: animateMotion
                                    slots:
                                      default:
                                        - component: f7-row
                                          config:
                                            tag: mpath
                                            xlink:href: "#path2"
                            - component: f7-row
                              config:
                                d: M50, 0 v100
                                fill: none
                                id: path3
                                stroke: rgba(100, 150, 200, 0.8)
                                stroke-width: 2
                                tag: path
                                vector-effect: non-scaling-stroke
                                visible: '=(Number.parseFloat(items[props.pv_leistung].state.split(" ")[0])) > 1 ? true : false'
                            - component: f7-row
                              config:
                                fill: rgba(100, 150, 200, 0.8)
                                r: 6
                                strokeWidth: 10
                                tag: circle
                                vectorEffect: non-scaling-stroke
                                visible: '=(Number.parseFloat(items[props.pv_leistung].state.split(" ")[0])) > 1 ? true : false'
                              slots:
                                default:
                                  - component: f7-row
                                    config:
                                      calcMode: linear
                                      dur: 4s
                                      repeatCount: indefinite
                                      tag: animateMotion
                                    slots:
                                      default:
                                        - component: f7-row
                                          config:
                                            tag: mpath
                                            xlink:href: "#path3"
                            - component: f7-row
                              config:
                                d: M-5 50 l10 0 c40 0 35 10 35 50 l 0 20
                                fill: none
                                id: path4
                                stroke: rgba(100, 150, 200, 0.8)
                                stroke-width: 2
                                tag: path
                                vector-effect: non-scaling-stroke
                                visible: '=(Number.parseFloat(items[props.netzbezug].state.split(" ")[0]) > 0) ? true : false'
                            - component: f7-row
                              config:
                                fill: rgba(100, 150, 200, 0.8)
                                r: 6
                                strokeWidth: 10
                                tag: circle
                                vectorEffect: non-scaling-stroke
                                visible: '=(Number.parseFloat(items[props.netzbezug].state.split(" ")[0]) > 0) ? true : false'
                              slots:
                                default:
                                  - component: f7-row
                                    config:
                                      calcMode: linear
                                      dur: 4s
                                      repeatCount: indefinite
                                      tag: animateMotion
                                    slots:
                                      default:
                                        - component: f7-row
                                          config:
                                            tag: mpath
                                            xlink:href: "#path4"
                            - component: f7-row
                              config:
                                d: M 105 50 l -10 0 c -40 0 -35 10 -35 50 l 0 20
                                fill: none
                                id: path5
                                stroke: rgba(100, 150, 200, 0.8)
                                stroke-width: 2
                                tag: path
                                vector-effect: non-scaling-stroke
                                visible: '=(Number.parseFloat(items[props.batterieleistung].state.split(" ")[0]) > 0) ? true : false'
                            - component: f7-row
                              config:
                                fill: rgba(100, 150, 200, 0.8)
                                r: 6
                                strokeWidth: 10
                                tag: circle
                                vectorEffect: non-scaling-stroke
                                visible: '=(Number.parseFloat(items[props.batterieleistung].state.split(" ")[0]) > 0) ? true : false'
                              slots:
                                default:
                                  - component: f7-row
                                    config:
                                      calcMode: linear
                                      dur: 4s
                                      repeatCount: indefinite
                                      tag: animateMotion
                                    slots:
                                      default:
                                        - component: f7-row
                                          config:
                                            tag: mpath
                                            xlink:href: "#path5"
                - component: f7-block
                  config:
                    style:
                      align-items: center
                      display: flex
                      flex-direction: column
                      height: 110px
                      justify-content: center
                      margin-top: -10px
                      width: 110px
                  slots:
                    default:
                      - component: oh-icon
                        config:
                          height: 90px
                          icon: inverter_fronius_gen_24
                      - component: Label
                - component: f7-block
                  config:
                    style:
                      display: flex
                      justify-content: center
                      margin: 0
                      padding: 0
                      width: 100%
                  slots:
                    default:
                      - component: f7-row
                        config:
                          preserveAspectRatio: xMidYMid slice
                          style:
                            height: auto
                            width: auto
                          tag: svg
                          viewBox: 0 0 100 100
                          xmlns: http://www.w3.org/2000/svg
                        slots:
                          default:
                            - component: f7-row
                              config:
                                d: M50, 0 v100
                                fill: none
                                id: path9
                                stroke: rgba(100, 150, 200, 0.8)
                                stroke-width: 2
                                tag: path
                                vector-effect: non-scaling-stroke
                                visible: '=(Number.parseFloat(items[props.gesamtverbrauch].state.split(" ")[0])) < 1 ? true : false'
                            - component: f7-row
                              config:
                                fill: rgba(100, 150, 200, 0.8)
                                r: 6
                                strokeWidth: 10
                                tag: circle
                                vectorEffect: non-scaling-stroke
                                visible: '=(Number.parseFloat(items[props.gesamtverbrauch].state.split(" ")[0])) < 1 ? true : false'
                              slots:
                                default:
                                  - component: f7-row
                                    config:
                                      calcMode: linear
                                      dur: 4s
                                      repeatCount: indefinite
                                      tag: animateMotion
                                    slots:
                                      default:
                                        - component: f7-row
                                          config:
                                            tag: mpath
                                            xlink:href: "#path9"
                - component: f7-block
                  config:
                    style:
                      align-items: center
                      display: flex
                      flex-direction: column
                      height: 110px
                      margin-top: -80px
                      width: 110px
                  slots:
                    default:
                      - component: oh-icon
                        config:
                          height: 110px
                          icon: consumption
                      - component: Label
                        config:
                          style:
                            color: '=(Number.parseFloat(items[props.gesamtverbrauch].state.split(" ")[0]) > 0) ? "green" : "red"'
                            font-size: 20px
                            font-weight: bold
                            margin-top: -18px
                            text-align: center
                            white-space: nowrap
                            width: 100px
                          text: =(Number.parseFloat(items[props.gesamtverbrauch].state.split(" ")[0])).toFixed(0) + "  W"
                          visible: '=(Number.parseFloat(items[props.gesamtverbrauch].state.split(" ")[0]) > 0) ? true : false'
                      - component: Label
                        config:
                          style:
                            color: '=(Number.parseFloat(items[props.gesamtverbrauch].state.split(" ")[0]) < 0) ? "red" : "green"'
                            font-size: 20px
                            font-weight: bold
                            margin-top: -18px
                            text-align: center
                            white-space: nowrap
                            width: 100px
                          text: =(Number.parseFloat(items[props.gesamtverbrauch].state.split(" ")[0]) * -1).toFixed(0) + " W"
                          visible: '=(Number.parseFloat(items[props.gesamtverbrauch].state.split(" ")[0]) < 0) ? true : false'
          - component: f7-col
            config:
              style:
                align-items: center
                display: flex
                flex-direction: row
            slots:
              default:
                - component: f7-block
                  config:
                    style:
                      align-items: center
                      display: flex
                      flex-direction: column
                      height: 110px
                      justify-content: center
                      margin-top: -40px
                      width: 110px
                  slots:
                    default:
                      - component: oh-icon
                        config:
                          height: 40em
                          icon: akku_0
                          style:
                            margin-top: -160px
                          visible: '=(Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) <= 12) ? true : false'
                      - component: oh-link
                        config:
                          style:
                            font-size: 20px
                            font-weight: bold
                            white-space: nowrap
                          text: =items[props.batterylevel].state
                          visible: '=(Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) <= 12) ? true : false'
                      - component: oh-icon
                        config:
                          height: 40em
                          icon: akku_12
                          style:
                            margin-top: -160px
                          visible: '=(Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) > 12 && Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) < 25) ? true : false'
                      - component: oh-link
                        config:
                          style:
                            font-size: 20px
                            font-weight: bold
                            white-space: nowrap
                          text: =items[props.batterylevel].state
                          visible: '=(Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) > 12 && Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) < 25) ? true : false'
                      - component: oh-icon
                        config:
                          height: 40em
                          icon: akku_25
                          style:
                            margin-top: -130px
                          visible: '=(Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) >= 25 && Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) < 50) ? true : false'
                      - component: oh-link
                        config:
                          style:
                            font-size: 20px
                            font-weight: bold
                            white-space: nowrap
                          text: =items[props.batterylevel].state
                          visible: '=(Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) >= 25 && Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) < 50) ? true : false'
                      - component: oh-icon
                        config:
                          height: 40em
                          icon: akku_50
                          style:
                            margin-top: -160px
                          visible: '=(Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) >= 50 && Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) < 75) ? true : false'
                      - component: oh-link
                        config:
                          style:
                            font-size: 20px
                            font-weight: bold
                            white-space: nowrap
                          text: =items[props.batterylevel].state
                          visible: '=(Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) >= 50 && Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) < 75) ? true : false'
                      - component: oh-icon
                        config:
                          height: 40em
                          icon: akku_75
                          style:
                            margin-top: -160px
                          visible: '=(Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) >= 75 && Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) < 90) ? true : false'
                      - component: oh-link
                        config:
                          style:
                            font-size: 20px
                            font-weight: bold
                            white-space: nowrap
                          text: =items[props.batterylevel].state
                          visible: '=(Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) >= 75 && Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) < 90) ? true : false'
                      - component: oh-icon
                        config:
                          height: 40em
                          icon: akku_90
                          style:
                            margin-top: -160px
                          visible: '=(Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) >= 90 && Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) < 99) ? true : false'
                      - component: oh-link
                        config:
                          style:
                            font-size: 20px
                            font-weight: bold
                            white-space: nowrap
                          text: =items[props.batterylevel].state
                          visible: '=(Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) >= 90 && Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) < 99) ? true : false'
                      - component: oh-icon
                        config:
                          height: 40em
                          icon: akku_100
                          style:
                            margin-top: -160px
                          visible: '=(Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) > 99) ? true : false'
                      - component: oh-link
                        config:
                          style:
                            font-size: 20px
                            font-weight: bold
                            white-space: nowrap
                          text: =items[props.batterylevel].state
                          visible: '=(Number.parseFloat(items[props.batterylevel].state.split(" ")[0]) > 99) ? true : false'
                      - component: oh-icon
                        config:
                          height: 110px
                          icon: BATTERY_pv
                          style:
                            margin-top: -10px
                      - component: Label
                        config:
                          style:
                            color: '=(Number.parseFloat(items[props.batterieleistung].state.split(" ")[0]) > 0) ? "red" : "green"'
                            font-size: 20px
                            font-weight: bold
                            margin-top: 0
                            text-align: center
                            white-space: nowrap
                            width: 100px
                          text: =(Number.parseFloat(items[props.batterieleistung].state.split(" ")[0])).toFixed(0) + "  W"
                          visible: '=(Number.parseFloat(items[props.batterieleistung].state.split(" ")[0]) > 0) ? true : false'
                      - component: Label
                        config:
                          style:
                            color: '=(Number.parseFloat(items[props.batterieleistung].state.split(" ")[0]) < 0) ? "green" : "red"'
                            font-size: 20px
                            font-weight: bold
                            margin-top: 0
                            text-align: center
                            white-space: nowrap
                            width: 100px
                          text: =(Number.parseFloat(items[props.batterieleistung].state.split(" ")[0]) * -1).toFixed(0) + " W"
                          visible: '=(Number.parseFloat(items[props.batterieleistung].state.split(" ")[0]) < 0) ? true : false'
          - component: f7-col
            config:
              style:
                align-items: center
                display: flex
                flex-direction: column
                flex-grow: 1
            slots:
              default:
                - component: f7-block
                  config:
                    style:
                      align-items: center
                      display: flex
                      flex-direction: column
                      height: 110px
                      justify-content: center
                      margin-top: 0
                      width: 110px
                  slots:
                    default:
                      - component: Label
                        config:
                          style:
                            font-size: 20px
                            font-weight: bold
                            text-align: center
                            white-space: wrap
                            width: 100px
                          text: ="APSys"
                      - component: Label
                        config:
                          style:
                            color: orange
                            font-size: 20px
                            font-weight: bold
                            text-align: center
                            white-space: wrap
                            width: 100px
                          text: =items[props.pv_leistungapsys].displayState
                      - component: oh-icon
                        config:
                          height: 110px
                          icon: INVERTER_pv_2
                          style:
                            margin-top: -30px
                - component: f7-block
                  config:
                    style:
                      display: flex
                      justify-content: center
                      margin: 0
                      padding: 0
                      width: 100%
                  slots:
                    default:
                      - component: f7-row
                        config:
                          preserveAspectRatio: xMidYMid slice
                          style:
                            height: auto
                            width: auto
                          tag: svg
                          viewBox: 0 0 100 300
                          xmlns: http://www.w3.org/2000/svg
                        slots:
                          default:
                            - component: f7-row
                              config:
                                d: M40 -5 v230 c0 40 -10 35 -30 35 h-20
                                fill: none
                                id: path6
                                stroke: rgba(100, 150, 200, 0.8)
                                stroke-width: 2
                                tag: path
                                vector-effect: non-scaling-stroke
                                visible: '=(Number.parseFloat(items[props.pv_leistungapsys].state.split(" ")[0]) > 0 ) ? true : false'
                            - component: f7-row
                              config:
                                fill: rgba(100, 150, 200, 0.8)
                                r: 6
                                strokeWidth: 10
                                tag: circle
                                vectorEffect: non-scaling-stroke
                                visible: '=(Number.parseFloat(items[props.pv_leistungapsys].state.split(" ")[0]) > 0 ) ? true : false'
                              slots:
                                default:
                                  - component: f7-row
                                    config:
                                      calcMode: linear
                                      dur: 4s
                                      repeatCount: indefinite
                                      tag: animateMotion
                                    slots:
                                      default:
                                        - component: f7-row
                                          config:
                                            tag: mpath
                                            xlink:href: "#path6"
          - component: f7-col
            config:
              style:
                align-items: center
                display: flex
                flex-direction: column
                flex-grow: 1
            slots:
              default:
                - component: f7-block
                  config:
                    style:
                      align-items: center
                      display: flex
                      flex-direction: column
                      height: 110px
                      justify-content: center
                      margin-top: 0
                      width: 110px
                  slots:
                    default:
                      - component: Label
                        config:
                          style:
                            font-size: 20px
                            font-weight: bold
                            text-align: center
                            white-space: wrap
                            width: 100px
                          text: ="DEYE 1K"
                      - component: Label
                        config:
                          style:
                            color: orange
                            font-size: 20px
                            font-weight: bold
                            text-align: center
                            white-space: wrap
                            width: 100px
                          text: =items[props.pv_leistungdeye1k].displayState
                      - component: oh-icon
                        config:
                          height: 110px
                          icon: INVERTER_pv_2
                          style:
                            margin-top: -30px
                - component: f7-block
                  config:
                    style:
                      display: flex
                      justify-content: center
                      margin: 0
                      padding: 0
                      width: 100%
                  slots:
                    default:
                      - component: f7-row
                        config:
                          preserveAspectRatio: xMidYMid slice
                          style:
                            height: auto
                            width: auto
                          tag: svg
                          viewBox: 0 0 100 100
                          xmlns: http://www.w3.org/2000/svg
                        slots:
                          default:
                            - component: f7-row
                              config:
                                d: M40 -5 v10 c0 40 -10 35 -30 35 h-20
                                fill: none
                                id: path7
                                stroke: rgba(100, 150, 200, 0.8)
                                stroke-width: 2
                                tag: path
                                vector-effect: non-scaling-stroke
                                visible: '=(Number.parseFloat(items[props.pv_leistungdeye1k].state.split(" ")[0]) > 0 ) ? true : false'
                            - component: f7-row
                              config:
                                fill: rgba(100, 150, 200, 0.8)
                                r: 6
                                strokeWidth: 10
                                tag: circle
                                vectorEffect: non-scaling-stroke
                                visible: '=(Number.parseFloat(items[props.pv_leistungdeye1k].state.split(" ")[0]) > 0 ) ? true : false'
                              slots:
                                default:
                                  - component: f7-row
                                    config:
                                      calcMode: linear
                                      dur: 4s
                                      repeatCount: indefinite
                                      tag: animateMotion
                                    slots:
                                      default:
                                        - component: f7-row
                                          config:
                                            tag: mpath
                                            xlink:href: "#path7"
          - component: f7-col
            config:
              style:
                align-items: center
                display: flex
                flex-direction: column
                flex-grow: 1
            slots:
              default:
                - component: f7-block
                  config:
                    style:
                      align-items: center
                      display: flex
                      flex-direction: column
                      height: 110px
                      justify-content: center
                      margin-top: 0
                      width: 110px
                  slots:
                    default:
                      - component: Label
                        config:
                          style:
                            font-size: 20px
                            font-weight: bold
                            text-align: center
                            white-space: wrap
                            width: 100px
                          text: ="DEYE 2k"
                      - component: Label
                        config:
                          style:
                            color: orange
                            font-size: 20px
                            font-weight: bold
                            text-align: center
                            white-space: wrap
                            width: 100px
                          text: =items[props.pv_leistungdeye2k].displayState
                      - component: oh-icon
                        config:
                          height: 110px
                          icon: INVERTER_pv_2
                          style:
                            margin-top: -30px
                - component: f7-block
                  config:
                    style:
                      display: flex
                      justify-content: center
                      margin: 0
                      padding: 0
                      width: 100%
                  slots:
                    default:
                      - component: f7-row
                        config:
                          preserveAspectRatio: xMidYMid slice
                          style:
                            height: auto
                            width: auto
                          tag: svg
                          viewBox: 0 0 100 100
                          xmlns: http://www.w3.org/2000/svg
                        slots:
                          default:
                            - component: f7-row
                              config:
                                d: M40 -5 v10 c0 40 -10 35 -30 35 h-20
                                fill: none
                                id: path8
                                stroke: rgba(100, 150, 200, 0.8)
                                stroke-width: 2
                                tag: path
                                vector-effect: non-scaling-stroke
                                visible: '=(Number.parseFloat(items[props.pv_leistungdeye2k].state.split(" ")[0]) > 0 ) ? true : false'
                            - component: f7-row
                              config:
                                fill: rgba(100, 150, 200, 0.8)
                                r: 6
                                strokeWidth: 10
                                tag: circle
                                vectorEffect: non-scaling-stroke
                                visible: '=(Number.parseFloat(items[props.pv_leistungdeye2k].state.split(" ")[0]) > 0 ) ? true : false'
                              slots:
                                default:
                                  - component: f7-row
                                    config:
                                      calcMode: linear
                                      dur: 4s
                                      repeatCount: indefinite
                                      tag: animateMotion
                                    slots:
                                      default:
                                        - component: f7-row
                                          config:
                                            tag: mpath
                                            xlink:href: "#path8"
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
-------------------------------
viele Grüße
openHAB-Rookie / Tommy

int5749
Beiträge: 1161
Registriert: 4. Nov 2019 22:08
Answers: 9

Re: OH 3.4.4 - animated energy widget aufbohren auf 4 Solarquellen

Beitrag von int5749 »

Hi,

dies ist ja schon sehr speziell. Hast Du Deine Frage(n) schon im englischen Forum gepostet, wo Du das Widget entliehen hast?
openHAB 4.1.0 Release mit openHABian in einem Debian Bookworm (LXC) unter Proxmox 8.1.3

Benutzeravatar
openHAB-Rookie
Beiträge: 18
Registriert: 7. Jul 2021 18:22

Re: OH 3.4.4 - animated energy widget aufbohren auf 4 Solarquellen

Beitrag von openHAB-Rookie »

Hallo,
zuerst einmal vielen Dank für deine Antwort!

Ich habe die Frage erst einmal nur hier beim OpenHABforum gestellt, da ich glaube, dass das vermutlich von mir nicht verstandene Grundlagen sind.

Ich nehme an, dass diese sich vermutlich recht einfach lösen lassen, wenn eine Person drauf schaut, die da inhaltlich weitaus tiefer drin steckt, als ich oberflächlich dran herum kratzend eintauchen kann. Sprich ich vermute, dass das gar kein großes Thema ist, ich nur mit meinem rudimentären Fummeln mithilfe der Basis Onlinehilfe von OpenHAB einfach den Weg nicht finde.

Oftmals muss man das Rad nicht mehrfach erfinden, braucht nur den passenden Trigger in die richtige Richtung. ;)

Ich schaue mal, ob ich da meine Frage(n) auch da passend unter bekomme.
-------------------------------
viele Grüße
openHAB-Rookie / Tommy

Antworten