-
- Downloads
Begin transition from libpurecool to libdyson
Recently Dyson changed their API which broke libpurecool[1]'s integration. This resulted in prometheus-dyson being unable to enumerate devices via Dyson, and thus fail to restart successfully. libdyson refactors libpurecool with a clearer separation between the online Dyson API & the device-interaction logic. This allows us to perform a one-time login to Dyson and cache device information locally, removing the need for repeated logins to Dyson. libdyson also has a more consistent API between different models. This change starts the transition by introducing login component (account.py) and an adapter (libpurecool_adapter) to use the cached information with libpurecool. This also adds a flag (--create_device_cache) to perform the login&OTP dance with Dyson and generate the needed configuration. [1] https://github.com/etheralm/libpurecool/issues/37
Showing
- BUILD 43 additions, 3 deletionsBUILD
- WORKSPACE 24 additions, 11 deletionsWORKSPACE
- account.py 83 additions, 0 deletionsaccount.py
- config.py 98 additions, 0 deletionsconfig.py
- config_test.py 79 additions, 0 deletionsconfig_test.py
- libpurecool_adapter.py 50 additions, 0 deletionslibpurecool_adapter.py
- libpurecool_adapter_test.py 55 additions, 0 deletionslibpurecool_adapter_test.py
- main.py 25 additions, 71 deletionsmain.py
- mypy.ini 10 additions, 0 deletionsmypy.ini
- requirements.txt 2 additions, 1 deletionrequirements.txt
Loading
Please register or sign in to comment