BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Siri+iOS Shortcuts+Blynk

Hello there,

I just figured how to make Blynk work with Siri and tought about sharing the idea with this forum as I’ve seen there’s not much talk about it (so it’s either obvious or not that wanted, but oh well). It also allows you to create widgets for quick access as Blynk doesn’t have that feature on iOS.

If you have used IFTTT with Blynk, it’s pretty much the same thing. You’ll need to have the shortcuts app installed. In the Shortcuts app, create a new shortcut and name it however you like (you can change it anytime). Note that when using Siri to access the shortcuts you’ll need to use the name you chose. In the shortcut you created, select Add action->Web->Web requests->Get contents of URL. It should look like this:

You need to make a web request, so the next thing would be finding the adress, by running the command “ping cloud.blynk.cc” in Winndows console. This should return an adress. Copy that adress and paste it in the “URL” tab of the action you just added in your shortcut, followed by the auth token of the Blynk project you’re using it on, a /update/, the pin you’d like to use and its desired state. It should look simillar to this: http://139.59.206.133/CxxxxxxxxxxxxNHhXl_fp/update/D5?value=1

Also, in the Show More->Method tab “GET” should be selected.

Note that for digital pins D5 doesn’t correspond to the number written on the board, but with the GPIO pin number. So in mu case D5=GPIO5=D1(on nodemcu). You should now be able to run the command with Siri and also create a widget button by ticking “Show in widget” in the shortcut settings.

Try experimenting with it, there are a few things you can do without having to actually code.

Hope this will be helpfull to some of you. Any suggestions or ideas are kindly welcome

11 Likes

That’s very good.

If you’re using local Blynk server using SSL/TLS with a valid SSL/TLS certificate, and have DDNS service to access from Internet, and your DDNS address is yourname.duckdns.org, you can use this Web GET command

https://yourname.duckdns.org:9443/your_auth/update/D5?value=1

or

https://yourname.duckdns.org:9443/your_auth/update/D5?value=0

Then just call Siri to do the job.

If your SSL/TLS certificate is invalid, Siri will complain, saying something like

Hmm, something went wrong. Shorcuts says, "The certificate for this server is invalid. You might be connecting to a server that is pretending to be "yourname.duckdns.org" which could put your confidential information at risk"
1 Like

This works great!

I have a question though… If I do the

http://139.59.206.133/CxxxxxxxxxxxxNHhXl_fp/update/D5?value=1

but with a virtual pin …/V1?value=1

It triggers my wemos the way I expect, except V1 now stays as 1, unless I do another get with

…/V1?value=0

What I’ve done is build my shortcut to do two gets, first with a 1 then with a 0. To simulate a momentary pushbutton.

Is there a way I can use the wemos to change the virtual pin back to 0? Then I would only need one get in my shortcut…

Thanks in advance!

1 Like

I just finally managed to follow your instruction and I WORKS!
Thank you so much for this explaination!

1 Like

Fantastic, thnx for your very easy to follow instructions this worked perfectly first time! I have Blynk connected devices all around the hose that are very soon to become Siri enabled . . . :wink:

thnx
billd

1 Like

I signed up for an account so I could favorite this. I didn’t realize this was possible and it works so well. THANK YOU!

1 Like

@lil_satan I’m not sure if there’s any workaround. I’m using the same method to simulate a push button.

@Marco7 I’m not having this problem. Do the command work in the Blynk app?

@lil_satan
@dragos

First time writing. I started playing with the same idea of simulating a push button.

The first thing I did in the Arduino IDE was to set the the push button to run for three seconds. This functioned flawlessly with Blynk.

The second thing, which is the above mentioned question, related to shortcuts. I followed the instructions here using update/V21?value=1 but the virtual button stayed on (blocked?) after the url command. I solved this by adding a second action within the original shortcut and changed the end of the url to update/V21?value=0.

This allowed the virtual button to function as it was intended. So far so good.

Hi,
First I wanna say I’ve been using this method for months now. It works perfectly, thx!

I am currently trying to figure out web domains of the local server of my WiFi speaker.
I was hoping there is a method you used to figure out the Blynk server’s and domain that could be useful?

Greetings

Thanks for sharing this wonderful shortcut.
Now I can just tell Siri to open my Gate!
(Yes, some might be concerned with security)

Thanks. Well written instructions and helps novices like me.

14 posts were merged into an existing topic: Need help with Siri + iOS shortcuts

9 posts were split to a new topic: Need help with Siri + iOS shortcuts

Thanks a lot for sharing this shortcut, it works! If you are using your own Blynk server, add 8080 after the IP address.
Update: By the way, you need to create two short cuts, in my case I create one to open my garage door, and one to close it. If security is a concern, you can name the short cuts to anything, like" Open my den, Open my cave, I want nachos, etc.
This is really handy, I just tell Siri a block away from my house: Hey Siri open garage, she replies: That’s done. Love. it!

Hey, thanks for that!
I have the problem that it only works if my phone is not connected to the same network as my server… is there a solution to do it while beeing conntected to the WIFI?

It is normal to work only when your phone is connected to the same network as your server. To make it works when in different networks you have to either present your blynk server to the internet (open the 9443 port for the internet and expose it, create a DDNS entry for your server and access it over the net or, in my opinion, the best way, to run a VPN server on your local infra, connect to it with your phone and then, once connected, you can access your locally (protected) Blynk server.

1 Like

Using this method, I’ve built several working iOS shortcuts that control Blynk virtual pins. However, I run into a problem when automating these shortcuts, for example, with a location trigger. When I cross the geofence, I do get a notification that the shortcut has run, but the corresponding Blynk action is never executed. I suspect that iOS won’t send the page request when the iPhone is asleep / locked. Has anyone figured out a better way to automate Blynk in iOS shortcuts?

UPDATE: For anyone on a jailbroken iOS device, there’s a tweak called Truecuts that that adds an “ask before running?” toggle to your custom automations. Just go into your automation, and slide it to the off position. The version I downloaded says it’s for iOS 13, but it seems to work just fine on iOS 14. There’s a variant of Truecuts, called Truestcuts, that also kills the Shortcut’s notification.