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.
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
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"
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 . . .
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?
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.
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.