unl0ck / homeassistant-addon-viessmann-gridbox

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

Addon stops after short time #4

Closed timogru closed 1 year ago

timogru commented 1 year ago

Cool addon idea. The Viessmann data policy is a joke!

As mentioned the addon stops after a short while. Watchdog was turned on, did not change behavior. By the way, where would I find the data that was collected from the gridbox?

BR, Timo

unl0ck commented 1 year ago

Yes viessmann data policy is really a joke.

Yeah I am working currently for a bug fix but I don’t know what happen.

Why watchdog is not working I don’t know.

I pushed with 1.0.8 another try to fix this issue with the stop 

did you test 1.0.8? @timogru

unl0ck commented 1 year ago

@timogru please test 1.0.8 should be fixed the issue

timogru commented 1 year ago

Hi @unl0ck

sorry! I did not noticed your question. Yes I tried allready the 1.0.8 Version. It shuts off after max 30 seconds. Maybe the log can show something. I took my email and password out ;)

s6-rc: info: service s6rc-oneshot-runner: starting s6-rc: info: service s6rc-oneshot-runner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service legacy-services: starting services-up: info: copying legacy longrun example (no readiness notification) s6-rc: info: service legacy-services successfully started [10:34:22] ERROR: Got unexpected response from the API: Service not enabled Hello world! total 12K
4 drwxr-xr-x 2 root root 4.0K Sep 7 10:34 . 4 drwxr-xr-x 1 root root 4.0K Sep 7 10:34 .. 4 -rw------- 1 root root 84 Sep 7 10:34 options.json { "username": "xxx@xxx.xxx", "password": "xxx", "wait_time": 60 }total 16K
4 drwxr-xr-x 1 root root 4.0K Sep 5 08:55 . 4 drwxr-xr-x 1 root root 4.0K Sep 7 10:34 .. 4 drwxr-xr-x 2 root root 4.0K Sep 5 08:54 GridboxConnector 4 -rw-r--r-- 1 root root 503 Sep 5 08:54 cloudSettings.json /build Traceback (most recent call last): File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/build/GridboxConnector/main.py", line 48, in production_sensor = Sensor(production_settings) File "/usr/local/lib/python3.10/site-packages/ha_mqtt_discoverable/init.py", line 644, in init self._connect_client() File "/usr/local/lib/python3.10/site-packages/ha_mqtt_discoverable/init.py", line 693, in _connect_client result = self.mqtt_client.connect(self._settings.mqtt.host) File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 912, in connect self.connect_async(host, port, keepalive, File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 978, in connect_async raise ValueError('Invalid host.') ValueError: Invalid host. Start Viessmann Connector {'grant_type': 'http://auth0.com/oauth/grant-type/password-realm', 'username': 'xxx@xxx.xxx', 'password': 'xxx', 'audience': 'my.gridx', 'client_id': 'oZpr934Ikn8OZOHTJEcrgXkjio0I0Q7b', 'scope': 'email openid', 'realm': 'viessmann-authentication-db'} s6-rc: info: service legacy-services: stopping s6-rc: info: service legacy-services 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 fix-attrs successfully stopped s6-rc: info: service s6rc-oneshot-runner: stopping s6-rc: info: service s6rc-oneshot-runner successfully stopped

unl0ck commented 1 year ago

did you setup your mqtt configurations?

timogru commented 1 year ago

Oh nooooo! You are right! I haven't initialised the mosquitto broker. After starting the broker the topics appeared in the MQTT explorer. Thanks a lot! You are a genius by making our own data available!!!

BTW: Would it be possible to integrate the battery (W and storage level) and the home usage (W)? As shown in the attached image (battery 29W/99%, home usage 386W).

Grid

unl0ck commented 1 year ago

can We close this issue?

sure but I need your help for this, you have to send me a dataset, I can create another add-on version that it will print all available data and then you can send me this.

timogru commented 1 year ago

That sounds great! So the next Version will print that dataset automatically?

timogru commented 1 year ago

Hallo @unl0ck

ich hab gesehen, dass wir auch auf Deutsch schreiben können. Das macht es vielleicht etwas einfacher ;) Ich wollte mich nochmal für dieses coole Addon bedanken!!

