myTselection/telenet_telemeter

reporting wrongly used_percentage

Closed this issue · 14 comments

After installing version 0.9.3 these are the reported values.
When time permits could you please advise what may be the issue or what inf. can I contribute to understand and solve the issue?
Thanks,

attribution: Telenet Telemeter
last update: '2023-03-24T17:06:00'
used_percentage: 0
included_volume: 0
extended_volume: 0
total_volume: 0
wifree_usage: 0
includedvolume_usage: 0
extendedvolume_usage: 0
peak_usage: 0
offpeak_usage: 0
sequeezed: false
period_start: '2023-03-08T00:00:00'
period_end: '2023-04-07T00:00:00'
period_days_left: 13.28
period_used_percentage: 55.7
product: Basic Internet
download_speed: 0
upload_speed: 0
telemeter_json:
internet:
category: CAP
specurl: https://api.prd.telenet.be/omapi/public/product/INTB0000
daysUntil: '14'
validity: '2023-04-08T12:00:00.000Z'
allocatedUsage:
units: 175
usedUnits: 79.71
remainingUnits: 95.29
unitType: GB
usedPercentage: '45.00'
lastUsageDate: '2023-03-24T17:06:00'
extendedUsage:
eligibleToBuy: true
volumeBlocks: '1'
specurl: https://api.prd.telenet.be/omapi/public/product/IOPT0002
volume: 25
unit: GB
price: '5.00'
currency: EUR
wifreeUsage:
usedUnits: 0
unitType: GB
totalUsage:
units: 79.71
unitType: GB
lastUsageDate: '2023-03-24T17:06:00'
peakUsage:
usedUnits: 0
startDate: '2023-03-08'
endDate: '2023-04-07'
productIdentifier: z123456
unit_of_measurement: '%'
icon: mdi:check-network-outline
friendly_name: Telenet Telemeter internet z123456

Thanks for sharing these details. It's the first time I see the telenet data for a user connected to the new Telenet backend while not having an unlimited subscription.
I expected the 'peakUsage' element would only be available for unlimited subscriptions, but apparently you still have this element. So a change will be required to make sure the correct data elements are retrieved for this case.

Could you try latest release 0.9.4, I expect this would fix your case.

strange, I see the 'last update' is still null, while this data was available in the response of Telenet. Do you see any other exception in the log?
Could you restart with debug enabled and share anonymized logs?
to get debug log, you'll have to add below in configuration.yaml and restart HA:

logger:
  default: debug

Hi Carlo,
thx for the log. Based on this, I see no direct failure in the component itself, but within HA sensor update.
Could you try updating to latest HA version? seems like a more general issue not directly bound to this component...

I have a very similar situation. For the past 10 to 20 days my usage has been (and still is) stuck at 13.3% (while the days left still count down correctly). Since I saw issues over here discussing the change to the new backend I suspected that was the problem (I was already switched as I had the new My Telenet), but I'm running the latest version of HA and this integration and it still shows the same percentage. When I look at My Telenet I see a higher usage. However I suspect this might be a problem in the new Telenet backend...

and do you see any error or exception in the logs that you can share?

I have just checked the info of this integration vs info from My Telenet app and there is indeed a delta.

Seems that only peak usage is available in the attributes, but it differs than the value in My Telenet.

IMG_6435
IMG_6436
IMG_6437

I just rebooted my HA because of an update, but now the percentage is showing 0.
However in the json I now see correct values, although the json seems shorter than before.

20230329_001
20230329_002

20230329_003

@krisconinx Such distinction is possible: there is throttling setup in the component, in order to limit the number of requests going to Telenet. (I fear if too many very frequent requests would be launched, they may block this component someday)
So that explains the distinction in your first screenshots (having peak 287GB).
The throttling is currently set to update the sensor data with Telenet data every 15min.
So that also means there is a local caching of the data. If the Telenet backend returns some errors (eg timeouts), the last data available in the component might still be shown for a longer period than 15min.
But overal, it shows that it has worked correctly recently. So I guess some Telenet backend instability is causing the issue for now, not a bug in the component.

Thanks for your input, I've created a new release 0.9.5, I hope it will solve your case.

@myTselection thx for the update! for me this seems to have fixed it so far. It's a bit difficult to say since the month is only 2 days old, but now at least it shows 0.79% used instead of 0% so that's a good sign already :).