lephisto / tesla-apiscraper

API Scraper for pulling Vehicle Statistics from the Tesla Owner API into an InfluxDB + Grafana Dashboards
GNU Lesser General Public License v3.0
364 stars 102 forks source link

migrate to python3 #30

Closed neoflex closed 5 years ago

lephisto commented 5 years ago

Will test this one and merge it later on.

CoMPaTech commented 5 years ago

Seems to work here just fine!

lephisto commented 5 years ago

I merged it to a p3 testing branch, i still had no sufficient time to test it pure and with docker.

CoMPaTech commented 5 years ago

You are right, it needs some more minor things as well, just fixing some issues wrt your API (not using the android version, but keen on hooking it up to my home automation/domotica setup). But I'll have to look into a more proper way to do both 2 and 3 functionality. (One of those is 'bytes()' wrapping the json.dump)

lephisto commented 5 years ago

I run across:

2019-04-13 11:54:45 INFO     Asleep since: 0 Sleeping for 1 seconds..
Traceback (most recent call last):
  File "./apiscraper.py", line 407, in <module>
    car_active_state = state_monitor.ongoing_activity_status()
  File "./apiscraper.py", line 110, in ongoing_activity_status
    and self.old_values['charge_state'].get('charger_voltage', 0) > 0:
TypeError: unorderable types: NoneType() > int()

need to fix that before putting mainline to it..

lephisto commented 5 years ago

I added some fixes and App adjustments, please test. Looking good for me atm..

lephisto commented 5 years ago

I close this one, since the changes have been merges and rebased in v2019.3. Thanks for your contribution.