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 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.2.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.2-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: neosmartblue_py-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 2ad01fdfda7dfbcc1e88a7f99d498b8d22389f52b40334b318661868bc09115f
MD5 af31539e70ba30347ee55d365835c09a
BLAKE2b-256 2ebe03a6f21be238236ea1f1ece72e9454e756cba1d007cb3daeff20e89915e5

See more details on using hashes here.

Provenance

The following attestation bundles were made for neosmartblue_py-0.1.2.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.2-py3-none-any.whl.

File metadata

File hashes

Hashes for neosmartblue_py-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5eddf6a03cb63d304646892b89bfb5d7f41da1210936d6ea6e8bb4e5e15425bb
MD5 fab24d46afbf3c416bf884521f45241f
BLAKE2b-256 d044ca102320dac19a9b57e1190da59c2226e519133e1eb0906abc7af1200c56

See more details on using hashes here.

Provenance

The following attestation bundles were made for neosmartblue_py-0.1.2-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