Giter Club home page Giter Club logo

telemeter's Issues

Update Telenet API

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

Link to Home Assistant integration

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...

Time date format does not match.

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"

KeyError: 'peak'

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.