If you want a seamless migration I suggest that you wait a little. For the integrated version I have to make some breaking changes, which I am doing at the moment. I will also update the custom component with these changes.
I hope to have some time in the next couple of days to update the component. I will post it here once I have completed.
Edit: I have updated the custom component with the latest changes. This does contain breaking changes in entity naming. So you may have to update your automations and or lovelace UI references.
@gjong Iāve installed it as a custom component now. Thanks for working on it, itās a great addition!
Iām running it with an LS120 with firmware 1.4.3-EL and I notice something strange with gas: once in a while (about once per hour), the value jumps 3884 to 2104102. The next time itās scraped (a minute later), itās back to 3884. I didnāt see this behavior when I was using the same device with Homey. Is this a known issue?
@Bert-R unfortunately Iāve not seen this behavior before. It does sound strange as I only scrape the value from the REST end-points from the actual device. It almost sounds like the device cannot be reached or something, though I cannot explain the value you are getting as I would expect the integration to display the previous value if this happens.
Right now I would have to figure out what part is failing for you. It could be the YoulessAPI python module reporting incorrect values back, though I think this to be unlikely. Alternatively it could be something in the integration that sometimes does not play very nice with Home-Assistant, what version of Home-Assistant are you running, and how recently did you install the integration.
@gjong Iām running 2021.4.3 and installed the integration past Saturday, so itās all the latest. I noticed the issue first with youless 1.4.1 and hoped upgrading to 1.4.3 would help, but it didnāt.
Whatās the API endpoint where you fetch the data from? Then I can run curl in a loop to see whether I get strange data that I can correlate the spikes with.
The spikes are not all exactly the same in height. Yesterday, they were 2104110 and 2104111, today, they are 2104120 and 2104121. In that same period, the base line went up from 3886 to 3895.
The integration is using the /e endpoint to get the JSON from the LS120. This end-point exposes all the various sensor values used by the integration. But from your graph something strikes me. The gas sensor does not expose the current usage, just the meter value. Are you sure there isnāt something wrong in your building of the graph in Grafana?
Could you verify that you see weird data as well in a raw graph of the actual sensor (so no average adjustment in the graph).
Iāve had similar issues with Grafana when a sensor switches to the unavailable state, I would see a spike. This is why I myself added a statistics sensor in home assistant on top of the sensor exposed by the integration:
sensor:
- platform: statistics
entity_id: <the gas sensor>
name: Gas statistics
sampling_size: 300
max_age:
minutes: 180
The graph you are showing is definitely not one directly based upon the sensors of the integration. The gas sensor only shows meter values (so it should never bounce up and down). See the screenshot below:
What I am seeing in your graph has a mathematical formula applied (rolling average or average), since your meter value should never be 0 or close to 0. You can also see this when selecting the history of the sensor in home assistant, see screenshot below:
The graph will always go up and never down, unless your meter is changed by the gas company.
I suggest you keep track of the /e endpoint or check the UI of your LS120 to view the hourly gas data there to see if something is wrong. The integration does not change the values from the /e endpoint. So from what I can deduce from your information it is likely that your LS120 is actually sending
Which firmware exactly do you have installed (I can confirm it should work fine with 1.4.1-EL, which is what I am currently running on).
Iām running firmware version 1.4.3-EL, but I had the issue already with 1.4.1. Looks like I need to talk to the Youless team (unless you have other suggestions).
Iām afraid that this is indeed something you will need to discuss with the company behind Youless. The only reason this probably went alright before in Homey is because they scraped the values less then the integration does, so you might not have seen the wrong values.
There is something else wrong in your data. The gts value should be the timestamp of communication to the smart meter. Your first value indicates issues communicating with your smart meter.
I would suggest contacting Youless, though I do not know if they actually offer support on this.
I will look into a solution as well, where I will build something into the Youless-API project that will attempt to detect corrupted values and ignore them. This way the integration will never get to see these incorrect values.
@Bert-R Iāve updated both the Youless-API project as well as the custom integration. If you update to the latest version the issue with the jumps in gas meter values should not be a problem anymore. An additional check was added to see if the gts field in the API is recent or not.
Thanks for providing this!
Unfortunately, I cannot test it. The YouLess team provided me with a beta release of the firmware (1.4.5b1-EL) that resolves the issue:
It turns out itās specific to the meter (Landis & Gyr E360). I just confirmed to them the fix works and Iām waiting to hear whether they can say something about a release date.
Its good to hear that Youless responded quickly with a solution.
Updating is similar to installing. You will need to upload the contents of the custom_components/youless into your installation under config/custom_components/youless.
In this particular case only the custom_components/youless/manifest.json file was changed to load in the new version of the Youless API.
Since Iāve upgraded to HA 2021.6.0 the integration as hosted on Bitbucket stopped working for me.
Tried re-installation but the integration cannot be found when trying to add via the UI. Anyone else facing the same issue?