Comments (2)
Unfortunately, using this project requires a basic understanding of MQTT and, to integrate it with Home Assistant, how Home Assistant and MQTT work together. This knowledge is best gained by reading the Home Assistant MQTT documentation. The builtin Tuya component in Home Assistant has nothing to do with MQTT, it's a native component that talks directly to a special Home Assistant API which frontends Tuya Cloud and makes it very easy to control Tuya devices. It generally works reasonably well, but has a few quirks such as very slow state updates and it does require all commands to go through Tuya cloud. There is also a custom Tuya component for Home Assistant available to control Tuya devices locally called localtuya. If you don't have a strong understanding of Home Assistant and MQTT and your use case is specifically with regard to Home Assistant, then the localtuya project may be easier for you to use and I highly recommend it.
This project is simply acts as a bridge between Tuya devices and MQTT. It does not replace anything in Home Assistant, it simply connects to an MQTT broker just like Home Assistant does. That's pretty much all MQTT is a broker which various clients connect to, these clients publish messages to the broker and can also subscribe to topics to receive messages they are interested in from other clients.
If you have configured Home Assistant and the MQTT broker then all you need to do is setup this project to connect to the same broker and configure your device types and, during script startup, it will send automatic MQTT discovery via MQTT that Home Assistant will receive and automatically use to setup the devices.
If you have a device that is not supported "out-of-box" with this script (something other than a simple on/off or dimmable switch/light, or RGBTW light), then you'll need to create a custom template and manually define the device in Home Assistant, but this should not be required for a light.
from tuya-mqtt.
Great! This helped fill in the big part of this system that was missing for me. I hope my post will help someone else too.
I have this (tuya-mqtt) I think working after a a little tweaking of my devices file. My devices are now discovered by Home Assistant, and I can turn them on/off by issuing commands from HA's MQTT client. However as 'entities' they are showing as 'unavailable', which is a problem. I will continue to poke at it, and see if I can figure that out next.
EDIT: rebooted HA, all is well :-)
from tuya-mqtt.
Related Issues (20)
- Problem installing on Synology RS914 HOT 32
- tuya-mqtt publishes states only when app is opened. HOT 22
- What mqtt broker HOT 3
- Disconnected from device and never connects again ... HOT 6
- Samples for nodejs script HOT 9
- New Maintainer Needed HOT 4
- Not sure when you went into Maintenance mode HOT 3
- Command Syntax for friendly topics HOT 3
- Setting switch state of a smart switch (custom template) HOT 11
- zombe state reconnecting issue? HOT 1
- Switch w/ Energy: DPS values reported only once at tuya-mqtt startup HOT 3
- Sudenly wrong responses from tuya device HOT 1
- tuya-mqtt not working (OpenHab) HOT 7
- Tuya bulb stopped working from tuya-cli, tuja-mqtt HOT 9
- Devices behind zigbee gateway available with tuya-cli but not tuya-mqtt HOT 1
- Different names after service restart HOT 9
- tuya-mqtt crushing HOT 1
- hsb type not suported in generic template HOT 1
- Support Smart Switch TYWB 4ch-RF HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tuya-mqtt.