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

Uploaded Python 3

File details

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

File metadata

  • Download URL: neosmartblue_py-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 d7b18668ce88a163538b11df6497b133fe1ee2516224a09239010c436f39a5ff
MD5 a95d7bc31d177500aa4279f6ec7093fd
BLAKE2b-256 4bcafe33b52baeb71a36a6f5eb6cc9ab3b406c0b850ab8d2ed96155264db5078

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for neosmartblue_py-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6c41575ec88c998b2341eb96018770add338ff90ddbca6cc52c9d9cd7e00c378
MD5 d84924074cbbeb6209c5be58df170fab
BLAKE2b-256 7734dd91caa1ddd1fa7ae18e85355195cf462a7300065d127ee780151d338559

See more details on using hashes here.

Provenance

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