This code is usable only if you are on Home Assistant 0.114 or older
For Home Assistant 0.115 and newer please go to: https://github.com/AdamNaj/ZWaveGraphHA
| import requests, json | |
| from subarucreds import username,password,pin # just a "subarucreds.py" that has some variables i didn't want to share | |
| import datetime | |
| #login | |
| s=requests.Session() | |
| loginr=s.post('https://www.mysubaru.com/login', data = {'username':username,'password':password}) | |
| #should return a response 200 | |
| #Where's my subaru? |
This code is usable only if you are on Home Assistant 0.114 or older
For Home Assistant 0.115 and newer please go to: https://github.com/AdamNaj/ZWaveGraphHA
| #! /usr/bin/env python | |
| #-*- coding: utf-8 -*- | |
| import json | |
| import httplib2 | |
| import time | |
| from datetime import datetime | |
| from datetime import timedelta | |
| from apiclient.discovery import build |