Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grid cost not loaded using PUN template #17174

Open
1 task done
MobilettoSoft opened this issue Nov 10, 2024 · 6 comments
Open
1 task done

Grid cost not loaded using PUN template #17174

MobilettoSoft opened this issue Nov 10, 2024 · 6 comments
Labels
bug Something isn't working tariffs Specific tariff support

Comments

@MobilettoSoft
Copy link
Contributor

Describe the bug

Using the PUN template causes the cost of grid electricity is not showed; the issue is not affected by using or not using charges, tax or formula .

(the site https://www.mercatoelettrico.org/it/ has been recently updated in its layout: I dont' know if this could be the root cause of this issue)

Steps to reproduce

  1. Use PUN template in evcc.yaml

Configuration details

tariffs:
  currency: EUR # three letter ISO-4217 currency code (default EUR)
  grid:
    type: template
    template: pun
    charges: 0.130267926
    tax: 0.1
    formula: math.Max((1.1 * price + charges) * (1 + tax), 0.0)

Log details

The logs in evcc UI don't show anything related to grid tariff

In the homeassistant add-on logs, when using the PUN tariff this message is reported shortly after add-on startup:

Error unmarshalling XML:  expected element type <NewDataSet> but have <html>

When using other tariff templates, the message disappears

What type of operating system are you running?

HomeAssistant Add-on

Nightly build

  • I have verified that the issue is reproducible with the latest nightly build

Version

0.131.5

@andig
Copy link
Member

andig commented Nov 10, 2024

Please show

evcc tariff —log trace,db:error

@andig andig added the tariffs Specific tariff support label Nov 10, 2024
@MobilettoSoft
Copy link
Contributor Author

grid:
Error unmarshalling XML: expected element type but have
Error unmarshalling XML: expected element type but have
From To Price/Cost

@andig
Copy link
Member

andig commented Nov 10, 2024

Missing requested log.

@andig andig closed this as completed Nov 10, 2024
@MobilettoSoft
Copy link
Contributor Author

Well, nice attitude to someone hinting you a possible bug and even the possible reason (the way you're pulling data from www.mercatoelettrico.org doesn't work anymore because they completely overhauled their website).

However, the CLI command you suggested (evcc tariff -log trace,db:error) didn't work, so I used this:

evcc tariff -l trace,db:error

And I got this:

[main  ] INFO 2024/11/10 23:00:53 evcc 0.131.5
[main  ] INFO 2024/11/10 23:00:53 using config file: C:\Users\abern\Downloads\evcc\evcc.yaml
grid:
Error unmarshalling XML:  expected element type <NewDataSet> but have <html>
Error unmarshalling XML:  expected element type <NewDataSet> but have <html>
From    To    Price/Cost

I didn't think the first two lines were essential, so excuse me.

I hope this can be useful for other users possibly encountering this issue. I reverted to the method I was already using (importing the electricity cost via REST API from homeassistant and its nice PUN integration).

@andig
Copy link
Member

andig commented Nov 11, 2024

I see. Missing log is a bug in the tariff. Will fix that and then we can double check.

@andig andig reopened this Nov 11, 2024
@andig andig added the bug Something isn't working label Nov 11, 2024
@andig
Copy link
Member

andig commented Nov 12, 2024

@motze92 do you want to take a look? I've added the logging but test is broken since server returns a different response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tariffs Specific tariff support
Projects
None yet
Development

No branches or pull requests

2 participants