Skip to main content

Python middleware for Tuya WiFi smart devices to MQTT

Project description

TuyaGateway logo

The devices you purchase are defacto your property. You should be able to fully control all aspects of it, without a man in the middle. Be it just flicking a switch or reading data from it. The man in the middle might be benign now, but can you really trust a commercial company with your personal data? Regain control over what is rightfully yours.

We've made a library that communicates locally with your Tuya devices (no internet connection needed), called TuyaFace. The library is open-source and can be used in your own software if you choose to do so. But we did the heavylifting already for you. TuyaGateway implements the library and communitates over an open protocol (MQTT) with your home automation software. All relevant home automation software packages (e.g. Home Assistant) are able to work with MQTT.

Great! But what about GismoCaster? GismoCaster is the control-center for TuyaGateway. In a webinterface you can add your devices, set names for them, etc. So, no programming required and no dabbling around in obscure text files which will break when you add a tab to many.

Network

A bit more technical

TuyaGateway listens on MQTT topics and routes requests to your Tuya devices. In earlier versions the configuration was based on a one to one topic translation in e.g. Home-Assistant config-files. 1:1 topic translation is limited to simple tasks (like switching ON/OFF); only boolean values.

From v1.1 onwards Tuya device configuration can be done with GismoCaster. In which you can set discovery messages for both TuyaGateway and Home Assistant and opens up the ability to set boolean/integer/float/string types.

The goal for version v2.0 is to add input/output processing functions and to improve on HA message values. Next to structural improvements to the code. The topic configuration option will be removed.

Docs

https://github.com/TradeFace/tuyagateway/wiki

Get involved!

Anyone who is willing to test, write code, add documentation, etc. is welcome to make a contribution.

Acknowledgements

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

tuyagateway-2.0.0.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

tuyagateway-2.0.0-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file tuyagateway-2.0.0.tar.gz.

File metadata

  • Download URL: tuyagateway-2.0.0.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for tuyagateway-2.0.0.tar.gz
Algorithm Hash digest
SHA256 a4890bd831bcc5da5613ea02308e5aa7e59ed09746a3496d99e1cbbf324fd98e
MD5 6da3843eb3f9ebc2a4ff74da755b32f2
BLAKE2b-256 51985b2cb8e10ce8ef1f309b5e3aa15cef21fc31f4d6f8d13eb56d7c3ae79cee

See more details on using hashes here.

File details

Details for the file tuyagateway-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: tuyagateway-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for tuyagateway-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5cca32cb360720fd7601d3529857a4849ca47a48b6e9d60312a05db900da8c71
MD5 6438be77bab53691227491da040f91fd
BLAKE2b-256 618851c4855ffcf3d50f4a3ed5dd19cfd9c6496e7a99b884bf436ff5b34458be

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page