bdraco / nexia

Python library for connecting to nexia
Apache License 2.0
21 stars 13 forks source link

Add code to download history #11

Open jhoult opened 3 years ago

jhoult commented 3 years ago

The website lets you download the history for the past week at /xxl_history/$thermosat_id/daily_history.json or the histor for the last month at /xxl_history/$thermosat_id/daily_history.json

It also supports a csv: https://www.mynexia.com/xxl_history/$thermostat_id/monthly_history.csv https://www.mynexia.com/xxl_history/$thermostat_id/daily_history.csv

jhoult commented 3 years ago

when you try to use nexia.home._get_url it causes a redirect loop. Nexia responds with a 302 redirect to the CDR you ask for constantly, which causes the library to log back in, then try again, which then gives you another 302, and does it over and over.