Amazon Echo ESP8266 control, with natural speech commands

HI All,
I have my ESP8266 connected on the WiFi and the Blynk sees it available and can control it no problems, but I can t enable the AMAZON Wemo skill to discover the device, and the Wemo APP requires MAC adress and WiFi credentials…
Does this mean that the NEW Wemo skill blocks me from using the Fake Wemo kit… Alexa cant discover the Wemo device without the NEW skill enabled. Any known workaround? any help would be much apreciated.
Regards
Hercules

I’ve never had to enable a Wemo skill (new or old) to control these devices with Alexa. Both Wemo and Hue control are built into the Alexa ecosystem. Just go int the Alexa app’s smart home menu, select “devices,” and click “discover.” That should find all the fake Wemos.

As for the stock Wemo app, you don’t need it.

Hey @chrome1000,

I was trying out your code but I am trying to use multiple switches. I am using a NodeMcu and I am facing a problem with the physical button sync in the multiple switches case could you help me out if you have tried anything of this sort?

I’m not quite sure what you’re attempting. Are you saying that you want the physical switch of one device to turn several other devices off or on?

Or do you have a single NodeMCU controlling several relays?

In either case, what is it that you WANT the physical switch to do?

@chrome1000
Sorry for confusing you but ya I have a single NodeMcu controlling multiple switches. I got it working just had to replicate it multiple times. now I need a suggestion from you. So the setup I have has 4 Hardware switches(Spring Switches) which are connected to the Node MCU and the NodeMCU is also connected to the Relays which are intern connected to the appliances. This whole system works when we have internet connectivity. can there be anyway by which in main loop we could have a logic (While) which would check if we have internet connectivity and if not it would execute the code in the while loop, inside that while loop, we could have button check logic which would let us get the relays working even if we don’t have internet connectivity.

Response to comments about mains power as per @chrome1000. I live in Australia which uses 240VAC. I very recently bought several Sonoff switches, which switch the mains live wire directly. I have been messing around with wiring things for for 240 VAC for 60 years! There is no way I would try to switch a mains line with these - the terminals are just too close together. They do not meet safety standards. I have met this problem with Chinese products before - a lot of AC-DC converters, for example, are rated for 110V/240V. May be just OK for 110V, but not 240V. Wired carefully, they may be OK for a short while, but with time you will get a , flash, a loud bang and smoke! Sonoff’s should be used to switch something like 12V or 24V which in turn switches a properly rated 240V relay.
Having made that comment, as an aged newbie, maybe someone can help with a more general query about Blynk projects. I have been comfortable for years with VB6, but have not programmed usefully in C. My task is to operate a remote heating switch using a mobile phone app. At the switch, there is 3G signal, but no wifi. Thus I bought the Sonoff G1 switch which purportedly can be operated by the 3G link dialed up from the remote smartphone. My phone runs Android 4.4.4. I have spent frustrating days trying to get the app EWeLink registered and have almost given up. That’s why I took a look at Blynk. Can Blynk do that? I don’t want fancy voice activation - just to press a button on a phone app from 10 km away. Or can someone suggest an alternate app to EWeLink or even if they have managed to get that running on an older Android phone with Kitkat or lower? Hope to hear from you.

@carlsnilsson Blynk is fine with Android 4.x and I also have lots of 3G WiFi routers here so it’s incorrect to say to have 3G but no WiFi.

I’ll take a look at the Sonoff G1.

As far as I can see there is no “dial up” feature for the G1. It looks likes it’s permanently running on a GSM network. Data throughput via Blynk is very low so you could use a 3G router and an ESP as an alternative to the G1. Otherwise you would need to hack the G1 firmware to accept Blynk.

@Costas Thanks for fast reply. It did not occur to me that there might be 3G routers! Of course. However, that might be a good way to go if I wanted a bunch of switches within wifi range. However, routers cost , say, $70 and up and one G! switch costs USD 25 with post from ITEAD. It has a slot for the sim card and you obviate the router.
Yes, I installed Blynk with no probs. At this stage I simply want to concentrate on the task at hand, i.e. getting a remote heater switch installed while we still have winter weather, While I have been saying “I must learn to code in C for about the last forty years”, I have never done so and I really want to avoid a major project if I can avoid it! That’s why I have persisted in trying to get EWeLink going. I am not convinced that Android 4.4.4 is the problem - not until a successful user tells me that is so. Trying to get useful answers from Coolkit is a bit like getting blood from a stone. Registration of the program and my phone should not be a problem, even if I meet further difficulties down the track. Contrast a week’s back and forth re EWeLink with the very few minutes it took to register with the Blynk websie and community using the PC and get Blynk installed on my phone. Not a hiccup.
My task is so basic I just wondered if someone had already written a suitable project to accomplish it? Might seem lazy of me, but my real task has to do with warming up an aircraft engine remotely rather than stopping to adequately learn C. I don’t do those things as quickly as i used to.
Regards

