TheAgentK / tuya-mqtt

Nodejs-Script to combine tuyaapi and openhab via mqtt
MIT License
173 stars 80 forks source link

Maintainer wanted! #24

Closed TheAgentK closed 4 years ago

TheAgentK commented 5 years ago

Hello folks,

Unfortunately I have to inform you that I will not develop this project any further at the moment. I've completely switched to Tasmota devices, so I don't need this interface anymore.

Please feel free to develop and use the project further!

Best regards TheAgentK

tsightler commented 5 years ago

Hi TheAgentK,

I'm willing to take over maintenance of this project as I have a number of enhancements I'm currently working on, some already in my tree, including compatibility with TuyAPI 5.1.1, including device auto-discovery and Tuya protocol 3.3. support. Also, in queue is Home Assistant MQTT discovery support and perhaps even a hassio plugin for Home Assistant. I'm also maintaining a ring-alarm-mqtt script used mostly with Home Assistant so it fits it with that.

Let me know if you're interested and we can discuss the details.

TheAgentK commented 5 years ago

Hey @tsightler, that'd be great. I'll add you as a collaborator in the project. Everything else we can clarify then if necessary privately. Thank you very much for your support. If I use Tuya devices again sometime, I will also support this project again. If you need more privileges or anything else, just contact me.

A little off-topic, where do you come from? I am from Germany.

tsightler commented 5 years ago

That sounds great @TheAgentK. I'll begin reviewing issues and checking on the possibility of merging some of the outstanding pull request.

I do have one question. I notice in tuya-device.js you have a custom "get" method but it appears to be nearly identical to the get function that already exist in tuyapi 4.0.3. In your comments it says it includes more logging, but I couldn't find any actual difference. Is this perhaps something left over from a previous tuyapi version. I see that the tuyapi get() code was much less robust in the early 3.x days. I had problems with the custom get() function with the tuyapi 5.x API, so I completely removed it in my tree since I couldn't see how it was different and everything seems to work fine, but I wasn't sure if I was missing something.

I am located in southeastern US (South Carolina). I work with a number of colleagues in Germany on a regular basis in my day job.

tsightler commented 5 years ago

Looking at the custom get a little deeper I see there is an extra try/catch section but it's still not clear to me why you needed this. It seems this was added when you integrated support for 4.0.x tuyapi. Was there some specific bug you were attempting to work around in tuyapi?

TheAgentK commented 5 years ago

Hey @tsightler , excuse me, I have so little time right now.

The try/catch block should fix a bug. Sometimes the DPS object in "data" was not correct. This caused an error when calling resolve(data.dps['1']]);. Maybe this has already been fixed.