marq24 / ha-senec-v3

SENEC.Home V2.x/V3/V4 Integration for Home Assistant that will work with the recent changes introduced by SENEC (supporting https) - successfully tested with latest MCU Version: 0827 (Feb 2024).
Apache License 2.0
51 stars 4 forks source link

SENEC integration throws errors since today. Communication issue? #85

Closed thesmer closed 6 months ago

thesmer commented 6 months ago

Integration wirked for several months like a charm. Today at 13:14 German time it stopped working. The Senec App is also not responding with data. Is there any issue with the integration? Is my IP-address blocked? I have not found any other possibility to report or ask on the topic. My HA is on latest version: Core 2024.3.1 Supervisor 2024.03.0 Operating System 12.1 Frontend 20240307.0

Error messages from log file:

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Error Msg 1: Logger: custom_components.senec.pysenec_ha Quelle: custom_components/senec/pysenec_ha/init.py:2582 Integration: SENEC.Home (Dokumentation, Probleme) Erstmals aufgetreten: 13:14:00 (59 Vorkommnisse) Zuletzt protokolliert: 18:17:16

APP-API: Calling https://app-gateway.prod.senec.dev/v2/senec/systems/299226/dashboard caused [HTTP 400]: 400, message='', url=URL('https://app-gateway.prod.senec.dev/v2/senec/systems/299226/dashboard') this is SO RIDICULOUS Senec - returning 400 without error code when TOKEN is invalid

Error Msg 2: Logger: custom_components.senec.pysenec_ha Quelle: custom_components/senec/pysenec_ha/init.py:2577 Integration: SENEC.Home (Dokumentation, Probleme) Erstmals aufgetreten: 15:11:05 (1 Vorkommnisse) Zuletzt protokolliert: 15:11:05

APP-API: Not found https://app-gateway.prod.senec.dev/v2/senec/systems/299226/dashboard [HTTP 500]: 500, message='', url=URL('https://app-gateway.prod.senec.dev/v2/senec/systems/299226/dashboard')

marq24 commented 6 months ago

Well - if your SenecApp does not return any data, then it will be "hard" for the integration to provide something useful - you can try to provide real DEBUG log output (as described here https://github.com/marq24/ha-senec-v3/blob/master/docs/HA_DEBUG.md) to get some additional (might be usefull) insights...

At least I can't confirm that there is a general issue - since at least for my system the webapi is returning data (I know that does not help you much here)...

thesmer commented 6 months ago

I will provide the data soon. But first thanks for responding so fast. And is it possible, that my IP has been blocked? Can I check that somehow before debugging in the wrong direction.

marq24 commented 6 months ago

... normally in your router you can "request" a reconnect... which typically will result in a new external IP... [also you might like to disconnect your phone from the WLAN and check, if then the APP would/will provide data again - if this also/still fail, then the problem is more likely on Senec's infrastructure side...

thesmer commented 6 months ago

provided data via direct mail.

CubieMedia commented 6 months ago

I can confirm this is still working, seems to be a user bases connection / authentication issue. With your phone you can try to connect though a neighbours wifi. Then you definitly have a different external ip address.

Good luck!

marq24 commented 6 months ago

I have to admit, that from the log's it looks like that (except for one call) there are no further error messages... [I have removed any of your personal data]

2024-03-18 19:05:40.971 INFO (MainThread) [custom_components.senec.pysenec_ha] ***** update(self) ********
2024-03-18 19:05:40.972 DEBUG (MainThread) [custom_components.senec.pysenec_ha] ***** APP-API: app_update_now(self) ********
2024-03-18 19:05:40.972 DEBUG (MainThread) [custom_components.senec.pysenec_ha] ***** APP-API: app_get_data(self) ********
2024-03-18 19:05:40.972 DEBUG (MainThread) [custom_components.senec.pysenec_ha] APP-API get https://app-gateway.prod.senec.dev/v2/senec/systems/[XXX]/dashboard
2024-03-18 19:05:41.526 WARNING (MainThread) [custom_components.senec.pysenec_ha] APP-API: Calling https://app-gateway.prod.senec.dev/v2/senec/systems/[XXX]/dashboard caused [HTTP 400]: 400, message='', url=URL('https://app-gateway.prod.senec.dev/v2/senec/systems/[XXX]/dashboard') this is SO RIDICULOUS Senec - returning 400 without error code when TOKEN is invalid
2024-03-18 19:05:41.527 DEBUG (MainThread) [custom_components.senec.pysenec_ha] ***** APP-API: app_update_total(self) ********
2024-03-18 19:05:41.527 DEBUG (MainThread) [custom_components.senec.pysenec_ha] ***** APP-API: app_authenticate(self) ********
2024-03-18 19:05:42.089 DEBUG (MainThread) [custom_components.senec.pysenec_ha] ***** APP-API: get_master_plant_id(self) ********
2024-03-18 19:05:42.310 DEBUG (MainThread) [custom_components.senec.pysenec_ha] APP-API set _app_master_plant_id to [XXX]
2024-03-18 19:05:42.310 DEBUG (MainThread) [custom_components.senec.pysenec_ha] APP-API set _app_wallbox_num_max to 0
2024-03-18 19:05:42.310 INFO (MainThread) [custom_components.senec.pysenec_ha] APP-API: Login successful
2024-03-18 19:05:42.311 DEBUG (MainThread) [custom_components.senec.pysenec_ha] ***** APP-API: app_update_total(self) ********
2024-03-18 19:05:42.311 DEBUG (MainThread) [custom_components.senec.pysenec_ha] ***** APP-API: app_get_data(self) ********
2024-03-18 19:05:42.311 DEBUG (MainThread) [custom_components.senec.pysenec_ha] APP-API get https://app-gateway.prod.senec.dev/v1/senec/monitor/[XXX]/data/custom?startDate=2018-01-01&endDate=2024-04-01&locale=de_DE&timezone=GMT
2024-03-18 19:05:45.168 DEBUG (MainThread) [custom_components.senec.pysenec_ha] ***** APP-API: app_update_tech_data(self) ********
2024-03-18 19:05:45.168 DEBUG (MainThread) [custom_components.senec.pysenec_ha] ***** APP-API: app_get_data(self) ********
2024-03-18 19:05:45.169 DEBUG (MainThread) [custom_components.senec.pysenec_ha] APP-API get https://app-gateway.prod.senec.dev/v1/senec/systems/299226/technical-data
2024-03-18 19:05:45.737 DEBUG (MainThread) [custom_components.senec] Finished fetching senec data in 4.766 seconds (success: True) 

so one call is failing - but then after the token will be invalidated the calls after that does not create additional/new errors... So I have to admit, that I am a bit clueless what is happening on your SENEC system - when you say, that even via 5G (WiFi disabled) your MobileApp also does not show any valuable data, then I can't do/test much.... Since this would require, that you would provide credentials to your systems - which I don't want to have - so let's see, if SENEC fixing the backend for your account...

It's some sort of common that Senec does fixes/adjustments to their backend (and break things)... and then few days later they fix it...

I just can recommend, to contact Senec support letting them know, that App have stopped working :-/

marq24 commented 6 months ago

so do you have any update on this - did SENEC fix it?

thesmer commented 6 months ago

Hi, Yes SENEC fixed it after 1,5days. Sorry I should have replied earlier. Just one question. Do you have a Viessmann Heating Pump? I recognized with the official integration some strange communication issues. From time to time I don’t get values. Any experience with that

marq24 commented 6 months ago

I have a waterkotte - so I can't help/suggest anything in this new subject...