Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Sonoff WiFi relay switch connection problem (and some questions)

Status
Not open for further replies.

Asheekay

Member
So I got a sonoff smart WiFi switch (RE5V1EC) to safely initiate all my potentially lethal chemical ignitions (methane balloons, chlorate powered rockets, enclosed butane vapors and all other cheap pyrotechnics you can imagine).

I quickly realized that:

1- it's a headache configuring this sonoff switch and successfully connecting it to my phone.

2- it was built for this type of rare use, but for a permanently powered type scenarios (smart home and all).

Here I discuss the first issue. After I was able to put the device in connection mode (after much frustration and googling), I was finally able to connect to it as a WiFi router.

Now comes the puzzling part. It's about the app eWeLink.

Screenshot_2022-09-28-13-13-31-77.jpg


I select Quick Pairing (because the device supports eWeLink) and I get this:

IMG-20220928-WA0002.jpg


This takes me to my phone settings and no matter what I click or select, it never successfully finds an "access point for device sharing" (whatever that means).

Any help in this regard will be greatly appreciated. Thanks.
 
Here I discuss the first issue. After I was able to put the device in connection mode (after much frustration and googling), I was finally able to connect to it as a WiFi router.

Now comes the puzzling part. It's about the app eWeLink.

Does it just mean, that in the phone app you choose the name of the device itself, that is in access point mode??
 
You can underline, bold and italic that all you want, but Sir, you are incorrect. How do you share your phone's cellular internet if not by wifi????

Ok, you are right to a very limited degree with some phones. If you turn on your Hotspot, you may not be able to be connected to upstream wifi (i.e., your home wifi) but the use case of using a Sonoff with a "local" network provided by your phone will work.
Look all I am pointing out is what I posted. You can't setup the phone as a WiFi hot spot and then use it with a WiFi app like E-Welink. All I did was quote what I read. Now if you believe different or your phone can be used as a hot spot and also use itself WiFi applications it's cool with me, maybe some can as I mentioned. Now if you disagree I suggest you take it up with the links I posted rather than me. I am just the messenger. :)

I also agree and suggested to just get a wireless relay card. They can be had in a 4 channel version and work well out to 100 meters in an unobstructed line of sight and less with obstructions but for playing around with pyrotechnics that's about all that is needed.

Ron
 
Last edited:
You are the one who dug in your heels and said it's impossible. Yet I have done exactly what I explained when we've had internet outages.

The Sonoff doesn't know if the network is coming from some box on the shelf or your phone. When your phone is set up as a hotspot, it has wifi and a connection to internet. Of course it works.
 
I stand slightly corrected.

1. To initially pair a Sonoff device, your phone must be logged into a wifi network which you have the password and SSID for. Enter this info into Ewelink, and pair the Sonoff device.

2. After that, from any location you (and the Sonoff) are at, enable your phone hotspot with the same SSID and password. After half a minute to let the Sonoff connect, you can control it from your phone.

I'm in the car a mile from home, well out of home wifi range. The phone's hotspot is configured as stated above, so it is the Sonoff's connection. The Sonoff responds to commands as expected.

My hotspot only functions when I have a cell signal, so you must have a cell signal for this scheme to work. But when you configure the Sonoff on a "real" wifi network, it works great and exactly as expected on a mobile hotspot.

Screenshot_20221001_133818_Settings.jpg


20221001_133854.jpg


20221001_133919.jpg
 
You are the one who dug in your heels and said it's impossible. Yet I have done exactly what I explained when we've had internet outages.
I never insisted it was impossible and will let it go at that. Go back and read what I said and what I linked to. That's it.

OK you created a mobile hot spot and paired with the device. That's not the issue. The issue is after creating the hotspot and pairing with the device can you use that same phone while a hot spot to control the device? That is the point of all of this.

Ron
 
Last edited:
OK you created a mobile hot spot and paired with the device. That's not the issue. The issue is after creating the hotspot and pairing with the device can you use that same phone while a hot spot to control the device? That is the point of all of this.

Yes, I thought that was rather obvious since I I stated that in bold underlined text in my post that explained the exact steps required. But you don't want to believe I know a damned thing about Sonoffs so I give up.

I did my best to demonstrate it. I'm done.
 
But you don't want to believe I know a damned thing about Sonoffs so I give up.
No that's not even close. I believe you know plenty. What I don't know is hoe to use a single phone as a hot spot and while that phone is setup as a hot spot to use that same phone to turn on and off a WiFi relay card On and Off.

