Skip to main content

A Python library for controlling Neo Smart Blinds via BlueLink Bluetooth connection

Project description

NeoSmartBlue Python Library

A Python library for controlling Neo Smart Blinds via BlueLink Bluetooth connection.

Installation

pip install neosmartblue-py

Usage

Scanning for devices and reading status from advertisements

import asyncio
from src.neosmartblue.py import scan_for_devices

async def main():
    # Scan for nearby Neo Smart Blinds devices
    devices = await scan_for_devices(timeout=15.0)
    if not devices:
        print("No devices found.")
        return
    
    for device in devices:
        print(f"Device Address: {device['address']}")
        print(f"Device Name: {device['name']}")
        print("Status:")
        for key, value in device['status'].items():
            print(f"  {key}: {value}")
        print()


asyncio.run(main())

Controlling a device

import asyncio
from neosmartblue.py import BlueLinkDevice

async def main():
    # Replace with your device's MAC address
    device = BlueLinkDevice("XX:XX:XX:XX:XX:XX")
    
    # Connect to the device
    await device.connect()
    
    try:
        # Move blinds to 50% closed position
        await device.move_to_position(50)
        
        # Stop movement if needed
        # await device.stop()
    
    finally:
        # Disconnect from device
        await device.disconnect()

asyncio.run(main())

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

neosmartblue_py-0.1.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

neosmartblue_py-0.1.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file neosmartblue_py-0.1.0.tar.gz.

File metadata

  • Download URL: neosmartblue_py-0.1.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for neosmartblue_py-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e324a3d2370256d212b059d3ff4f6eabc028e09d0eaec47fd19a0ce4350b64c2
MD5 607767e5288df778f043dcdb5dc7b46d
BLAKE2b-256 912ef2583d2edbe03e418fcd841c675f55631775191a3912d6dc737b39aa732d

See more details on using hashes here.

Provenance

The following attestation bundles were made for neosmartblue_py-0.1.0.tar.gz:

Publisher: publish.yml on ikifar2012/neosmartblue.py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file neosmartblue_py-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for neosmartblue_py-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5470a853670e590fae63548a126b27ebbc4d93663e65bf531bba2c0121ae0df6
MD5 b8fd1bd7e53d35dcef93f527c81abbd8
BLAKE2b-256 677df27be8ea5d5d606cac4609d8a93f76da63f8c8542ba3aad51956109dade4

See more details on using hashes here.

Provenance

The following attestation bundles were made for neosmartblue_py-0.1.0-py3-none-any.whl:

Publisher: publish.yml on ikifar2012/neosmartblue.py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page