A python client for Buffalo LinkStation
Project description
LinkStation client
This project create for handling Buffalo LinkStation NAS with original firmware. It's originally created to integrate with Home Assistant to display the current status of NAS such as online status, disk spaces used, and have ability to perform restart from within home-assistant.
Usage
import asyncio
from linkstation import LinkStation
async def main() -> None:
"""Run!"""
api = LinkStation("<LINKSTATION_ADMIN_USERNAME>","<LINKSTATION_ADMIN_PASSWORD>","<LINKSTATION_HOSTNAME/IP>")
# List all disks
disks = await api.get_all_disks_async()
for disk in disks:
_LOGGER.debug(disk + ': ' + await api.get_disk_status_async(disk))
active_disks = await api.get_active_disks_async()
for disk in active_disks:
# Get disk capacity in GB
diskCapacity = await api.get_disk_capacity_async(disk)
# Get current used disk space in GB
diskUsed = await api.get_disk_amount_used_async(disk)
# Get current used disk space in percentage (provided by LinkStation)
diskUsedPct = await api.get_disk_pct_used_async(disk)
asyncio.run(main())
Notes
All api testing based on Buffalo LinkStation Duo LS-WXL
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file linkstation-0.0.11.tar.gz.
File metadata
- Download URL: linkstation-0.0.11.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e23e7cfb13871077f5c3e81a4a8203f29405c523ba598f597660afcdd78b594b
|
|
| MD5 |
7e3ef67ce9fc52bcff5ca8f2e73f9ce0
|
|
| BLAKE2b-256 |
edefc77e8e4d508a7a34061280bd355a9e40201763ef94329543e4310ddf82f5
|
File details
Details for the file linkstation-0.0.11-py3-none-any.whl.
File metadata
- Download URL: linkstation-0.0.11-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78f08390118d4256342ed1b98f2c9c7c5be1f132e5c541e58bf09732ffc24511
|
|
| MD5 |
3caae44d1a678c537534ea8a42d62ad6
|
|
| BLAKE2b-256 |
7c0b8be89e6f1ab982af2821133122ada05944175d1372acfcf8899caa4872e4
|