Skip to content

Commit

Permalink
Update README.md for recent config location changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jinnatar committed Apr 4, 2017
1 parent d7f4bf1 commit bd8e7ae
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,21 @@ print(multisensor.getMultisensorData(devices))
from cozify import cloud
cloud.authenticate()
# authenticate() is interactive and usually triggered automatically
# authentication data is stored in ~/.config/python-cozify.cfg
# authentication data is stored in ~/.config/python-cozify/python-cozify.cfg
```
### authenticate with a non-default state storage
```python
from cozify import cloud, config
config.setStatePath('/tmp/testing-state.cfg')
cloud.authenticate()
# authentication and other useful data is now stored in the defined location instead of ~/.config/python-cozify.cfg
# authentication and other useful data is now stored in the defined location instead of ~/.config/python-cozify/python-cozify.cfg
# you could also use the environment variable XDG_CONFIG_HOME to override where config files are stored
```

## Current limitations
* Right now tokens are assumed to never expire and their functionality is not questioned.
* Token functionality is sanity-checked up to a point and renewal is attempted. This however is new code and may not be perfect.
* For now there are only read calls. New API call requests are welcome as issues or pull requests!
* authentication flow is as automatic as possible but still a bit fragile. Any reported issues are very welcome.
* authentication flow is as automatic as possible but if the Cozify Cloud token expires we can't help but request it and ask it to be entered. If you are running a daemon that requires authentication and your cloud token expires, run just the authenticate() flow in an interactive terminal and then restart your daemon.

## Sample projects
* [github.com/Artanicus/cozify-temp](https://github.com/Artanicus/cozify-temp) - Store Multisensor data into InfluxDB
Expand Down

0 comments on commit bd8e7ae

Please sign in to comment.