DarwinsBuddy / WienerNetzeSmartmeter

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

Incorrect Meter being selected #205

Closed AkshayRao27 closed 5 months ago

AkshayRao27 commented 6 months ago

I have two Smart Meters listed in my account, but one of the meters has been inactive for over a year. The integration is selecting the inactive meter instead of the active meter.

image

image

A good solution would be to ask the user which meter should be used for the integration after the user logs in with their ID & Password.

In the mean time is there a way to change which meter gets selected? I tried adding data to my configuration.yml and secrets.yml files manually, but the data isn't taking

image image

AkshayRao27 commented 5 months ago

I tried contacting Wiener Netze to ask them to remove the inactive meter from my account, but 3 weeks later I have still not received any response.

Is there no way to fix this inside HA?

DarwinsBuddy commented 5 months ago

I think there is a problem with the manual configuration part. Using the config flow, by removing all configuration from your json config files and removing all sensors + integration and reinstalling it should do the trick.

I'll have a look into the manual config setup. I guess this was not bubbling up, because nearly all of us are using the auto setup with config flow.

DarwinsBuddy commented 5 months ago

ah okay. Now I get it.

The statistics sensor is inactive due to some limitations regarding WienerNetze API and Home Assistant. It is completely normal. Your setup works as expected. Please see the FAQs for the reason why this is happening https://github.com/DarwinsBuddy/WienerNetzeSmartmeter/discussions/19

AkshayRao27 commented 5 months ago

I deleted all the WNSM Files and reinstalled the latest version (1.4.3). It is still selecting an inactive meter. Here is a screencap: https://imgur.com/a/OyiVNnG (sorry for the bad quality - imgur compresses a lot and GitHub allows only 10mb)

AkshayRao27 commented 5 months ago

@DarwinsBuddy I just removed and reinstalled the integration and am now on 1.4.5. This issue still persists. Can I somehow provide more information to help fix it?

DarwinsBuddy commented 5 months ago

Hi

  1. the idea with "selecting one smart meter" may work for you, but not necessarily for everyone. some users have multiple active smart meters on various different addresses. Wiener Netze reports all of your past and current contracts including all related smart meters. we can only use what's exposed by the API without making a suggestion on which is currently used/active/etc.

  2. what sensor is active? please see the FAQs. if you have troubles with your currently used smartmeter in your energy dashboard you can enable debug logging of this integration and either post the anonymized log here or send it to me via email.

AkshayRao27 commented 5 months ago

So yesterday, this randomly changed without me doing anything at all and it pulled a lot of data, admitedly in a rather odd fashion: image

Ever since then, the "Home" sensor (the smart meter that is active in my WN account is labelled "Home") seems to be working, even though the Home_statistics sensor isn't updating. The old meter is still being detected (which is fine) but they are no longer blocking the new meter from being detected ^^