1
0
mirror of https://github.com/no2chem/wideq.git synced 2025-05-17 07:40:09 -07:00

34 Commits

Author SHA1 Message Date
Adrian Sampson
8179148342 Inline the load/dump bits
The ol' expression problem strikes again.
2018-01-20 21:51:49 -05:00
Adrian Sampson
ebc9c5b679 Make load into a class method 2018-01-20 21:47:32 -05:00
Adrian Sampson
2ce09e9642 Move Client to main module 2018-01-20 21:43:02 -05:00
Adrian Sampson
0dde92b241 Docstring 2018-01-20 17:16:36 -05:00
Adrian Sampson
2083357165 Remove a key we don't need 2018-01-20 17:14:23 -05:00
Adrian Sampson
1dfbc7db8f Factor out the refresh function 2018-01-20 16:58:49 -05:00
Adrian Sampson
0648876cc0 Extract new access token 2018-01-20 16:54:53 -05:00
Adrian Sampson
8653810e0d Actually, the secret is ASCII bytes
It looks like hex, but really it's just ASCII. Wow!
2018-01-20 16:51:20 -05:00
Adrian Sampson
3b5b6ca07f Fix fake URL used in signature 2018-01-20 14:53:26 -05:00
Adrian Sampson
105646263f Remove apparently-unnecessary headers 2018-01-20 14:47:42 -05:00
Adrian Sampson
ccddf40187 Decode OAuth secret 2018-01-20 14:42:40 -05:00
Adrian Sampson
ba3d423893 Set up OAuth token refresh 2018-01-20 14:35:27 -05:00
Adrian Sampson
35a78281d6 Auth.from_url helper 2018-01-20 13:56:16 -05:00
Adrian Sampson
8fc2749a9b Obtain refresh token from OAuth 2018-01-20 13:53:19 -05:00
Adrian Sampson
336b7ec956 Fix format of control call 2018-01-08 14:46:04 -08:00
Adrian Sampson
c9afb9035c Start controlling settings 2018-01-08 14:39:50 -08:00
Adrian Sampson
d2735be4ad Unpack poll results 2018-01-08 14:16:43 -08:00
Adrian Sampson
d09820dbbd Fix monitor polling
- It looks like `workList` as returned is not really a list.
- The workId we generate appears to be thrown away, in favor of a new
  one returned by the service.
- The stop endpoint really does need the device ID.

This is a pretty bad API!
2018-01-08 14:11:56 -08:00
Adrian Sampson
d0a4e3e823 Try out monitoring 2018-01-08 14:03:46 -08:00
Adrian Sampson
3f6b4f1bf8 Sketch unused monitoring stuff 2018-01-08 13:51:44 -08:00
Adrian Sampson
9bf7918314 Don't raise OK responses as errors 2018-01-08 13:25:50 -08:00
Adrian Sampson
04b4c7a6ce Special error for expired sessions 2018-01-08 13:09:04 -08:00
Adrian Sampson
375ee62ce3 Exceptions for API errors 2018-01-08 13:06:47 -08:00
Adrian Sampson
3e11db0f7b Further refactor deviceList API call 2018-01-08 12:06:54 -08:00
Adrian Sampson
7aacb19082 Refactor common request function 2018-01-08 12:00:01 -08:00
Adrian Sampson
7ff25e9eea Move OO interface to the library 2018-01-08 11:44:08 -08:00
Adrian Sampson
fc0a7943b5 Pull out the list of device data 2018-01-06 14:30:17 -08:00
Adrian Sampson
705b353718 Get device list 2018-01-06 14:29:51 -08:00
Adrian Sampson
009ed8e330 Move smoke test to its own file 2018-01-06 14:14:36 -08:00
Adrian Sampson
6a2f4321d3 More minimal login request 2018-01-06 14:10:47 -08:00
Adrian Sampson
c49d6b3edf Sufficient login request 2018-01-06 14:09:52 -08:00
Adrian Sampson
9e700f99b6 Extract access_token from response URL 2018-01-06 13:53:56 -08:00
Adrian Sampson
e053521bc5 Generate OAuth URL 2018-01-06 13:34:40 -08:00
Adrian Sampson
7cd0ce0ff1 Fetch gateway data 2018-01-06 13:21:57 -08:00