DarwinsBuddy / WienerNetzeSmartmeter

A home-assistant integration supporting WienerNetze Smartmeters as sensors
121 stars 12 forks source link

Zwei Anlagen in einem Account #191

Open brauni2102 opened 10 months ago

brauni2102 commented 10 months ago

Hallo,

seitdem ich eine zweite Anlage in meinem Account hinzugefügt habe, funktioniert der Transfer von den verbrauchten kWh nicht mehr. Die automatische Suche nach Entitäten funktioniert nicht. Kann das Problem manuell irgendwie gelöst werden?

danke und lg christian

reox commented 10 months ago

Evt lag es nur an der API - bei mir gab es auch ein paar Wochen lang einen Ausfall, jetzt scheint wieder alles problemlos zu gehen. Funktioniert es bei dir auch wieder?

brauni2102 commented 10 months ago

nein leider es wird mir imme nur eine Anlage angezeigt. Ich habe eben den Account in HE gelöscht und neu eingeloggt. Leider keine Besserung. Hast du auch mehrere Anlagen im Account?

reox commented 10 months ago

Nein, ich hab nur eine und auch dort nur ein Smartmeter. Kann das daher leider nicht wirklich testen :(

DarwinsBuddy commented 10 months ago

@brauni2102 ich muss leider auch sagen, dass ich das nicht testen kann. wir haben beide nur eine anlage und können daher das verhalten nicht reproduzieren. wenn du lust hast kannst du in folgendem issue nachlesen was für informationen wir bräuchten und wie du sie uns zukommen lassen kannst, damit wir uns das problem genauer ansehen:

https://github.com/DarwinsBuddy/WienerNetzeSmartmeter/issues/51

hirschy81 commented 8 months ago

Same problem here: 2 meters, I tried to change to the new one by changing the "favorite" at Wiener Netze. Now I only have the new one (no chance to switch back to the old/current one) - even after changing back the favorite. Is there a way to "force" the integration to a bespoke meter (zählpunkt)?

esackbauer commented 8 months ago

Same problem here: 2 meters, I tried to change to the new one by changing the "favorite" at Wiener Netze. Now I only have the new one (no chance to switch back to the old/current one) - even after changing back the favorite. Is there a way to "force" the integration to a bespoke meter (zählpunkt)?

Same problem here. According to the "manual config" you can name the Zählpunkt number, using configuration.yaml. But whenever I re add the integration (after removing and adding it according to wnsm FAQ), it still keeps pulling the entities from the wrong Zähler, and it keeps asking for username and password.

Constipated-Monk commented 5 months ago

I have the very same problem. the reason behind this is crystal clear to me: wiener netze changed something in the background. my log.wien smartmeter website was always kinda off, but now the changed it to the website i know since i have seen it before with others. with that, there came apparently the historic integration of my old meter (not even a smart one), and this one was set by default to favourite. so i changed that and now on the website at least, everything is back to how it should be. in HASS not so much. I haven't been able to use this addon for weeks now unfortunately due to different bugs which needed attention. now after the recent two updates i was stoked. unfortunately, it still does not work. It has not worked with my old config, i deleted everything and set it up anew and still didn't work. now i saw that problem on the log.wien website and finally also in the logs, removed everything again and yet again. still doesn't work.

Please file an issue with this error and (anonymized) payload in github {'hasSmartMeter': True, 'isDataDeleted': False, 'zaehlpunkt': 'AT0010000000000000001XXXXXXXXXXXXXX', 'type': 'TAGSTROM', 'address': 'OLD_ADDRESS', 'zip': 'XXXX'} {} {} {'optIn': True, 'consumptionAverage': 0, 'consumptionMinimum': 0, 'consumptionMaximum': 0}

what puzzles me the most though is, that in the HASS attributes of those entities, there is indeed some flags which are apparnetly correctly set: Default false Active false SmartMeterReady false thats the old one. my current smartmeter has every flag on true. in addition to that, wnsm only generatied 3 entities each time. 2 for the old ones and only one for the correct one. so the correct one is missing the _statistics entitie.

thats all i can provide for now. hope this helps.

esackbauer commented 5 months ago

so the correct one is missing the _statistics entitie

That is a different problem:

208

Constipated-Monk commented 5 months ago

so the correct one is missing the _statistics entitie

That is a different problem: #208

i don't think it is. the way i see it from a birdseye view is as following. when setting up, the addon was not really prepared for multiple smartmeter entries. as the user Maia says, the API call will get back with an array of smartmeters rather a single one. though the addon somehow too tries to process the whole array and presses it into the entities and components needed, apparently there is an exception thrown when adding an old smartmeter. this hinders the following smartmeter to be properly setup. i feel like this should be as easy as a pulldown menu on setup. pick and choose which smartmeter you would like to add and run the routine with one fixed data structure rather an array which has unknown contents. this makes it futureproof for people with 2 meters which are actually online like tagstrom and nachtstrom. furthermore you could also just write an exception for smartmeters which do say thay are not smartmeter ready, or not active, as pulled by the attribites of those entities.

all these issues seem to entierly relate to both a change in the HASS environment as well as a change on the setup side of WNSM. At the same time, i have a version 1.4.0 running which has been working ever since (different household and different VM though). Once it works, there does not seem to be a problem. yet the setup seems to be corrupted.

compumark commented 4 months ago

I have the same issue since some days/weeks according to the HA error log

2024-02-26 09:40:06.863 ERROR (MainThread) [custom_components.wnsm.live_sensor] Unable to load consumption
2024-02-26 09:40:06.863 ERROR (MainThread) [custom_components.wnsm.live_sensor] Please file an issue with this error and                             (anonymized) payload in github {'hasSmartMeter': True, 'isDataDeleted': False, 'zaehlpunkt': 'AT00100000000000000010000067XXXXX', 'type': 'WAERMEPUMPE', 'address': 'YYYYYY', 'zip': 'VVVVV'} {'consumptionYesterdayValue': 29299, 'consumptionYesterdayValidated': True, 'consumptionYesterdayTimestamp': '2024-02-24T23:00:00.000Z', 'consumptionDayBeforeYesterdayValue': 33547, 'consumptionDayBeforeYesterdayValidated': True, 'consumptionDayBeforeYesterdayTimestamp': '2024-02-23T23:00:00.000Z'} {'lastValue': 5209009, 'lastReading': '2024-02-24T23:00:00.000Z', 'lastValidated': True, 'lastType': '1-2:1.8.0'} {'optIn': True, 'consumptionAverage': 0, 'consumptionMinimum': 0, 'consumptionMaximum': 0}

In HA there are 4 entities: image