Blynk Cloud APi isHardwareConnected not working except locally

I am trying to make a GET request to isHardwareConnected from a nodeJs app that is deployed to Heroku but for some reason I get error status code 400 ‘Bad Request’. This has been working fine when I was testing on localhost.

http://blynk-cloud.com/+auth_token+/isHardwareConnected

when I tried to use the abov on api-tester I also get invalid token and bad request. Is that not part of the freemium plan?

You might be hitting the GEO DNS issue.
Try replacing the blynk-cloud.com with the IP address that you get when you ping blynk-cloud.com from your local host.

http://docs.blynk.cc/#http-restful-api

Pete.

Thanks for the heads up Pete, I havent had the chance to try that yet but will give it a shot tonight.

I am however able to set a pin’s value from the same code without any problems and without the need to adjust the url.

Indeed that was the issue. I have replaced blynk-cloud.com with the ip address I got from pining the blynk-cloud.com and now everything is working.

Thanks for the help @PeteKnight

1 Like

Very odd that it was working for pin updates but not for isHardwareConnected, but glad it’s working now.
I’ll mark the thread as solved.

Pete.

1 Like