Hi guys, thanks for all the responses and the code fix,
I will try the provided solutions for now and update.
also any timeframe in general on deployments (days, weeks, months? )
Hi guys, thanks for all the responses and the code fix,
I will try the provided solutions for now and update.
also any timeframe in general on deployments (days, weeks, months? )
But in my case, I am receiving a pin value though the Blynk API, and I want to transfer that value to another device using the GET request (or actually I would rather connect straight to a HOST + PORT, but I have been unable to find a way to do that without disconnecting from the blynk cloud (by using ESP8266 libraries instead of the Blynk ones)).
so I am not using the app or the widgets at all in this case.
an alternative is to query the API through the other device, but that would mean to query it on a timer, and also I specifically want the arduino to send the data
This is what im trying to achieve, everything is almost done except for this last part
What format is the pin value you are receiving?
Also is the “Android App” shown in your image the Blynk App or one you knocked up?
its an integer which has a corresponding ID in one of the targeted devices.
I made my own windows app and an android app, which among other things, open a server and listen for incoming data.
If the Arduino is running a sketch similar to the one I posted, with a button to trigger the Webhook you can use the following API call:
http://blynk-cloud.com/TOKEN/update/V1?value=1
Blynk Button widgets can have more than 2 states (0 and 1) so you can use value=2 or value=3 etc in the API call. The MCU can then respond with different Webhook url’s.
Would this work for you?
It would not work according to the diagram I made above.
The Blynk API call is being made via AWS Lambda (according to my voice command using an Echo dot), the value is then received in the Arduino which is connected to Blynk, from there the Arduino needs to automatically forward the value (without manually pressing any buttons) to the correct device on the network based on the value it received from AWS.
Blynk API doesn’t involve manually pressing any buttons.
You should take a serious look at Node-Red and MQTT.
Using a Raspberry Pi to run Node-Red and mosquito would give you Blynk integration, the ability to do GET and PUT from other servers and parse HTTP data streams if needed. You can also integrate with Amazon Alexa from within Node-Red.
If you then want to send messages/commands to other devices such as your Arduino you can do this with MQTT messages. There are even utilities that allow you to remote control a Windows PC using MQTT messaging.
I use this approach for my home automation, and the Blynk app to give easy access from anywhere in the world - works great.
Pete.