I go into settings / connections and choose Mobile Hotspot and Tethering. When I tap Mobile Hotspot I get a warning "to use mobile hotspot WiFi needs to be turned off. The turn Off option is right there. So OK I enable hotspot and that turns off WiFi. Now the phone is a hotspot and works just fine as a hotspot. My computer, my wife's computer and my wife's cell all can see it and use it. but I cant use it for anything other than a hotspot, I can't turn and Off with it. Just won't work on my phone.

All here nor there since we have no idea what the thread starter is doing? In your last pictorial the final image shows mobile hotspot off.

Ron
 
Tethering is EXACTLY what you DON'T want. That turns off the wifi access point that the phone creates.

A hotspot, at least on any phone within a couple generations, sets up a wifi access point.
 
No, I get it about tethering and what you are saying. When I said "I go into settings / connections and choose Mobile Hotspot and Tethering". I was describing the opening screen. Mobile Hotspot and Tethering not saying to use tethering.

Hot Spot 1.png


So next I choose Mobile Hotspot and get the following with the notation about WiFi.
Hot Spot 2.png


At this point just click OK and the mobile hotspot is enabled Note the mention of WiFi Sharing and the links I provided earlier. So anyway just click OK and you have a hotspot enabled.

Hot Spot 3.png


Anyway the thread starter hasn't been back so we have no idea what path he chose. Rather than using the phone approach I would just spend a few bucks and get a wireless card as mentioned.

Ron
 
Ok. So. Update.

A friend from a nearby town (I live in a village) came by today and was surprised that I didn't know how to pair this sonoff with my phone (since it was I who had first recommended a sonoff to him when he had mentioned a couple months ago that he wanted to control one of his outdoor lights with his phone).

He took just about 1 minute and added the device to my ewelink, through my home WiFi.

Now I don't know whether I also need internet on my WiFi to be able to use this device or it will work offline too. But so far, everything seems to be working perfectly.

I still want to know how to control it directly (without the WiFi middleman) though. I don't want to carry my WiFi device outdoors with me ...
 
OK and the device will work just fine in range of your WiFi. When your Sonoff device is within range of you home WiFi it will work just fine. Turn On and turn Off no problem. The problem comes when you take your device beyond your WiFi range. Then it won't work. If you look on your phone it will likely show up as Off Line.

So back to your first post.
"So I got a sonoff smart WiFi switch (RE5V1EC) to safely initiate all my potentially lethal chemical ignitions (methane balloons, chlorate powered rockets, enclosed butane vapors and all other cheap pyrotechnics you can imagine)".

As long as you are within range of your WiFi no problem. However, if your pyrotechnic experiments take you beyond that range your Sonoff device or any device won't work. This is why a wireless relay board was suggested.

Ron
 
Sigh. Yes, it will work, if the phone can act as a hotspot and it's configured to the same SSID and password as the home network.

I really did test and verify this.
 
However, if your pyrotechnic experiments take you beyond that range your Sonoff device or any device won't work. This is why a wireless relay board was suggested.
I do indeed have two types of wireless relay boards.

First is a WiFi relay (where the module itself acts as a WiFi router and the phone connects to it) and the other is an RF based relay with its own dedicated 2 buttons remote.

Now the reasons why I don't like them:

1. The WiFi relay module starts lagging switching states after 3-5 minutes of use. It gradually gets worse and it stops working altogether after some 10 minutes.

2. The RF relay works perfectly, but it's a 12v board, difficult to power outdoors. It's great indoors. The WiFi based relay works at 5v 1A power, which is very convenient outdoors as it can easily be powered with a power bank or an 18650 battery (with a step up board, ofc).

Does it just mean, that in the phone app you choose the name of the device itself, that is in access point mode??
Yes.
 
Last edited:
The answer is simple - don't use a SonOff (as it's the wrong unit for the application).

You can either use a SonOff - but reprogram the ESP8266 on it to do what you want - or just use a plain ESP8266 module, which makes more sense, as you don't need a mains power supply.

Simply program the ESP8266 as a WiFi 'hotspot', and run a server on it. Then you simply connect your phones WiFi to that hotspot, and run the webpage you want on the server - presumably just a few buttons which you press to trigger the pyrotechnics.

You can find all you need here:


There's also a page there about reprogramming the SonOff boards as well.
 
Ot you can do the exact same thing using the stock Sonoff firmware as I have shown, tested, demonstrated and proven already. The only limitation is the Sonoff must be set up on a home wifi network, and the phone's hotspot set to the same SSID and password.

BTW, I believe that some Sonoff modules use other than the ESP8266 now.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top