# Remote access from Cloud NodeRED to Tuya Bridge

**URL:** https://discourse.nodered.org/t/remote-access-from-cloud-nodered-to-tuya-bridge/93339
**Category:** General
**Created:** [22 November 2024 08:23 UTC](https://discourse.nodered.org/t/remote-access-from-cloud-nodered-to-tuya-bridge/93339 "2024-11-22T08:23:39Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![its-Zeke](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/its-zeke/32/96641_2.png) [@its-Zeke](https://discourse.nodered.org/u/its-Zeke)
#### Post date: [22 November 2024 08:23 UTC](https://discourse.nodered.org/t/remote-access-from-cloud-nodered-to-tuya-bridge/93339/1 "2024-11-22T08:23:39Z")

</div>

Hey there,  
I have the following scenario:  
I would like to implement smart home for my grandmother.

1. From my home I connect the NodeRED in the cloud with the local Bridge. (how ?! 😃 )
2. I send the bridge to my granny and she connects the bridge using the Smart Life App, so she can share her local WiFi to the bridge.
3. As soon as the bridge is in her WiFi, i immediately can connect from my Cloud NodeRED to the bridge and control her devices.

Basically what i'm thinking of is to use the 'remote function' that the mobile smartphone application (Hue/Tuya/SmartLife etc..) is using by user credentials. That would be the 'normal' way. In my case the smartphone is the cloud NodeRED.

How can this be done ? Please think of that scenario without using a RaspPi, if possible.

Best regards,  
Marc

---

<div class="post-metadata">

### Author: ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)
#### Post date: [23 November 2024 19:26 UTC](https://discourse.nodered.org/t/remote-access-from-cloud-nodered-to-tuya-bridge/93339/2 "2024-11-23T19:26:27Z")

</div>

Welcome to the forums @its-Zeke

Sorry - But maybe simply what you want to do?

- What do you mean by "local Bridge"
- if you are sending A "Bridge" - what is that exactly?
- What is a "remote function"?

And for the record - I have removed this out of **Developing Nodes**. - As I don't believe it's related (at this stage)

---

<div class="post-metadata">

### Author: ![its-Zeke](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/its-zeke/32/96641_2.png) [@its-Zeke](https://discourse.nodered.org/u/its-Zeke)
#### Post date: [27 November 2024 08:47 UTC](https://discourse.nodered.org/t/remote-access-from-cloud-nodered-to-tuya-bridge/93339/3 "2024-11-27T08:47:29Z")

</div>

Hey Marcus,  
thanks for your answer!  
By local bridge i mean a common ZigBee Hub like Philips Hue or whatever Hub/Bridge is existing on the market. They usually implement a feature, that you can control your connected devices remotely. Meaning you can connect with your smartphone - not being in the same WiFi as the bridge is - to your home devices and light up a lamp or whatever!  
This function i would like to have in NodeRED.  
Yet i have only found bridge nodes, which i may use only when the NodeRED is in the same WiFi network as the bridge.

Hope that clears things out!

Best regards.

---

<div class="post-metadata">

### Author: ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)
#### Post date: [28 November 2024 19:02 UTC](https://discourse.nodered.org/t/remote-access-from-cloud-nodered-to-tuya-bridge/93339/4 "2024-11-28T19:02:27Z")

</div>

Ok...

So if I understand correctly.

Environment

- You [Remote Location]
- Grandmother [Where Bridge Is]

Need

- For your Node RED (or at least - one not at your Grandmothers home) to control said Bridge.

Processing......

Ok this is a complex setup, and one that needs to ensure security

I think you are going to need a proxy (Node RED at Grandmothers)  
One thought that comes to mind is : [zerotier](https://www.zerotier.com) (or the countless others)

Let me diagram.

 ![Screenshot 2024-11-28 at 19.01.12](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/4/34db497ce7c489132256ed1e71b3f7245b690958.png)

NOTE: You could also use MQTT (but that may require opening up ports)  
I think @TotallyInformation is quite good at these things and requirements

The idea here, is to create a private tunnel between the Node RED instances

Hope the above is a kick starter 😁

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [28 November 2024 19:52 UTC](https://discourse.nodered.org/t/remote-access-from-cloud-nodered-to-tuya-bridge/93339/5 "2024-11-28T19:52:27Z")

</div>

Personally, I (and probably a lot of others on the forum) would encourage you to use MQTT brokers and Node-RED instances on both ends. Use MQTT messages to do both any control and any feedback. This is likely to be rather more robust than trying to do it over just websockets - though that would most likely work as well. A bit more to do the initial setup but once done, it is pretty much fire and forget.

One thing to remember about MQTT is that you can bridge two brokers together so each Node-RED need only talk to its local broker and you simply tell the brokers which topic hierarchies you want to replicate.

To make the network connection, you absolutely must use one of the tools such as Zerotier. I think that is likely the correct tool for this job as it creates a private network for you. You will find a recent thread where a setup using Zerotier was documented. You could, if you are familiar with setting them up securely, use a more traditional VPN but then you'd need to mess with firewall rules most likely. With Zerotier you shouldn't need to do that.

---

<div class="post-metadata">

### Author: ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)
#### Post date: [28 November 2024 20:00 UTC](https://discourse.nodered.org/t/remote-access-from-cloud-nodered-to-tuya-bridge/93339/6 "2024-11-28T20:00:13Z")

</div>

2nd on MQTT.  
I think I was going for the less troublesome some setup.

But with aedes (I know that is frowned up on sometimes) - is just as good for this need as something like mosquitto.

But yeah - MQTT 👍

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [28 November 2024 20:07 UTC](https://discourse.nodered.org/t/remote-access-from-cloud-nodered-to-tuya-bridge/93339/7 "2024-11-28T20:07:30Z")

</div>

> [@marcus-j-davies](#):
>
> But with aedes (I know that is frowned up on sometimes)

Ha, not just sometimes! 🙂

Only because it is a HIMARS to break open a molehill. It is really resource hungry and really not needed when Mosquitto is simple to install and configure and is even more robust to run than Node-RED itself but it is really efficient in its resource use.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [28 November 2024 21:14 UTC](https://discourse.nodered.org/t/remote-access-from-cloud-nodered-to-tuya-bridge/93339/8 "2024-11-28T21:14:20Z")

</div>

> [@marcus-j-davies](#):
>
> But with aedes (I know that is frowned up on sometimes) - is just as good for this need as something like mosquitto.

I don't think aedes will do topic bridging for you.

> **[Mosquitto MQTT Bridge-Usage and Configuration](http://www.steves-internet-guide.com/mosquitto-bridge-configuration/)**
>
> How to configure the Mosquitto broker as a bridge. Basic configuration and topic remapping

---

<div class="post-metadata">

### Author: ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)
#### Post date: [29 November 2024 07:20 UTC](https://discourse.nodered.org/t/remote-access-from-cloud-nodered-to-tuya-bridge/93339/9 "2024-11-29T07:20:51Z")

</div>

If you would have Node-RED instances on both ends, would it no be safe enough if you use a MQTT service of some kind with the security options they do provide? Like HiveMQ or similar? Or would it be recommended to use use Zerotier as well?

Or isn't this a case for FlowFuse Cloud? Besides the monthly cost...

---

<div class="post-metadata">

### Author: ![its-Zeke](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/its-zeke/32/96641_2.png) [@its-Zeke](https://discourse.nodered.org/u/its-Zeke)
#### Post date: [29 November 2024 07:47 UTC](https://discourse.nodered.org/t/remote-access-from-cloud-nodered-to-tuya-bridge/93339/10 "2024-11-29T07:47:35Z")

</div>

Thank you all for your feedback and discussions!  
@krambriw Ye, i am currently using FlowFuse as well, but yet i was communicating between both, the Cloud and the local NodeRED 'somewhere else' over http requests. But as soon as i implement new functions, i need to adapt the local NodeRED, thus i need to access the wifi of the local NodeRED again, which is sometimes not possible, because my granny lives somewhere else.  
The edge developing of FlowFuse would be the thing, but quiet expensive imo. Especially when you have multiple devices. At the end of the day i guess the edge developing thingy is nothing else than MQTT ?

---

<div class="post-metadata">

### Author: ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)
#### Post date: [29 November 2024 08:09 UTC](https://discourse.nodered.org/t/remote-access-from-cloud-nodered-to-tuya-bridge/93339/11 "2024-11-29T08:09:33Z")

</div>

For normal "run time" I personally would consider a MQTT cloud service as I mentioned. All your grannys (if you have several) could have their own Node-RED instance that communicates sensor data to your "admin" instance. Commands could be sent "down" from your your "admin" instance by just addressing the proper topic. I once tested to stream video via public MQTT cloud service and it worked surprisingly well, I would say "good enough to make a live visit" to check things are ok. Or could also just send snapshots initiated by commands. Just be sure, if you have a payed plan, not to stream high resolution live video too much, check the eventual costs first

From security point of view, you do not have to open any ports in yours or your grannys firewalls to use a public MQTT cloud service

Now the next use case; you need to maintain the local Node-RED flows as well. Well, this will require you to have a possibility to "reach out" to each and every grannys local computer. VNC, Teamviewer, etc or if you like and have the patience to install & set it up, a local VPN server at each grannys location. Or FlowFuse, budget dependent...and depending on how many grannys to support

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [28 January 2025 08:10 UTC](https://discourse.nodered.org/t/remote-access-from-cloud-nodered-to-tuya-bridge/93339/12 "2025-01-28T08:10:07Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
