unl0ck / homeassistant-addon-viessmann-gridbox

Fetching Viessmann Data over Gridbox Send via MQTT
Apache License 2.0
5 stars 1 forks source link

Mehr Werte einbinden / Kommastellen weglassen wegen der Übersichtlichkeit #37

Closed Lendelfinger closed 3 weeks ago

Lendelfinger commented 1 month ago

Hallo, erst nochmal vielen Dank für den super Support.

a) Wäre es möglich noch weitere Werte einzubinden?

b) Könnte man die Werte evtl. ohne Komma Stellen (sowohl Watt als auch Prozent) angeben lassen. Sind in meinen Augen nicht von Relevanz, machen das Ganze etwas unübersichtlicher und in meinem Fall ;-) scheinen sie nicht so gut mit den Mushroom Template Cards zu funktionieren. Vielleicht sind auch die etwas buggy. Aber da werden die Werte manchmal nicht richtig interpretiert und ich vermute, es liegt an den Komma Stellen.

Vielen Dank nochmals.

Bildschirmfoto 2024-07-12 um 12 31 19
unl0ck commented 1 month ago

kannst du mir bitte aus dem dashboard einmal so eine antwort schicken? image

unl0ck commented 1 month ago

aber bitte rauskopieren kein screenshot aber dort ist auch nicht die tagesenergie, aber die kannst du dir in Home assistant zusammen bauen, hab sowas gemacht für mein E-Auto, damit ich sehe wieviel pro tag gefahren wird oder wurde.

unl0ck commented 1 month ago

es gibt ne möglichkeit hab ich gerade gesehen diesen unteren mittigen wert zu erhalten, brauch ich bissle aber für

Temperatur heizung ist kein Problem hatte es mir einfach gemacht mit der heizung, wollte schnell dir was liefern, hatte noch überelgt ob ich frag, ob du die temperatur auch haben willst. kann ich nächste woche einbauen. eilt ja ned, denke ich.

Lendelfinger commented 1 month ago

{ "batteries": [ { "applianceID": "a1731af4-0399-495b-92c2-523fd61ab681", "capacity": 10000, "nominalCapacity": 10000, "power": -102, "remainingCharge": 10000, "stateOfCharge": 1 } ], "battery": { "capacity": 10000, "nominalCapacity": 10000, "power": -102, "remainingCharge": 10000, "stateOfCharge": 1 }, "consumption": 847, "directConsumption": 4523, "directConsumptionEV": 0, "directConsumptionHeatPump": 0, "directConsumptionHeater": 3676, "directConsumptionHousehold": 847, "directConsumptionRate": 0.5465200579990334, "grid": -3651, "gridMeterReadingNegative": 5630400000, "gridMeterReadingPositive": 5344920000, "heaters": [ { "applianceID": "12bdd8ec-9b1e-465e-8f26-feae00e5af0f", "power": 3676, "temperature": 70.9 } ], "heating": 3676, "measuredAt": "2024-07-12T12:52:47Z", "photovoltaic": 8276, "production": 8276, "selfConsumption": 4625, "selfConsumptionRate": 0.5588448525857902, "selfSufficiencyRate": 1, "selfSupply": 4523, "totalConsumption": 4523 }

Lendelfinger commented 1 month ago
Bildschirmfoto 2024-07-12 um 14 50 01
unl0ck commented 1 month ago

Danke, ich denke nächste Woche hab ich die Heizung mit beiden Werten, kann dann sein dass die alte Heizung entity weg ist

Lendelfinger commented 1 month ago

Start bricht leider ab:

