ZsBT / hass-w1000-portal

Home Assistant custom component for W1000 energy portal (e.g. https://energia.eon-hungaria.hu/ )
Do What The F*ck You Want To Public License
44 stars 4 forks source link

Invalid statistic_id #13

Open pgerner opened 1 year ago

pgerner commented 1 year ago

Hi Zsombor,

I have entries in my logfile every time I restart HA for each sensor (report in EON) configured:

2023-01-13 21:11:18.084 WARNING (MainThread) [custom_components.w1000-energy-monitor] exception at async_import_statistics 'sensor.w1000_Consumption': Invalid statistic_id 2023-01-13 21:11:18.258 WARNING (MainThread) [custom_components.w1000-energy-monitor] exception at async_import_statistics 'sensor.w1000_Production': Invalid statistic_id

I have values for the sensors and even the consumption is showing, although as a big peak instead of hourly values: image

Could you help me to troubleshoot?

Thanks Peter

lazlykama commented 1 year ago

Same here, something brake at 13th Jan in the Energy dashboard. I see similar view, but with bigger spike.

image

ZsBT commented 1 year ago

Hi, it seems for the 13th, there was a lack in EON data providing. I got holes, too. What happens if you take a look at that day now?

pgerner commented 1 year ago

No change for me, seeing the same spike both for today and the past days . I don’t think it’s related

pgerner commented 1 year ago

And the invalid statistics Id is still reporting in the logs. Checking the code it appears when statistic_id is not the proper format (delimited by :). Can’t it be the root cause?

ZsBT commented 1 year ago

Nice catch! Can you copy/paste the configuration entry (of course without username/password), and if possible, a detailed log as described on the wiki https://github.com/ZsBT/hass-w1000-portal/wiki/Troubleshooting ?

lazlykama commented 1 year ago

Just for some extra info: I don't have this error in the log, while after 13th and 14th as days with failed read (without valid, hourly information) yesterday (15th) looks normal and the module working perfectly.

image

pgerner commented 1 year ago

So it seems it's a mistake from my side... here's the log: 2023-01-17 19:23:26.415 DEBUG (MainThread) [custom_components.w1000-energy-monitor] registered sensor: sensor.w1000_consumption 2023-01-17 19:23:26.417 DEBUG (MainThread) [custom_components.w1000-energy-monitor] registered sensor: sensor.w1000_production 2023-01-17 19:23:27.661 DEBUG (MainThread) [custom_components.w1000-energy-monitor] reading report Consumption 2023-01-17 19:23:35.859 DEBUG (MainThread) [custom_components.w1000-energy-monitor] resp status http 200 2023-01-17 19:23:36.719 DEBUG (MainThread) [custom_components.w1000-energy-monitor] found report Consumption in workarea Göd 2023-01-17 19:23:36.719 DEBUG (MainThread) [custom_components.w1000-energy-monitor] found report Production in workarea Göd 2023-01-17 19:23:37.200 DEBUG (MainThread) [custom_components.w1000-energy-monitor] import statistic: sensor.w1000_Consumption count: 43 2023-01-17 19:23:37.200 WARNING (MainThread) [custom_components.w1000-energy-monitor] exception at async_import_statistics 'sensor.w1000_Consumption': Invalid statistic_id 2023-01-17 19:23:37.233 DEBUG (MainThread) [custom_components.w1000-energy-monitor] reading report Production 2023-01-17 19:23:37.417 DEBUG (MainThread) [custom_components.w1000-energy-monitor] import statistic: sensor.w1000_Production count: 43 2023-01-17 19:23:37.418 WARNING (MainThread) [custom_components.w1000-energy-monitor] exception at async_import_statistics 'sensor.w1000_Production': Invalid statistic_id 2023-01-17 19:23:37.423 DEBUG (MainThread) [custom_components.w1000-energy-monitor] Notifying all listeners

And here's my config: w1000-energy-monitor: login_user: !secret w1000-email-address login_pass: !secret w1000-password url: https://energia.eon-hungaria.hu/W1000 reports: Consumption, Production (lines from login_user: to reports: are indented 2 spaces to the right)

And today's graph: image

Thanks in advance for your effort looking into this

ZsBT commented 1 year ago

@pgerner it seems the integration does not handle uppercase letters well. Can you please try with renaming your report on the EON portal, an also in your configuration.yaml? To make the names all lowercase.

pgerner commented 1 year ago

Yep, you found the root cause. After renaming the report names to lowercase on EON and modifying the config accordingly, there are no errors in the log and yesterday's consumption is showing properly. Thanks a lot for your help Zsombor!

ZsBT commented 1 year ago

Thanks for the debugging. I'll fix this in the upcoming days!

On Thu, Jan 19, 2023 at 10:37 PM pgerner @.***> wrote:

Yep, you found the root cause. After renaming the report names to lowercase on EON and modifying the config accordingly, there are no errors in the log and yesterday's consumption is showing properly. Thanks a lot for your help Zsombor!

— Reply to this email directly, view it on GitHub https://github.com/ZsBT/hass-w1000-portal/issues/13#issuecomment-1397640696, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABF3SO26POCGK5DMX3HEBWLWTGXZDANCNFSM6AAAAAAT2ZBH7Q . You are receiving this because you commented.Message ID: @.***>

Gollam commented 1 year ago

@ZsBT any progress hopefully?

ZsBT commented 1 year ago

could not have a chance to fix this... but I'm still on it!

lupus78 commented 10 months ago

Thanks, your module works nicely. Can you at least update the README to include that the profile names have to be lowercase. I ran into this issue too.

zee36 commented 9 months ago

Hi Everyone,

Did you guys notice any errors of reading the DP_1-1:1.8.00 or DP_1-1:2.8.00 curves? These are unavailable for me since 29 Nov, while +A and -A curves are reading data... Maybe some bugs at EON's side, just wanted to check if this is the case for anyone else.

Thanks a lot.

See below my logs:

2023-12-06 19:54:20.829 DEBUG (MainThread) [custom_components.w1000-energy-monitor] reading report ha.import 2023-12-06 19:54:24.261 DEBUG (MainThread) [custom_components.w1000-energy-monitor] resp status http 200 2023-12-06 19:54:24.423 DEBUG (MainThread) [custom_components.w1000-energy-monitor] found report ha.import in workarea Munkaterület1702 2023-12-06 19:54:24.423 DEBUG (MainThread) [custom_components.w1000-energy-monitor] found report export in workarea Munkaterület1702 2023-12-06 19:54:24.423 DEBUG (MainThread) [custom_components.w1000-energy-monitor] found report ha.export in workarea Munkaterület1702 2023-12-06 19:54:24.423 DEBUG (MainThread) [custom_components.w1000-energy-monitor] found report import in workarea Munkaterület1702 2023-12-06 19:54:24.423 DEBUG (MainThread) [custom_components.w1000-energy-monitor] found report griddown in workarea Munkaterület1290 2023-12-06 19:54:24.423 DEBUG (MainThread) [custom_components.w1000-energy-monitor] found report griddown in workarea Munkaterület1290 2023-12-06 19:54:24.423 DEBUG (MainThread) [custom_components.w1000-energy-monitor] found report gridup in workarea Munkaterület1290 2023-12-06 19:54:24.952 DEBUG (MainThread) [custom_components.w1000-energy-monitor] reading report ha.export 2023-12-06 19:54:25.161 DEBUG (MainThread) [custom_components.w1000-energy-monitor] reading report import 2023-12-06 19:54:25.324 DEBUG (MainThread) [custom_components.w1000-energy-monitor] import statistic: sensor.w1000_import count: 42 2023-12-06 19:54:25.324 DEBUG (MainThread) [custom_components.w1000-energy-monitor] reading report export 2023-12-06 19:54:25.443 DEBUG (MainThread) [custom_components.w1000-energy-monitor] import statistic: sensor.w1000_export count: 42 2023-12-06 19:54:25.444 DEBUG (MainThread) [custom_components.w1000-energy-monitor] reading report griddown 2023-12-06 19:54:25.538 DEBUG (MainThread) [custom_components.w1000-energy-monitor] import statistic: sensor.w1000_griddown count: 42 2023-12-06 19:54:25.539 DEBUG (MainThread) [custom_components.w1000-energy-monitor] reading report gridup 2023-12-06 19:54:25.632 DEBUG (MainThread) [custom_components.w1000-energy-monitor] import statistic: sensor.w1000_gridup count: 42 2023-12-06 19:54:25.633 DEBUG (MainThread) [custom_components.w1000-energy-monitor] Notifying all listeners 2023-12-06 19:54:26.014 DEBUG (MainThread) [custom_components.w1000-energy-monitor] registered sensor: sensor.w1000_ha_import 2023-12-06 19:54:26.015 DEBUG (MainThread) [custom_components.w1000-energy-monitor] registered sensor: sensor.w1000_ha_export 2023-12-06 19:54:26.015 DEBUG (MainThread) [custom_components.w1000-energy-monitor] registered sensor: sensor.w1000_import 2023-12-06 19:54:26.016 DEBUG (MainThread) [custom_components.w1000-energy-monitor] registered sensor: sensor.w1000_export 2023-12-06 19:54:26.017 DEBUG (MainThread) [custom_components.w1000-energy-monitor] registered sensor: sensor.w1000_griddown 2023-12-06 19:54:26.018 DEBUG (MainThread) [custom_components.w1000-energy-monitor] registered sensor: sensor.w1000_gridup 2023-12-06 19:54:26.025 DEBUG (MainThread) [custom_components.w1000-energy-monitor.sensor] {'state': None, 'unit': 'kWh', 'attributes': {'curve': 'Home DP_1-1:1.8.00', 'generated': None, 'state_class': 'total_increasing', 'device_class': 'energy'}} 2023-12-06 19:54:26.027 DEBUG (MainThread) [custom_components.w1000-energy-monitor.sensor] {'state': None, 'unit': 'kWh', 'attributes': {'curve': 'Home_6 DP_1-1:2.8.00', 'generated': None, 'state_class': 'total_increasing', 'device_class': 'energy'}} 2023-12-06 19:54:26.028 DEBUG (MainThread) [custom_components.w1000-energy-monitor.sensor] {'state': 2.005, 'unit': 'kWh', 'attributes': {'curve': 'Home +A', 'generated': '2023-12-06T18:00:00', 'state_class': 'total', 'device_class': 'energy'}} 2023-12-06 19:54:26.029 DEBUG (MainThread) [custom_components.w1000-energy-monitor.sensor] {'state': 0.0, 'unit': 'kWh', 'attributes': {'curve': 'Home -A', 'generated': '2023-12-06T18:00:00', 'state_class': 'total', 'device_class': 'energy'}} 2023-12-06 19:54:26.030 DEBUG (MainThread) [custom_components.w1000-energy-monitor.sensor] {'state': None, 'unit': 'kWh', 'attributes': {'curve': 'Home DP_1-1:1.8.00', 'generated': None, 'state_class': 'total_increasing', 'device_class': 'energy'}} 2023-12-06 19:54:26.030 DEBUG (MainThread) [custom_components.w1000-energy-monitor.sensor] {'state': None, 'unit': 'kWh', 'attributes': {'curve': 'Home DP_1-1:2.8.00', 'generated': None, 'state_class': 'total_increasing', 'device_class': 'energy'}}

vakesz commented 9 months ago

EON has sent out a mail few days ago that they're having issues, probably it's the root cause of this behaviour

vakesz commented 9 months ago

kép

zee36 commented 9 months ago

Cheers vakesz, hope this is the root cause

vakesz commented 9 months ago

Database information seem to be available again from Távleolvasási Portal.