Code Running on Blynk Server

Hello,
I was able to drive my garage door using a online blync server. The application is quite simple.I downloaded the blync app on my phone and by clicking on a button, It sends a message to the a relay that will drive the garage door using the online blync server…

Now I have a question to push my application a bit further. let’s assume (hypothetical example). let’s say I would like to drive my garage door based on external parameters. Let’s say I would like to close my garage door when the outside temperature is lower that 20 degrees Celsius and open it automatically when the temperature is higher than 20 degrees . I found many opensource APIs that would connect to online weather servers. could I have a code running on the Blync server (locally or on the cloud) that would request temperatures using these APIs and would drive my garage door and another garage door (my country house garage door) based on the outside temperature ? Thanks

Welcome aboard the wonderful, amazing ship of Blynkers…

Yes, you can. You can also rig up a temperature and/or humidity sensors to read from based on which you can operate the door. Or, you could trigger it based on your GPS location!!! Maybe just a shake too. Just look up the examples part of the docs.

Edit: read up the webhooks widget

thanks mohan_sundaram,
your answer is very appreciated, could I benefit from your generosity, could you please guide to one of these examples?

Look at the top right of this forum… Scroll up… You will see the Docs, Help Center and Sketch Builder (examples) links.

I realise that this is a hypothetical example, but you wouldn’t want to code it to do this. If the temperature changed from 20.1 to 19.9 degrees then the door would close. as soon as it rises to 20.1 it opens again. On a day when the temperature is hovering around 20 degrees you’d soon burn out the motor on your garage door.

You’d need more temperature latitude in your code to prevent it opening and closing as often.

As @mohan_sundaram says, you’d get better results using a temperature and humidity sensor within the hypothetical garage. Avoid buying a DHT11 or DHT22 sensor, they’re awful. Go for a BME280 (or BMP280 if you don’t need pressure readings).

Pete.