WiFi and Mobile Data

Hi

I have connected my TP-LINK lights via Wifi and node-red raspberry.

I also added 3G dongle on my raspberry PI to provide back up for internet access.

Now, how would i able to configure/develop to switch the communication between TP-LINK lights to Node Red from Wifi to 3G?

In a nutshell, i want to be able to provide a communication backup for the connected devices in the event wifi goes down.

appreciate any help here.

thanks

Can you provide a link to the TP Link lights that you are using that can use both wifi and 3G?

Hi

I am using LB120 model.

I haven't configure to use both and that's the part i am trying to figure out. So far, i am using my wifi to connect to these devices. I want to be able to use both wifi and mobile data. Mobile data will serve as a backup in the event wifi goes down.

The LB120 model is just one of many other devices that i have been using.

thanks

You need to understand a bit about networking first - sorry if you already know this.

When you add a second network to a device, you now need to also provide a way for traffic to be routed between the two networks.

Typically, when you set up a server on a device that needs network access, the default configuration will listen/talk to all active network channels.

In your case, I assume that you want to still be able to control things if your internet goes down. In that case, you need a way to be able to connect direct to your Pi over 3G. In doing so, you need to realise that you are entering your network in a different place to usual. Normally it is best to add 3G to your router rather than a different device since that makes the topology a lot more complex.

The simplest answer is likely to be that you need to know the external IP address of your 3G dongle which you then connect to directly from a remote device - over SSH for example. That gets you to the command line of the Pi (or the Pi's desktop if you are using that) and you can then use that to control Node-RED.

The usual caveats about security apply of course!

But if the wifi goes down, being able to access the pi isn't going to help. @deven2020 wants to be able to connect to the lightbulb when the wifi goes down.

I would suggest that @deven2020 contacts TP Link support to see how it is possible.

Oops, misread that. You are right, if the WiFi goes down, having a 3G dongle on the Pi won't help at all since there cannot be any connection to the bulb unless it also has an alternative wireless connection option.

What you need to do is to add the 3G backup to your router not the Pi. That way, if WiFi goes down, you can at least connect to the router and reset it.

Hi

thanks for your feedback. I have a very basic knowledge in networking. :slightly_smiling_face:

Now, it's fine when you have 5 devices connected to one PI with a dongle attached to it and configure 3G in the router. What happens when you have 100 different Pi and Dongle attached to them. Please see the below image.

The same method possible?

This will only help if the lights are directly attached (wired) to the Pi's. They aren't of course since they are WiFi connected.

So there is no route between your Pi (or anything else for that matter) if your WiFi goes down.

The only thing that will help is a 3G dongle attached to your router.

Here is your local network:

If the WiFi fails:

No connection to the bulb from anywhere - doesn't matter how many Pi's and dongles you have.

But if the dongle is attached to the router:

When the WiFi goes down, the router is still accessible and you can reset the WiFi remotely as long as you have something set up that lets you access the router - e.g. a VPN - or SSH into the router.

Even better if you have at least one Pi wired to the router and have a VPN set up either on the router or on the Pi - alternatively, set up a NAT route in the router that exposes SSH on the Pi to the Internet (use a high, random port for the external connection so you don't get bombarded with SSH hacking attempts from bots):

As you can see, you don't really need a 3G router at all unless your broadband isn't stable.

1 Like

Hi

thanks for the detail analysis.

Appreciate it.

Allow me to give it a try and see how best it works out.

thanks