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

Youless export unavailable, most likely since 2024.7.0b1 #120960

Closed
EDelsman opened this issue Jul 1, 2024 · 17 comments
Closed

Youless export unavailable, most likely since 2024.7.0b1 #120960

EDelsman opened this issue Jul 1, 2024 · 17 comments

Comments

@EDelsman
Copy link

EDelsman commented Jul 1, 2024

The problem

Since yesterday, in the beta release, both export sensors for youless are unavailable. they work fine in the youless app. Restarting youless or itegration did not help. Firmware is latest and has not changes for quite a while.

What version of Home Assistant Core has the issue?

2024.7.0b7

What was the last working version of Home Assistant Core?

2024.6.x

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Youless

Link to integration documentation on our website

https://www.home-assistant.io/integrations/youless/

Diagnostics information

There's one gateway timeout exception in yesterdays log, but nothing for today, also not after installing b7

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

home-assistant bot commented Jul 1, 2024

Hey there @gjong, mind taking a look at this issue as it has been labeled with an integration (youless) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of youless can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign youless Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


youless documentation
youless source
(message by IssueLinks)

@EDelsman
Copy link
Author

EDelsman commented Jul 1, 2024

ps. I was hoping for a piek/dal tariff indicator, but I do not see that. Could it be that that change is related?

@EDelsman EDelsman changed the title Youless export unavailable, most likely since 2024.7.0b6 Youless export unavailable, most likely since 2024.7.0b1 Jul 1, 2024
@EDelsman
Copy link
Author

EDelsman commented Jul 1, 2024

I first thought it stopped working 2 days ago, but in fact is was thursday, after I installed the beta.

@frenck frenck added this to the 2024.7.0 milestone Jul 2, 2024
@gjong
Copy link
Contributor

gjong commented Jul 2, 2024

@EDelsman What Youless device are you using. Is this an LS110 or LS120. And if it is a LS120 what firmware are you using? I am trying to figure out if this is caused by a regression in the library underneath or is related to something in Home Assistant itself.

I updated tests in the library underneath which indicated that works as expected (at least for known working firmware versions). Also updated the test in home assistant itself to figure out if the values are correctly picked up by the integration and that also appears to be happening. So I really need more information on your specific Youless device (if it is LS120 not with PVOutput firmware also the result of the http://youless-device/e would help a lot).

@EDelsman
Copy link
Author

EDelsman commented Jul 2, 2024

I have a LS120 firmware 1.6.1-EL

/e returns:
[{"tm":1719966932,"net": 24277.256,"pwr":-6,"ts0":1719964559,"cs0": 75.271,"ps0": 0,"p1": 13775.844,"p2": 12057.301,"n1": 439.157,"n2": 1116.732,"gas": 3754.789,"gts":2407021750,"wtr": 0.000,"wts":0}]

/f returns:
{"tr": 2,"pa": 0,"pp": 0,"pts":0,"i1": 1.000,"i2": 2.000,"i3": 1.000,"v1": 233.900,"v2": 232.400,"v3": 233.600,"l1": 50,"l2": 199,"l3":-218}

@EDelsman
Copy link
Author

EDelsman commented Jul 2, 2024

image

@gjong
Copy link
Contributor

gjong commented Jul 3, 2024

I've added the JSON that you provided to both the library underneath in a test as well as temporarily in the test inside home assistant. But in both instances the extra meter correctly displays the value.

Even worse is that if the value for example is missing in the response from the Youless device the library would currently report an exception, since you don't see that happening it indicates that the values are all processed as expected by the library.

When it comes to the part in home assistant itself the sensor should only become unavailable if either the update failed (but then all sensors should become unavailable) or when the mapping fails in the sensor in the integration. But if the latter were the case it would always fail, including in the tests.

So I'm a bit puzzled as to why only that device shows all sensors as unavailable.

@EDelsman
Copy link
Author

EDelsman commented Jul 3, 2024

That is puzzling indeed. If the library reads the values correctly, I would expect setting the values in the entities is not happening for some reason.

I'm worried I'll destroy my energy dashboard history if I remove the integration and add it again.

My water meter is at s0, I see the official water meter entity is also unavailable. In another ticket you mentioned to me you added the tariff indicator. I do not see that. Could it be that an entity you expect to be there is not, or that my entities have different entity ids, which results in skipping the code for setting the export, or something like that?

Our could it be the errors are happening but somehow not logged? I have warning levels set to error.

@gjong
Copy link
Contributor

gjong commented Jul 3, 2024

Tarrif indicator is available in the library underneath but not yet in home assistant. I wanted to get test coverage before adding even more things. That was the change between the previous release and 2024.7.0

BTW: Water can become unavailable. This could be due to an incorrect timestamp in the JSON. The library validates that wts is not set to 0 and is not lower then the previous time the Youless device was read. I've seen issues in the past were the water and gas values started going negative when the corresponding date field was 0 or lower then it was previously.

And if I look at the JSON you provided wts is indeed set to 0.

@sammyke007
Copy link

sammyke007 commented Jul 4, 2024

Same here. Since 2024.7.0, Youless LS120 with FW 1.6.0-EL, the sensors "sensor.energy_delivery_low" and "sensor.energy_delivery_high" became unavailable. Has been working for years without any issues.

/e:
[{"tm":1720072358,"net": 3777.038,"pwr": 291,"ts0":1718356200,"cs0": 0.000,"ps0": 0,"p1": 5102.447,"p2": 6485.544,"n1": 5710.504,"n2": 2100.448,"gas": 2432.227,"gts":2407040750,"wtr": 0.000,"wts":0}]

/f:
{"tr": 1,"pa": 151,"pp": 3096,"pts":2407040015,"i1": 3.740,"i2": 0.000,"i3": 0.000,"v1": 231.800,"v2": 0.000,"v3": 0.000,"l1": 308,"l2": 0,"l3": 0}

@funxiun
Copy link

funxiun commented Jul 4, 2024

Same here. Since 2024.7.0, Youless LS120 with FW 1.6.0-EL, the sensors "sensor.energy_delivery_low" and "sensor.energy_delivery_high" became unavailable. Has been working for years without any issues.

I have the same issue since this morning after upgrading to 2024.7.0. Both sensors are not available anymore.
Also owner of a Youless LS120 (1.6.0-EL).
Screenshot from 2024-07-04 09-38-22

EDIT: I also noticed that the water usage sensor (sensor.water_usage) is also not available anymore. I don't use it but I thought it would be worth mentioning.

@gjong
Copy link
Contributor

gjong commented Jul 4, 2024

Ok for the issue with the delivery sensors being gone I found the reason. The delivery meter seemed to be mapped incorrectly in the library (was mapping to water), I will fix that right now and create a new release.

@funxiun
Copy link

funxiun commented Jul 4, 2024

Ok for the issue with the delivery sensors being gone I found the reason. The delivery meter seemed to be mapped incorrectly in the library (was mapping to water), I will fix that right now and create a new release.

I just found out that the gas usage sensor isn't working anymore. Also after the upgrade to 2024.7.0.
The value has been set to 0m3 while the Youless web interface shows 3720m3 (which is correct).
Seems like it does not read the values from the Youless device anymore.

Does your fix also handle the gas usage sensor?

@EDelsman
Copy link
Author

EDelsman commented Jul 4, 2024

Yup, same here. Hadn't noticed because I also had some utility meters there, but gas is 0 since I installed beta. Now if only that were true ;-)

To paraphrase The Hitch Hiker's Guide to the Galaxy: Home Assistant is definitive. Reality is often inaccurate.

@gjong
Copy link
Contributor

gjong commented Jul 4, 2024

Both the water and gas should also be in the PR that is already delivered.

@Loft23
Copy link

Loft23 commented Jul 5, 2024

Thanks for all the great work.
I had a bit of a scare yesterday because of a power outage and after checking my energy dashboard I thought something might have been wrong with the youless as I also had energy delivery and gas sensors show as unavailable. On Enelogic everything seemed to be fine (that should have been a clue for me).
After power came back yesterday I installed the core update, because it all worked before the power outage I had assumed that outage must have been the cause. But the issue appears to be on the HA side.

@EDelsman
Copy link
Author

EDelsman commented Jul 5, 2024

Both are fixed. Had to edit statistics of course to fix the energy dashboard long term graps, but it is now all fine. Thanks for the effort and fix.

@EDelsman EDelsman closed this as completed Jul 5, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Aug 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants