myTselection / telenet_telemeter

Telenet Telemeter Home Assistant custom component HACS for Belgian ISP and mobile phone network traffic.
MIT License
30 stars 6 forks source link

Issue getting data #19

Closed wokkeltje13 closed 1 year ago

wokkeltje13 commented 1 year ago

This error originated from a custom integration.

Logger: homeassistant.helpers.entity Source: custom_components/telenet_telemeter/sensor.py:426 Integration: Telenet Telemeter (documentation, issues) First occurred: 14 March 2023 at 07:43:53 (3114 occurrences) Last logged: 09:40:27

Update for sensor.telenet_telemeter_peak fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 541, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 739, in async_device_update raise exc File "/config/custom_components/telenet_telemeter/sensor.py", line 426, in async_update self._included_volume = int((self._data._product_details.get('product').get('characteristics').get('service_category_limit').get('value'))) 1024 1024 AttributeError: 'NoneType' object has no attribute 'get'

I receive data for my mobile data, but not for Internet. I have a "klik" program with no limit.

myTselection commented 1 year ago

could you share your the specurl (can be found within telemet_json sensor attribute data.

wokkeltje13 commented 1 year ago

specurl: https://api.prd.telenet.be/omapi/public/product/2161

absorbo commented 1 year ago

Same issue: specurl: https://api.prd.telenet.be/omapi/public/product/2162 specurl: https://api.prd.telenet.be/omapi/public/product/45978

PS Thanks for the HA integration!

myTselection commented 1 year ago

for these products, I'm not sure how to identify the allowed volume. I read it depends on the number of sim cards, but can't find a clear value within the product details of the shared urls. I'll make sure it won't crash any longer, but the allowed included volume and total volume used, would remain 0 for now. Unless someone can indicate which field is to be used.

Onbeperkt mobiele data: Op voorwaarde van een normaal gebruik (zoals gedefinieerd in de algemene voorwaarden). Ook moet rekening worden gehouden met :  Een verbruiksgrens in België van 300 GB voor KLIK 1 SIM unlimited mobiele data, 600 GB voor KLIK 2 SIM’s unlimited mobiele data en 1,5 TB voor KLIK 5 SIM’s unlimited mobiele data. Indien je deze overschrijdt, kan je tot het einde van de facturatieperiode verder surfen aan een verminderde snelheid van 512 kbps; Een verbruiksgrens in de andere landen van de EU-zone van 40 GB voor KLIK 1 SIM unlimited mobiele data, 80 GB voor KLIK 2 SIM’s unlimited mobiele data en 200 GB voor KLIK 5 SIM’s unlimited mobiele data. Indien je deze overschrijdt, kan je tot het einde van de facturatieperiode verder surfen aan normale snelheid waarbij extra verbruik bijkomend zal aangerekend worden aan 0,0018 euro (excl. btw) per MB.

wokkeltje13 commented 1 year ago

In Klik, there is unlimited data for Internet image

wokkeltje13 commented 1 year ago

there is only a limit for mobile data that is depending on the number of mobile numbers and shared between the sim cards image but this value is already correct image

wokkeltje13 commented 1 year ago

Version 0.81 has a division by 0 error

This error originated from a custom integration.

Logger: homeassistant.helpers.entity Source: custom_components/telenet_telemeter/sensor.py:264 Integration: Telenet Telemeter (documentation, issues) First occurred: 20:31:27 (9 occurrences) Last logged: 20:35:27

Update for sensor.telenet_telemeter fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 541, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 739, in async_device_update raise exc File "/config/custom_components/telenet_telemeter/sensor.py", line 264, in async_update self._used_percentage = round(100 * ((self._peak_usage + self._wifree_usage) / ( self._included_volume + self._extended_volume)),1) ZeroDivisionError: division by zero

This error originated from a custom integration.

Logger: homeassistant.helpers.entity Source: custom_components/telenet_telemeter/sensor.py:438 Integration: Telenet Telemeter (documentation, issues) First occurred: 20:31:27 (9 occurrences) Last logged: 20:35:27

Update for sensor.telenet_telemeter_peak fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 541, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 739, in async_device_update raise exc File "/config/custom_components/telenet_telemeter/sensor.py", line 438, in async_update self._used_percentage = round(100 * ((self._peak_usage + self._wifree_usage) / ( self._included_volume + self._extended_volume)),1) ZeroDivisionError: division by zero

myTselection commented 1 year ago

division by zero issue should be fixed as of r0.8.2