blynkkk / blynk-library

Blynk library for IoT boards. Works with Arduino, ESP32, ESP8266, Raspberry Pi, Particle, ARM Mbed, etc.
https://blynk.io
MIT License
3.81k stars 1.38k forks source link

Blynk API useing ESP_IDF #577

Closed adamCPP closed 1 year ago

adamCPP commented 1 year ago

Blynk library version: [NA] IDE: [esp-idf] Board type: [esp32]

Scenario, steps to reproduce

[What you are trying to achieve and you can't?] I want to blynk cloud to send information to my device when switch have been changed. How can I accomplish that in less dump way than sending constantly https://blynk.cloud/external/api/get?token=Rps15JICmtRVbFyS_95houlLbm6xIQ2L&v1. I'm useing my own httpClient

Expected Result

[What are you expecting to happen as the consequence of above reproduction steps?]

Get notified when value change

John93-Blynk commented 1 year ago

May I ask you why are you using API? You can simply use the BLYNK_WRITE(vPIN) function instead. The BLYNK_WRITE is a function called every time device gets an update of Virtual Pin value from the server or app.

adamCPP commented 1 year ago

May I ask you why are you using API? You can simply use the BLYNK_WRITE(vPIN) function instead. The BLYNK_WRITE is a function called every time device gets an update of Virtual Pin value from the server or app.

As I write above I'm not using arduino framework. My project is based on esp-idf framework. So I can't use this functions. Blynk API is my only hope

John93-Blynk commented 1 year ago

Using the API method is not the best approach because there are limitations. https://docs.blynk.io/en/blynk.console/limits

I'd use Node-RED and the blynk plugin if I were you.

adamCPP commented 1 year ago

But arduino library does the job somehow. So I assume there is some kind of API or mqtt protocol to communicate between cloud and device

John93-Blynk commented 1 year ago

You can use the API to get data from the server or send data to the server, but as I said before, there's a limitation.  You can try Node-RED and the blynk plugin method instead.

vshymanskyy commented 1 year ago

You should use Arduino Core as an IDF component, then you can run Blynk under it