Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/breitburg/python-am43
AM43 blinds motor protocol library
https://github.com/breitburg/python-am43
am43 blinds bluetooth python
Last synced: 2 months ago
JSON representation
AM43 blinds motor protocol library
- Host: GitHub
- URL: https://github.com/breitburg/python-am43
- Owner: breitburg
- License: gpl-3.0
- Created: 2020-08-10T15:21:33.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-12-11T02:18:29.000Z (about 1 year ago)
- Last Synced: 2024-10-13T15:11:00.995Z (3 months ago)
- Topics: am43, blinds, bluetooth, python
- Language: Python
- Homepage: https://pypi.org/project/am43/
- Size: 37.1 KB
- Stars: 7
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# python-am43 ![](https://img.shields.io/pypi/dm/am43)
AM43 Blinds Motor protocol client implementation written in Python. Before using, please configure the blinds motor with the app on your phone. Credits to [Bas Bahlmann](https://github.com/TheBazeman) for the checksum calculation algorithm.
> **Warning**
> Only Linux is supported. Everything was tested on Raspberry Pi 4.
> Blinds motor is available to buy [here](https://www.aliexpress.com/item/4000025499519.html) for about $40.## Usage
To search for single blind use `am43.search` method:
```python
import am43 # Library importblind = am43.search('xx:xx:xx:xx:xx:xx') # Returns single blind
blind.set_position(percentage=30) # Sets blinds position
```To use multiple blinds, simply define the addresses in the `am43.search` method. It will return a list with a blinds:
```python
blinds = am43.search(
'xx:xx:xx:xx:xx:xx',
'xx:xx:xx:xx:xx:xx',
'xx:xx:xx:xx:xx:xx'
) # Returns multiple blinds instances
```You can stop the blinds using `Blind.stop` method:
```python
blind.stop() # Stops blinds
```Also, you can access the motor properties:
```python
properties = blind.get_properties() # Fetch current dataproperties.battery # 95
properties.position # 100
properties.light # 23
```The light property will be zero if the sensor is not plugged in to the blind motor.
## Installation
To install the latest version you can use `pip` by executing that command:
```bash
$ pip install am43
```All the requirements will be installed automatically.
## Requirements
Full list of all dependencies you can find in `setup.py` file:
- `bluepy` >= 1.3.0
- `munch` >= 2.5.0And you need to have a Bluetooth module on your machine. On Raspberry Pi (>=3) it is already on the board.