Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/Releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
python -m build

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
uses: softprops/action-gh-release@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,8 @@ testing_scripts/api_test_editor.py
testing_scripts/yamltest.yaml
testing_scripts/yamltest copy.yaml
creds.json
docstest/*
docstest/*
.claude/settings.local.json
.mcp.json
.vesync_auth
**/CLAUDE.md
244 changes: 114 additions & 130 deletions README.md

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions docs/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import asyncio
from pyvesync import VeSync

async def main():
with VeSync(username="example@mail.com", password="password") as manager:
async with VeSync(username="example@mail.com", password="password") as manager:
# Login
success = await manager.login()
if not success:
Expand All @@ -36,15 +36,15 @@ import asyncio
from pyvesync import VeSync

async def main():
with VeSync(username="example@mail.com", password="password") as manager:
async with VeSync(username="example@mail.com", password="password") as manager:
# Load credentials from a dictionary
credentials = {
"token": "your_token_here",
"account_id": "your_account_id_here",
"country_code": "US",
"region": "US"
}
success = await manager.set_credentials(**credentials)
manager.set_credentials(**credentials)

# Or load from a file
await manager.load_credentials_from_file("path/to/credentials.json")
Expand All @@ -54,7 +54,7 @@ asyncio.run(main())

### Credential Storage

Credentials can be saved to a file or output as a json string. If no file path is provided the credentials will be saved to the users home directory as `.vesync_auth`.
Credentials can be saved to a file or output as a json string. If no file path is provided the credentials will be saved to the users home directory as `.vesync_token`.

The credentials file is a json file that has the keys `token`, `account_id`, `country_code`, and `region`.

Expand All @@ -66,12 +66,12 @@ from pyvesync import VeSync
async def main():
token_file = Path.home() / ".vesync_token"

with VeSync(username="example@mail.com", password="password") as manager:
async with VeSync(username="example@mail.com", password="password") as manager:
# Login and save credentials to file
success = await manager.login(token_file_path=token_file)
success = await manager.login()
if success:
# Save credentials to file
manager.save_credentials(token_file)
await manager.save_credentials(token_file)

# Output credentials as json string
print(manager.output_credentials_json())
Expand Down
2 changes: 1 addition & 1 deletion docs/development/capturing.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This document outlines the steps to capture network packets for adding support f

The process outlined below is time consuming and can be difficult. An alternative method is to temporarily share the device. If you would prefer this method, please indicate in an issue or contact the maintainer directly. Sharing a device is done by going to the device settings and selecting "Share Device". Please create a post to notify the maintainers to receive the correct email address to share the device with.

Please do not post a device request without being will to either capture packets or share the device.
Please do not post a device request without being willing to either capture packets or share the device.

## Prerequisites

Expand Down
Loading
Loading