-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tinytuya2mqtt heads up #136
Comments
I love this @mafrosis ! I have been thinking about building a TinyTuya service that constantly monitors the network for UDP discovery traffic (does Tuya device IP/DI mapping to known keys from devices.json) and takes/sends events on devices as requested. Fronting this with mqtt is perfect. I am very interested to see how your project develops. I may start less device focused and build a core service out of TinyTuya first, but I think it would easily fit within your project and goals. I know the maintainers of I may have some time this weekend to look at this more. Thanks for raising this. |
Using UDP discovery is a really interesting idea. Happy to try something out on my network when you have some code available. The The idea for my little script was use MQTT autodiscovery as a "bridge" between HA and tinytuya. That means you don't need the tight-coupling of localtuya to get the tight integration with HA. Your project's API can develop independently of HA and the interface between the devices and HA is also completely uncoupled via MQTT - which makes it very easy to debug problems. Anyway, it works for me today, but the success/future of |
@mafrosis I have a start on a TinyTuya API server. It has a continuous thread monitoring for Tuya discovery UDP packets to map ID to IP. It also offers up a way to poll or set devices via API calls. Could this help with your bridge? @geNAZt mentioned an HA bridge too in #143 about adding new devices - take a look at @mafrosis project too. |
I made this on the weekend: https://github.com/mafrosis/tinytuya2mqtt
Basically I didn't really get on well with
localtuya
for a variety of reasons, and figured this decoupled approach might be more palatable. I'll run it in for a few weeks in my home automation setup and fix any bugs that come up.Although the code is very coupled to my set up (using 2 tuya fans), the bones of the code are there to extend this to support more different devices.
The text was updated successfully, but these errors were encountered: