Skip to content

Commit

Permalink
Add Python packaged TinyTuya
Browse files Browse the repository at this point in the history
  • Loading branch information
grosjo committed Nov 25, 2024
1 parent 0b04156 commit 4feec58
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions lang/python/python-tinytuya/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#
# Copyright (C) 2021 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=tinytuya
PKG_VERSION:=1.15.1
PKG_RELEASE:=1

PKG_SOURCE:=v$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/jasonacox/tinytuya/archive/refs/tags/v$(PKG_VERSION).tar.gz
PKG_HASH:=26ac116722a241bf59daf5315ce0ffe751c1babea9a146ffc0a389f1af3facca

PKG_MAINTAINER:=Jason Cox <[email protected]>
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE

include ../pypi.mk
include $(INCLUDE_DIR)/package.mk
include ../python3-package.mk

define Package/python3-tinytuya
SUBMENU:=Python
SECTION:=lang
CATEGORY:=Languages
TITLE:=Python module to interface with Tuya WiFi smart devices
URL:=https://github.com/jasonacox/tinytuya
DEPENDS:= \
+python3-cryptography \
+python3-requests \
+python3-colorama \
+python3-charset-normalizer
endef

define Package/python3-tinytuya/description
This python module controls and reads state of Tuya compatible WiFi Smart Devices (Plugs, Switches, Lights, Window Covers, etc.) using the local area network (LAN) or the cloud (TuyaCloud API). This is a compatible replacement for the pytuya PyPI module and currently supports Tuya Protocols 3.1, 3.2, 3.3, 3.4 and 3.5.
Tuya devices are designed to communicate with the TuyaCloud but most also expose a local area network API. This allows us to directly control the devices without using the cloud. This python module provides a way to poll status and issue commands to these devices.
endef

$(eval $(call Py3Package,python3-tinytuya))
$(eval $(call BuildPackage,python3-tinytuya))

0 comments on commit 4feec58

Please sign in to comment.