`----------------------------------------------------------- s6-rc: info: service base-addon-banner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service base-addon-log-level: starting s6-rc: info: service fix-attrs successfully started Log level is set to INFO s6-rc: info: service base-addon-log-level successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service gridboxconnector: starting s6-rc: info: service gridboxconnector successfully started s6-rc: info: service legacy-services: starting [12:31:56] INFO: Starting GridboxConnector... s6-rc: info: service legacy-services successfully started total 12K
4.0K drwxr-xr-x 2 root root 4.0K Jul 15 12:31 . 4.0K drwxr-xr-x 1 root root 4.0K Jul 15 12:31 .. 4.0K -rw------- 1 root root 114 Jul 15 12:31 options.json total 16K
4.0K drwxr-xr-x 1 root root 4.0K Jul 15 12:19 . 4.0K drwxr-xr-x 1 root root 4.0K Jul 15 12:31 .. 4.0K drwxr-xr-x 3 root root 4.0K Jul 15 12:18 GridboxConnector 4.0K -rw-r--r-- 1 root root 494 Jul 15 12:18 cloudSettings.json /build Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/build/GridboxConnector/main.py", line 71, in run_addon() File "/build/GridboxConnector/main.py", line 60, in run_addon viessmann_gridbox_connector.update_sensors(result) File "/build/GridboxConnector/ha_viessmann_gridbox_connector.py", line 154, in update_sensors if self.heater_sensor is None: ^^^^^^^^^^^^^^^^^^ AttributeError: 'HAViessmannGridboxConnector' object has no attribute 'heater_sensor'. Did you mean: 'update_sensors'? [12:32:00] INFO: Service gridboxconnector exited with code 1 (by signal 0) s6-rc: info: service legacy-services: stopping s6-rc: info: service legacy-services successfully stopped s6-rc: info: service gridboxconnector: stopping s6-rc: info: service gridboxconnector successfully stopped s6-rc: info: service legacy-cont-init: stopping s6-rc: info: service legacy-cont-init successfully stopped s6-rc: info: service fix-attrs: stopping s6-rc: info: service base-addon-log-level: stopping s6-rc: info: service base-addon-log-level successfully stopped s6-rc: info: service fix-attrs successfully stopped s6-rc: info: service base-addon-banner: stopping s6-rc: info: service base-addon-banner successfully stopped s6-rc: info: service s6rc-oneshot-runner: stopping s6-rc: info: service s6rc-oneshot-runner successfully stopped s6-rc: info: service s6rc-oneshot-runner: starting s6-rc: info: service s6rc-oneshot-runner successfully started s6-rc: info: service base-addon-banner: starting


Add-on: Viessmann Gridbox Connector (edge) Viessmann Gridbox Connector (edge)

Add-on version: 2.8.4 You are running the latest version of this add-on. System: Home Assistant OS 12.4 (aarch64 / yellow) Home Assistant Core: 2024.7.2 Home Assistant Supervisor: 2024.06.2

Please, share the above information when looking for help or support in, e.g., GitHub, forums or the Discord chat.

s6-rc: info: service base-addon-banner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service base-addon-log-level: starting s6-rc: info: service fix-attrs successfully started Log level is set to INFO s6-rc: info: service base-addon-log-level successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service gridboxconnector: starting s6-rc: info: service gridboxconnector successfully started s6-rc: info: service legacy-services: starting [12:32:05] INFO: Starting GridboxConnector... s6-rc: info: service legacy-services successfully started total 12K
4.0K drwxr-xr-x 2 root root 4.0K Jul 15 12:32 . 4.0K drwxr-xr-x 1 root root 4.0K Jul 15 12:32 .. 4.0K -rw------- 1 root root 114 Jul 15 12:32 options.json total 16K
4.0K drwxr-xr-x 1 root root 4.0K Jul 15 12:19 . 4.0K drwxr-xr-x 1 root root 4.0K Jul 15 12:32 .. 4.0K drwxr-xr-x 3 root root 4.0K Jul 15 12:18 GridboxConnector 4.0K -rw-r--r-- 1 root root 494 Jul 15 12:18 cloudSettings.json /build Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/build/GridboxConnector/main.py", line 71, in run_addon() File "/build/GridboxConnector/main.py", line 60, in run_addon viessmann_gridbox_connector.update_sensors(result) File "/build/GridboxConnector/ha_viessmann_gridbox_connector.py", line 154, in update_sensors if self.heater_sensor is None: ^^^^^^^^^^^^^^^^^^ AttributeError: 'HAViessmannGridboxConnector' object has no attribute 'heater_sensor'. Did you mean: 'update_sensors'?`

unl0ck commented 1 month ago

danke

unl0ck commented 1 month ago

problem gelöst? @Lendelfinger

Lendelfinger commented 1 month ago

Ja, lässt sich starten. Ob es die nächsten 24h stabil läuft, berichte ich morgen. Wie Du schon gesagt hast, erscheinen jetzt zwei neue Entitäten, die alte "Heizung" fällt weg.

Nochmal die Frage, ob Du die Angaben in Watt ohne Kommastellen darstellen kannst. Finde es wesentlich übersichtlicher und ob jetzt 2345,3 W oder 2345 W verbraucht werden, ist in meinen Augen nicht signifikant.

Lendelfinger commented 1 month ago

problem gelöst? @Lendelfinger

Läuft. Jedoch ist eher heute Nacht/Morgen nochmal unterbrochen worden und ist von selbst (ohne meine Automatisierung) wieder gestartet.

