Hi Guys, I am working on a garage door opener on a NodeMCU and I want to integrate it with have been struggling for a few hours trying the Google Assistant to work through IFTTT.
I created an Applet to enable a relay when I say “Close garage door”… It works perfect, but when I created another Applet for “Open garage door”, this one says that the Applet was skipped.
I’m not sure that port 8080 is the correct port for Blynk Cloud.
Either way, you’re better-off using a GET rather than PUT command.
See this post for details:
I assume that the IP address used is your own router, and you are directing port 8080 to your own local Blynk server? If so, did your router IP address change perhaps?
The IP I am using is the cloud server one, and remember the request works with one of my Applets but not with the other… it’s the exact same Applet with different voice command.
When I try http://blynk-cloud.com/auth_token/update/pin?value=value, it works every single time… Just note that for the get request I don’t use the port 8080 but I found for the PUT I had to use it to make it work (not sure of how it works in detail)…
Hi PeteKnight, thanks for your feedback… I am using the port 8080 for the PUT because I found it somewhere in the forums, but I am not sure of how it really works…
The strange thing is that I have two Applets that are identical, the only different thing is the voice command, but one of them works and the other one doesn’t…
The GET request through a Browser works, but I am not sure of how to make it work through IFTTT…
Thanks again!
so, if you are not using your own server, don’t specify a port (:8080)
I would also use blynk-cloud.com rather than its IP address - they may decide to change servers on day.
I cant explain why one works and not the other, I can only think that they are not identical.
Well, If I don’t specify the port 8080 on the PUT request then it doesn’t work.But I am so confused now, I just got some examples from the forums and made it work with the IP, PUT and the port 8080… Do you know how this really works? or perhaps some resources that I can read to really understand it? (I am pretty OCD and like to understand what I’m doing)
So, anyways, I tested with the GET method and worked like a charm… Also gave it a try with blynk-cloud.com (instead of the IP) and worked as well… For those in doubt of how to configure it in IFTTT, here is the screenshot:
It’s a bit hit and miss about whether blynk-cloud.com will work with IFTTT. As I underand it, your project is stored on just one of the multiple Blynk cloud servers. When a normal Blynk Cloud request is received, it’s corrected to the correct server, regardless of where you are in the world; but apparently that’s not the case for IFTTT requests.
If you’re lucky, the IFTTT server will see the correct Blynk server and it will work. However, you should ping the Blynk Cloud server from your PC to find out which Blynk server your project is on, and specify the IP address in your recipe.
but… pinging it from our PC will just tell us what the DNS entry is for the blynck-cloud.com - which is what IFTTT will also use, so how can there be a difference?
I don’t pretend to understand the details, but pinging from different geographical locations will give different IP addresses.
The docs for the API say:
HTTP RESTful API
Blynk HTTP RESTful API allows to easily read and write values of Pins in Blynk apps and Hardware.
API description can be found here. Warning : Blynk HTTP API still has GEO DNS issue. This means, for now you need to use direct server IP instead of hostname in order to make it work with 3-d party services like IFTTT.
This makes sense, thank you for the insights… It’s good to have a better understanding of this “black box”…
However, I am more concerned about the PUT method… All the information I found initially pointed me to use that one and a specific port (8080)… But why?.. Any ideas?
You started the thread because you were having IFTTT issues and I’ve shown you a method that works reliably and consistently.
If you want to spend more time playing with using the PUT method via IFTTT to get to the bottom of why that wasn’t working for you then go for it, but as you’ve already discovered the error messages that IFTTT provides aren’t very helpful.
If you get to the bottom of your issue then post an update about the solution.
OK, I just wanted to close the loop on this one. As @PeteKnight suggested, I decided to keep testing to try to figure out what was going on… Just because I like to get to the bottom of things (even if there are alternative solutions)…
My conclusion is that IFTTT was having a glitch that day causing this strange behavior. I am saying this because, in addition to this issue, I wasn’t able to access the “New Applet” option from their webpage, the only way for me to do it was through the app… It was kind of odd, but it was also my first time doing it, so I just thought it was the only way…
Well, the good news is that I learned a lot and probably what I learned is useful for someone else, so here we go:
There is a Blynk API documentation site where you can actually test the different methods (PUT, GET, POST, etc) and see the request sent to the Blynk server and the response received - Here it is: Blynk HTTP RESTful API. The requests can be sent either through apiary or through your local browser installing an extension. - I did different tests to set the PIN to what I wanted and they all worked flawlessly.
The server IP is no longer required and the blynk-cloud.com server can be used directly on the request. Please see this post for more information. - I also tested this several times (IP and DNS name).
The network port is also not required (at least for cloud servers) - I did my test with and without port and both worked (tested from IFTTT).
In summary, I think I will use GET for my purpose as I think it’s cleaner, but PUT works as well without any issue.