Or just $7 https://www.aliexpress.com/item/MINI-3G-WIFI-Hotspot-IEEE-802-11b-g-n-150Mbps-USB-Wireless-Router-Portable-Black/32754325511.html

@Costas Well, that’s an eye opener. I get one of those. Presumably that router takes a sim card and can be dialed up. That would enable me to use the regular little Sonoff $5 switches, as I understand it.

@Costas Sorry, I may be a bit dense, but I don’t quite see how that gadget helps. It seems to be something that plugs into a computer and gives you a LAN - either physical or wifi hotspot. It doesn’t mention a sim card, so how does it connect to a phone network?

No and no.

You plug in a USB 3G adaptor with sim card from your local telecoms provider and AFAIK you can’t dial into the network from outside. It’s simply connected on a permanent basis to the 3G network.

I believe there are “dial in” systems available but they are much more expensive.

I am not a Sonoff user but AFAIK yes. They are simply ESP with relays.

@Costas I’m getting confused. It is 0430 hrs here! That looks like something I could plug into a laptop or PC via USB and have a modem and router using the 3G network. How can I use the 3G network without a sim card? It might be PAYG, but the network wants to charge me! Or are you saying I need an additional USB 3G adapter with sim card, which I happen to have. Yes, I guess a dongle or suchlike goes into the USB A socket at the end. I have a Huawei E220 somewhere. That has the sim card, as best I recall. There’s got to be a sim card involved somewhere! The sim card will have a phone number and presumably that is what I dial up from my distant smartphone? I have to be able to dial up some number in order to operate my switch remotely - no? Or is it a matter of connecting to my registered account over the internet, but then, how does the cloud know which is my device?

Yes Huawei style dongle with sim card plugs into the 3G router.

No the switch is connected via WiFi to the 3G router. 3G router is permanently connected to the internet.
Switch is connected to a Blynk server once you have flashed the Sonoff with Blynk.
With Blynk app on Smartphone you connect to the Blynk server. Blynk server then sends the command to your switch.
OK?

Each device is given a unique 32 character code.

@Costas Well, I thank you. I have learned thanks to this conversation. Looking at the Sonoff G1 again, particular on the web sites for the G1 on Banggood and http://ewelink.coolkit.cc/?p=422, it makes sense to me now, even before I have had a cup of coffee! As the G1 has a sim card and from Banggood’s little diagrams, I anticipate that I should not need the added combo of the 3G router and the adapter - I should be able to use the G1 on it’s own, if the ad can be taken at face value. WE’ll see. I also just realised that I can run an Android 6.0 Marshmallow emulator on my PC (hopefully) and have one more try to see if I can get EWeLink going. But I am very impressed with the response and help I got from you on this board and Blynk in general. You done good!
Regards Carl

1 Like

@carlsnilsson my suggestion to use a 3G router was instead of the G1 as it gives you more flexibility and costs less than buying a G1. In your case as you have already bought the G1 and don’t want much flexibility then you should go that route, providing you can sort out EweLink. It’s been going for quite some time so it should be fairly robust software now.

For other users the $20 price tag means they could buy 3G router, 3G dongle if they don’t already have one, ESP and a relay for less.

So I have this set up with Echo Dot, and AlexaPi, with bare ESP 12F and Wemos D1 mini’s.
So far, I am using one with IR libraries and it is a remote for my TV (I’m sure there are easier ways but I love tinkering…), and have TV on/off working, and volume up/down, using “noise on/off”. Using something other, like “loud up” worked to turn vol. up, but “loud down” Alexa would say not supported. What commands other than on off can be used? Is there a list somewhere?

When emulating a WEMO switch, you’re limited to ON and OFF.

I’ve played with both Hue and LIFX smart light bulb emulators in hopes of using their brightness parameter as a generic level variable. That way, we’d be able to ask Alexa to “increase X,” or “set Y at 30%.” Unfortunately, I haven’t been able to get my Echo to recognize the emulators, even though their native apps do.