vinodsr / node-red-contrib-tuya-smart-device

a node-red module for managing tuya smart devices
https://flows.nodered.org/node/node-red-contrib-tuya-smart-device
MIT License
47 stars 15 forks source link

Connecting to Tuya Device from Node Red in Docker Container #42

Closed FreeTechNick closed 3 years ago

FreeTechNick commented 3 years ago

Hi,

I can't connect to my tuya Device from Node Red in Docker Container. It is working from a Node Red directly installed on a Raspberry PI.

I added the Ports

- "6666:6666/udp"
- "6667:6667/udp"
- "6668:6668/udp"

to the container but with out success.

Any Tipp?

Thank you. Markus

vinodsr commented 3 years ago

Can you provide more details about the docker setup ( wsl windows etc ?)

Also please check if you can try with tuya-cli get command.

On Sat, 6 Feb, 2021, 11:05 pm FreeTechNick, notifications@github.com wrote:

Hi,

I can't connect to my tuya Device from Node Red in Docker Container. It is working from a Node Red directly installed on a Raspberry PI.

I added the Ports

  • "6666:6666/udp"
  • "6667:6667/udp"
  • "6668:6668/udp"

to the container but with out success.

Any Tipp?

Thank you. Markus

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/vinodsr/node-red-contrib-tuya-smart-device/issues/42, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADQ6OB2TFIBZEYD7Y6WCL3S5V4XFANCNFSM4XGPWOCA .

FreeTechNick commented 3 years ago

I’m running it on a Raspberry Pi with IOTstack. NodeRed is run in a docker container. If the Tuya Client I get also no connection and get a TimeOut Error. Thanks.

Am 06.02.2021 um 19:07 schrieb Vinod S R notifications@github.com:

Can you provide more details about the docker setup ( wsl windows etc ?)

Also please check if you can try with tuya-cli get command.

On Sat, 6 Feb, 2021, 11:05 pm FreeTechNick, notifications@github.com wrote:

Hi,

I can't connect to my tuya Device from Node Red in Docker Container. It is working from a Node Red directly installed on a Raspberry PI.

I added the Ports

  • "6666:6666/udp"
  • "6667:6667/udp"
  • "6668:6668/udp"

to the container but with out success.

Any Tipp?

Thank you. Markus

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/vinodsr/node-red-contrib-tuya-smart-device/issues/42, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADQ6OB2TFIBZEYD7Y6WCL3S5V4XFANCNFSM4XGPWOCA .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/vinodsr/node-red-contrib-tuya-smart-device/issues/42#issuecomment-774517055, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM36I4SS5XJSECWKJHUXAZ3S5WAMNANCNFSM4XGPWOCA.

vinodsr commented 3 years ago

Is this related to your issue ? https://github.com/TuyaAPI/cli/issues/37

Previously i had an issue with WSL 2 - ubuntu, where the tuya lookup using sockets gets blocked.

FreeTechNick commented 3 years ago

I was able to solve my problem. It was the above ports and only one client can access the Tuya device at a time.