GyverTwinkApi
Модуль для управления умной адресной гирляндой GyverTwink
Возможности
- Поиск устройств в локальной сети
- Управление гирляндой
- Включение/выключение
- Установка яркости
- Установка скорости
- Смена эффектов
- Уставнока таймера
- Получение настроек гирлянды
Установка
Через менеджер пакетов pip:
pip install GyverTwinkApi
Использование
from gyvertwink import GyverTwink
# Поиск гирлянд в локальной сети
twinks = GyverTwink.discover("192.168.0.255") # Передаём адрес локальной сети
twink = twinks[0]
# Подключение к гирлянде по ip
twink = GyverTwink("192.168.0.100")
# Включение и выключение гирлянды
twink.on()
twink.off()
# Установка яркости
twink.set_brightness(150)
# Получение текущих настроек гирлянды
settings = twink.get_settings()
print(settings)
# Переключение эффекта на следующий
twink.next_effect()
# Выбор эфекта по номеру (также возвращает словарь словарь с информацией о выбранном эффекте (favorite, scale, speed))
print(twink.select_effect(3))
# Настройка текущего эффекта
twink.set_favorite(True)
twink.set_scale(10)
twink.set_speed(20)
# Установка таймера выключение
twink.set_timer(True)
twink.set_timer_value(60) # от 1 до 240
# Установка автоматической смены режимов
twink.set_auto_change(True)
twink.set_random_change(True) # рандомная смена режимов
twink.set_change_period(True) # период смены режимов
Поддержка
Если у вас возникли сложности или вопросы по использованию проекта, создайте обсуждение в данном репозитории или напишите мне в телеграме @DeveloperDK
Полезные ссылки
- GyverTwinkHA - интеграция GyverTwink в Home Assistant (Мой проект)
- GyverTwink - страница проекта @AlexGyver
Metadata
Release files for GyverTwinkApi 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| GyverTwinkApi-1.0.1.tar.gz | 19.4 kB | Without provenance | Details for GyverTwinkApi-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| GyverTwinkApi-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for GyverTwinkApi-1.0.1-py3-none-any.whl |
Total release size: 37.7 kB
Release files / GyverTwinkApi-1.0.1.tar.gz
| Download URL | GyverTwinkApi-1.0.1.tar.gz |
|---|---|
| Size | 19.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
23b71cecfffd9f85db335e29cd8ec0e040683ba69ba49b9e9f8af3cd13c6f219
|
|
BLAKE2b-256 checksum How to use checksums |
20f41bf42cbc4e65b88e37d85159d2d699e8fc31f6c203dc81d1ca35324c8d84
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.0
|
Release files / GyverTwinkApi-1.0.1-py3-none-any.whl
| Download URL | GyverTwinkApi-1.0.1-py3-none-any.whl |
|---|---|
| Size | 18.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7949bf21909f79d331db165d2437d2536dd22f4fd54d10365a7ffc13e9de6e1e
|
|
BLAKE2b-256 checksum How to use checksums |
d74e6b3848345672c3ecd2280b617e5541ed7b5bd71c8a0329208eec8b3f267e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.0
|
Security for GyverTwinkApi 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.