Das mit dem Dataset hab ich nicht ganz verstanden. Welche Daten brauchst Du und wo finde ich die? In der GridBox? Cool wären die Infos: Batterieladung in % und die aktuelle Batterieladung/-entladung in W. Wenn Du noch die Daten für die erzeugte und die verbrauchte Energie abgreifen könntest, wäre das echt mega. Aber die ersten beiden Daten sind, glaub ich, die wichtigsten.

Wie gesagt, wenn ich dir noch Infos liefern soll, dann sag einfach bescheid.

Alles Gute, Timo

unl0ck commented 1 year ago

ich bräuchte einmal die Daten die du erhältst, damit ich die auswerten kannst. meine live Daten sehen nur so aus Bildschirmfoto 2023-09-09 um 07 28 54

timogru commented 1 year ago

Hab die Daten ausgelesen. Ich füge die mal als Text ein, zum besseren Kopieren und als Screenshot.

{ "batteries": [ { "applianceID": "ff006a1c-dd4e-4ed5-a570-05697d956d5e", "capacity": 10000, "nominalCapacity": 10000, "power": -921, "remainingCharge": 8400, "stateOfCharge": 0.84 } ], "battery": { "capacity": 10000, "nominalCapacity": 10000, "power": -921, "remainingCharge": 8400, "stateOfCharge": 0.84 }, "consumption": 3996, "directConsumption": 3996, "directConsumptionEV": 0, "directConsumptionHeatPump": 0, "directConsumptionHeater": 0, "directConsumptionHousehold": 3996, "directConsumptionRate": 0.8115353371242892, "grid": -7, "gridMeterReadingNegative": 542880000, "gridMeterReadingPositive": 656280000, "measuredAt": "2023-09-09T12:03:43Z", "photovoltaic": 4924, "production": 4924, "selfConsumption": 4917, "selfConsumptionRate": 0.9985783915515841, "selfSufficiencyRate": 1, "selfSupply": 3996, "totalConsumption": 3996 }

Grid2

Brauchst Du noch weitere Infos?

timogru commented 1 year ago

Ich glaube die folgenden Werte wäre echt interessant:

Bei "batteries" oder "battery":

Bei den Übrigen: consumption directConsumption (dann sieht man sofort wieviel Leistung man selbst verbraucht hat)

Viele Grüße, Timo

unl0ck commented 1 year ago

die sind ganz gut ich schau mal, wann ich zeit habe, und versuch bissle was schnell zu machen, frage willst du das als eigenes Gerät haben?

timogru commented 1 year ago

Die tauchen ja als MQTT Entitäten in der Liste auf. Ich finde das könnte weiterhin so gemacht werden. Oder bringt das Vorteile mit sich, wenn es Geräte wären?

unl0ck commented 1 year ago

könnte man als eigenes anlegen, Vorteile ned wirklich ich pack es einfach mal dazu.

unl0ck commented 11 months ago

@timogru kannst du mal die neuste version testen?

timogru commented 11 months ago

Die 1.1.0 hatte ich schon gesehen, aber ich dachte, Du arbeitest noch dran. Deshalb hab ich nichts geschrieben, sorry. Es gibt nämlich leider keine neuen Datenfelder. Ich hab immer noch Production, Grid und Photovoltaic. Letzteres zeigt aber jetzt durchgehend 0 an. Ich meine, dass das immer gleich der Production war. Da könnte ich mich aber auch irren. Kann ich Dir mit weiteren Daten helfen?

timogru commented 11 months ago

Hi @unl0ck ich denke schon eine Weile darüber nach, ob das hier für dich nicht ein Blindflug ist? Du kannst doch gar nicht testen, ob die Änderungen funktionieren, oder? Wäre es nicht sinnvoll, dass Du temporär Zugriff auf meine Gridbox bekommst? Dann könntest Du sofort sehen, ob deine Ideen klappen. VG, Timo

unl0ck commented 11 months ago

Ja wäre hilfreich weilSonst müsstest du mir immer sagen klappt oder klappt nicht Mit Freundlichen GrüßenSimon HelmingOn 26. Sep 2023, at 08:50, TiGr @.***> wrote: Hi @unl0ck ich denke schon eine Weile darüber nach, ob das hier für dich nicht ein Blindflug ist? Du kannst doch gar nicht testen, ob die Änderungen funktionieren, oder? Wäre es nicht sinnvoll, dass Du temporär Zugriff auf meine Gridbox bekommst? Dann könntest Du sofort sehen, ob deine Ideen klappen. VG, Timo

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>