[19:50:30] INFO: Starting GridboxConnector... s6-rc: info: service legacy-services successfully started total 12K
4.0K drwxr-xr-x 2 root root 4.0K Jul 16 19:50 . 4.0K drwxr-xr-x 1 root root 4.0K Jul 16 19:50 .. 4.0K -rw------- 1 root root 114 Jul 16 19:50 options.json total 16K
4.0K drwxr-xr-x 1 root root 4.0K Jul 15 14:16 . 4.0K drwxr-xr-x 1 root root 4.0K Jul 16 19:50 .. 4.0K drwxr-xr-x 3 root root 4.0K Jul 15 14:16 GridboxConnector 4.0K -rw-r--r-- 1 root root 494 Jul 15 14:16 cloudSettings.json /build 2024-07-16 19:50:34,601 main.py:62 INFO - {"batteries": [{"applianceID": "a1731af4-0399-495b-92c2-523fd61ab681", "capacity": 10000, "nominalCapacity": 10000, "power": 248, "remainingCharge": 10000, "stateOfCharge": 1}], "battery": {"capacity": 10000, "nominalCapacity": 10000, "power": 248, "remainingCharge": 10000, "stateOfCharge": 1}, "consumption": 1171, "directConsumption": 735, "directConsumptionEV": 0, "directConsumptionHeatPump": 0, "directConsumptionHeater": 541, "directConsumptionHousehold": 194, "directConsumptionRate": 1, "grid": 729, "gridMeterReadingNegative": 5947200000, "gridMeterReadingPositive": 5352480000, "heaters": [{"applianceID": "12bdd8ec-9b1e-465e-8f26-feae00e5af0f", "power": 541, "temperature": 70.2}], "heating": 541, "measuredAt": "2024-07-16T17:50:33Z", "photovoltaic": 735, "production": 735, "selfConsumption": 735, "selfConsumptionRate": 1, "selfSufficiencyRate": 0.5741822429906542, "selfSupply": 983, "totalConsumption": 1712} 2024-07-17 05:50:39,721 - viessmann_gridbox_connector.GridboxConnector - WARNING - retrieve_live_data - Status Code 401 2024-07-17 05:50:39,723 - viessmann_gridbox_connector.GridboxConnector - WARNING - retrieve_live_data - Response {} Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/build/GridboxConnector/main.py", line 71, in run_addon() File "/build/GridboxConnector/main.py", line 66, in run_addon logger.warning("No data received") File "/usr/local/lib/python3.12/logging/init.py", line 1551, in warning self._log(WARNING, msg, args, **kwargs) File "/usr/local/lib/python3.12/logging/init.py", line 1684, in _log self.handle(record) File "/usr/local/lib/python3.12/logging/init.py", line 1695, in handle maybe_record = self.filter(record) ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/logging/init.py", line 858, in filter result = f.filter(record) ^^^^^^^^^^^^^^^^ File "/build/GridboxConnector/utils.py", line 8, in filter literal_msg = ast.literal_eval(message) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/ast.py", line 66, in literal_eval node_or_string = parse(node_or_string.lstrip(" \t"), mode='eval') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/ast.py", line 52, in parse return compile(source, filename, mode, flags, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1 No data received ^^^^ SyntaxError: invalid syntax [05:50:40] INFO: Service gridboxconnector exited with code 1 (by signal 0) s6-rc: info: service legacy-services: stopping s6-rc: info: service legacy-services successfully stopped s6-rc: info: service gridboxconnector: stopping s6-rc: info: service gridboxconnector successfully stopped s6-rc: info: service legacy-cont-init: stopping s6-rc: info: service legacy-cont-init successfully stopped s6-rc: info: service fix-attrs: stopping s6-rc: info: service base-addon-log-level: stopping s6-rc: info: service fix-attrs successfully stopped s6-rc: info: service base-addon-log-level successfully stopped s6-rc: info: service base-addon-banner: stopping s6-rc: info: service base-addon-banner successfully stopped s6-rc: info: service s6rc-oneshot-runner: stopping s6-rc: info: service s6rc-oneshot-runner successfully stopped s6-rc: info: service s6rc-oneshot-runner: starting s6-rc: info: service s6rc-oneshot-runner successfully started s6-rc: info: service base-addon-banner: starting


Add-on: Viessmann Gridbox Connector (edge) Viessmann Gridbox Connector (edge)

Add-on version: 2.8.5 You are running the latest version of this add-on. System: Home Assistant OS 12.4 (aarch64 / yellow) Home Assistant Core: 2024.7.2 Home Assistant Supervisor: 2024.06.2

Please, share the above information when looking for help or support in, e.g., GitHub, forums or the Discord chat.

s6-rc: info: service base-addon-banner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service base-addon-log-level: starting s6-rc: info: service fix-attrs successfully started Log level is set to INFO s6-rc: info: service base-addon-log-level successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service gridboxconnector: starting s6-rc: info: service gridboxconnector successfully started s6-rc: info: service legacy-services: starting [05:50:46] INFO: Starting GridboxConnector... s6-rc: info: service legacy-services successfully started total 12K
4.0K drwxr-xr-x 2 root root 4.0K Jul 17 05:50 . 4.0K drwxr-xr-x 1 root root 4.0K Jul 17 05:50 .. 4.0K -rw------- 1 root root 114 Jul 17 05:50 options.json total 16K
4.0K drwxr-xr-x 1 root root 4.0K Jul 15 14:16 . 4.0K drwxr-xr-x 1 root root 4.0K Jul 17 05:50 .. 4.0K drwxr-xr-x 3 root root 4.0K Jul 15 14:16 GridboxConnector 4.0K -rw-r--r-- 1 root root 494 Jul 15 14:16 cloudSettings.json /build 2024-07-17 05:50:50,494 main.py:62 INFO - {"batteries": [{"applianceID": "a1731af4-0399-495b-92c2-523fd61ab681", "capacity": 10000, "nominalCapacity": 10000, "power": 555, "remainingCharge": 2800, "stateOfCharge": 0.28}], "battery": {"capacity": 10000, "nominalCapacity": 10000, "power": 555, "remainingCharge": 2800, "stateOfCharge": 0.28}, "consumption": 557, "directConsumption": 0, "directConsumptionEV": 0, "directConsumptionHeatPump": 0, "directConsumptionHeater": 0, "directConsumptionHousehold": 0, "grid": 7, "gridMeterReadingNegative": 5947560000, "gridMeterReadingPositive": 5352840000, "heaters": [{"applianceID": "12bdd8ec-9b1e-465e-8f26-feae00e5af0f", "power": 5, "temperature": 50.1}], "heating": 5, "measuredAt": "2024-07-17T03:50:49Z", "photovoltaic": 0, "production": 0, "selfConsumption": 0, "selfSufficiencyRate": 0.9875444839857651, "selfSupply": 555, "totalConsumption": 562}

Lendelfinger commented 4 weeks ago

Nochmals kurze Rückmeldung: Läuft stabil, jedoch mit unregelmäßigen Neustarts.

unl0ck commented 4 weeks ago

Alles klar, ich pushe es dennoch auf stable glaub das invalide Token Handling passt noch ned Hauptsache er startet neu

Lendelfinger commented 4 weeks ago

Hallo, nochmals zum Thema Kommastellen. Kann es sein, dass der Wert "sensor.viessmann_gridbox_heater_power" nicht korrekt ausgegeben wird?

Ich habe folgenden YAML Code als Template erstellt in den Mushroom Cards:

{% if states("sensor.viessmann_gridbox_heater_power") < "1000" %}
  grey
{% else %}
  red
{% endif %}

Dort soll ein Icon bei Werten unter 1000 'grau' dargestellt werden, über 1000 'rot'.

Kurioserweise funktioniert das manchmal, aber nach einer gewissen Zeit springt er nicht mehr um (z.B. bei Werten über 1000, bleibt dann aber 'grau', aber auch umgekehrt). Ich dachte, dass es evtl. an den Kommastellen liegt. Oder gibt es noch evtl. eine andere Fehlerquelle?

unl0ck commented 3 weeks ago

du könnntest ja mal in abhängigkeit der abfragezeit wenn ein wert älter ist als das, dass du dir iwie was ausgeben lässt

Lendelfinger commented 3 weeks ago

du könnntest ja mal in abhängigkeit der abfragezeit wenn ein wert älter ist als das, dass du dir iwie was ausgeben lässt

Sorry, das habe ich ich nicht verstanden. Was meinst Du genau?

unl0ck commented 3 weeks ago

das es manchmal nicht funktioniert, versteh ich nicht ganz was da schief läuft, aber du könntest eine automation machen die vllt prüft wenn ein wert zu alt ist das er dann eine meldung macht, oder unter einen wert fällt der nicht sein kann. und somit das tracken,

unl0ck commented 3 weeks ago

@Lendelfinger würde das feature schließen, da die werte ja umgesetzt sein sollten.