Controlling nodemcu with alexa and blynk

I got my project to work with blynk and alexa but i wanna know if it’s possible to update blynk everytime I control a relay via alexa. Say when I tell alexa to switch the fan on, it should update on the blynk app that the fan switch is on. Also at the same time I should be able to control from the blynk app as well. I seen some sketches where they update the blynk app via virtualwrite so n so… But that wouldn’t allow be to control the relays via blynk.

1 Like

https://examples.blynk.cc/?board=NodeMCU&shield=ESP8266%20WiFi&example=More%2FSync%2FSyncPhysicalButton

I suspect you are using direct pin control. That is, manipulating the digital I/O pins directly. When using these devices it is best to use virtual pins. So when you tell Alexa to turn on the fan (or turn it on with the app), it will trigger a virtual pin that will then turn on the relay, and if activated by Alexa also update the state of the button in the Blynk app .

Yes I’m using the digital pins on the app, D2,3, 4,5… To control the relays… So I have to change these to virtual pins??

Yes, but there is a bit more to it. It will also require some code that will need to be uploaded to your device controlling the relays.

I am not sure of your level of programming, or your understanding of BLYNK and Virtual pins. You may need to do a little “homework” and read through the DOCS, try a few of the examples on the Sketch Builder, and search around this forum. I am sure there are some examples out there. The Google Assistant + IFTTT stuff may also be easily adapted to work with Alexa, although I don’t have much experience with her.

If you are familiar with programming and BLYNK, then what @ldb provided is probably close to what you are looking for. You will just have to set up your button Widget and Alexa properly.

Although this incorporates a physical button as well.

Thanks alot, I appreciate it… I’ll look more into it… My programming Knowledge is mere… YouTube arduino programming course

Well give it a go, and if you cant get it working, post and explain what you have done and I am sure others (as well as myself) will try to help.

1 Like

Good afternoon, did you manage to control the blynk through the voice using a skill from alexa amigo?

Do you know how to program a skill? I found an example on the internet of how to do this but I couldn’t make it work.

I haven’t, can you share the link ? I am controlling relays only using Alexa