killianmeersman / telemeter Goto Github PK
View Code? Open in Web Editor NEWFetch Telenet Telemeter information
Fetch Telenet Telemeter information
Hi Killian, just want to let you know that I've build a custom Home Assistant integration to integrate Telenet usage details: https://github.com/myTselection/telenet_telemeter.
The main Telenet connection has been based on your telemeter code. Thanks for that! I have further extended it to also get mobile usage details.
If you want, it might be interesting to also add a link towards this HA integration in your repo, as it may be relevant for users looking into your github repo...
Hi,
It seems that Telenet has changed its IT infrastructure and current implement is no longer working... In fact, it is still active, but data at Telenet is not updated.
Is this code still maintained and will there be an update?
Thanks,
Filip
Cant manage to get data from TN because of date time mismactch. Daylight saving related?
mutrax@Gamingpc-papa:~/git/telemeter/telemeter$ python3 ./telemeter.py Fetching Telemeter data Traceback (most recent call last): File "./telemeter.py", line 237, in <module> _main() File "./telemeter.py", line 225, in _main telemeter = session.telemeter() File "./telemeter.py", line 155, in telemeter return next(Telemeter.from_json(r.json())) File "./telemeter.py", line 84, in from_json end = datetime.strptime(period["end"], TELENET_DATETIME_FORMAT) File "/usr/lib/python3.8/_strptime.py", line 568, in _strptime_datetime tt, fraction, gmtoff_fraction = _strptime(data_string, format) File "/usr/lib/python3.8/_strptime.py", line 349, in _strptime raise ValueError("time data %r does not match format %r" % ValueError: time data '2021-04-05T00:00:00.0+02:00' does not match format '%Y-%m-%dT%H:%M:%S.0+01:00'
Modifying line 9 to this fixed it (kinda? )
TELENET_DATETIME_FORMAT = "%Y-%m-%dT%H:%M:%S.0%z"
Is this still working with the revamped telenet website?
I've written a similar script like you, but mine stopped working a few days ago
Hy Killian,
I'm a first time user of this program and i'm getting this error:
"C:\Program Files\Python\python.exe" C:/Users/pvdh/PycharmProjects/telemeter/ReadTelemeter.py
Traceback (most recent call last):
File "C:/Users/pvdh/PycharmProjects/telemeter/ReadTelemeter.py", line 6, in
my_telemeter = telenet_session.telemeter()
File "C:\Program Files\Python\lib\site-packages\telemeter\telemeter.py", line 155, in telemeter
return next(Telemeter.from_json(r.json()))
File "C:\Program Files\Python\lib\site-packages\telemeter\telemeter.py", line 85, in from_json
products = [TelenetProductUsage.from_json(x) for x in period["usages"]]
File "C:\Program Files\Python\lib\site-packages\telemeter\telemeter.py", line 85, in
products = [TelenetProductUsage.from_json(x) for x in period["usages"]]
File "C:\Program Files\Python\lib\site-packages\telemeter\telemeter.py", line 46, in from_json
days = [
File "C:\Program Files\Python\lib\site-packages\telemeter\telemeter.py", line 49, in
peak_usage=x["peak"],
KeyError: 'peak'
Is it me or is this a known problem?
Kind regards,
Patrick
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.