myTselection / telenet_telemeter

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

Telenet: multiple mobile phones - indicate mobile network usage per phone - enhancement #29

Open XalaTheShepard opened 1 year ago

XalaTheShepard commented 1 year ago

Dear myTselection,

I have multiple phones in my Telenet plan. At the moment I get the same total of mobile network used for both phones. Is it possible to add sensors per phone to indicate the individual mobile network usage? So one sensor per phone of its individual mobile network usage and one sensor that indicates the total of mobile network used for all phones together?

I admit I was previously using the Telenet custom component of geertmeersman, and these are the only sensors I am currently missing it to have a similar replacement.

Thanks in advance.

Kind regards,

Robin

myTselection commented 1 year ago

Sure I may look into it. Would you be able to share the sensor json value (annonymized)? As I don't have mobile subscriptions at Telenet and I'll need to analyse the structure in which the data is available at Telenet.

XalaTheShepard commented 1 year ago

Dear myTselection,

Thank you very much for adding the sensors. I have only a very limited knowledge of programming, so could you please tell me where I can find or download that json value? Is it in the Telenet mobile application or somewhere else?

Kind regards,

Robin

myTselection commented 1 year ago

if you lookup the telenet sensor in the HA Developer Tools (eg http://localhost:8123/developer-tools/state) you should see in the attributes column an element telemeter_json and mobile_json. Could you anonymize and share these elements?

XalaTheShepard commented 1 year ago

Thanks for the advice.

Please find the json attached. mobile_json.txt

myTselection commented 1 year ago

I've been briefly checking this with the code. I would expect unique sensors are already created for each of your mobile phone numbers. Is that not the case? Not sure what would still be needed. Btw, this mobile part was contributed by Geert in here as well ;) But later on he started his own integration, he might still be able to share his version I suppose..

XalaTheShepard commented 1 year ago

Dear myTselection,

Each mobile phone number is a seperate sensor, but they all provide the same total amount of all phone numbers together of mobile network used. In the integration of Geert, this was one global sensor, but it was possible to see the usage of each phone number seperately.

The attached image gives an example. The sensors in red are the one that are showing both the value in green. If possible, the green sensor could be maintained, but renamed. And the red sensors could be adjusted to provide the related information.

I hope this is more clear now.

Thanks for looking into the issue.

Kind regards,

Robin

image

myTselection commented 1 year ago

hi, I tried to figure it out, but still stuck on it, and not having a mobile subscription myself makes it very hard to validate :( would it be possible to show the technical sensor names and attributes that are shown in the screenshot?