TheAgentK / tuya-mqtt

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

TuyaApi Issue #1

Closed RR2301 closed 5 years ago

RR2301 commented 5 years ago

Hi,

I am struggling since last few days to implement tuyaapi . My scenario is very simple - I want to control tuya smart plug through raspberry pi( openhab2) I am following the steps exactly as you suggested.

Step 1 : I download the code from https://github.com/TheAgentK/tuyaapi_openhab $ git clone git@github.com:codetheweb/tuyapi.git As per the instruction it should create a folder tuyaapi_openhab but post git extraction I am seeing tuyapi folder - under my script folder (/etc/openhab2/scripts)

Step 2 : npm i @tuyapi/cli -g ( successfully executed)

Step 3 : tuya-cli link-wizard ( failing) ( I got the Access ID and Access key from Tuya. Also validated from $Tuyapi cli -list command._

Step 4: node tuya.js --ip=DEVICEIP --id=DEVICEID --key=DEVICEKEY COMMAND ERROR : I don’t find any tuya.js file anywhere inmy folder . I have the ip,I’d and the key. Am I missing anything ?

Appreciate your quick help.

LordArchidux commented 5 years ago

Hej,

I'm also looking into this project and wanted to try it out. However, I ran into the same issue, that you, @RR2301 , describred above: The file tuya.js is not included in the repository. It would be nice, if the developer (@TheAgentK ) could provide some info (or the file itself).

Best regards LordArchidux

TheAgentK commented 5 years ago

Hey,

sorry for my late reaction, I have a lot of work to do at the moment and develop this project only sporadically. I just reworked the whole project and uploaded a completely new version. The project is now a standalone MQTT client and not a script anymore.

Thus the devices in the network can be addressed directly by MQTT.

The whole project is completely based on the TuyaAPI from codetheweb (https://github.com/codetheweb/tuyapi). I just developed a MQTT client for it.

If you have further problems or questions, just ask.