I have been pouring over the various pages and links all day - all very impressive.
I have tried a few things out, have LEDs switching on and off and I have also been able to switch them using the HTTP restful API.
In my project I am hoping to be able to receive commands directly from software I have written running on a PC on my network. I could send out HTTP requests to the Blynk cloud server, and have it call back into my network to pass it onto my device. I also understand I could install a local server and send HTTP commands to that, in order to reduce latency, but I will need to find another PC to do that.
Within my sketch, if I could listen for TCP or UDP connections, I could receive commands, parse them and then call the Blynk stuff as needed, without the heavy payload of HTTP GET operations. Then my other software could connect directly and pass in the data needed.
So now my two questions:
- Is there any existing Blynk supported data flow I can use (other than via HTTP or the Blynk app)?
- Failing that, can these ESP8266 type devices handle multiple TCP connections (small amounts of traffic)? I understand that the device will already have a connection open to a Blynk server, so can I also listen for, and open, a second connection on another port? If so, I could create a small module that listens and connects, parses commands, and optionally sends data back.
I am think in terms of overall architecture at this stage.
Background: The other software is a model train control system. When simulating sunset, I need to send commands to my ESP8266 to set the room lighting brightness accordingly, and bring up the lighting behind mountain ranges. I like the idea of using Blynk so that I can use the phone app to control the room lighting when I am not running the train control software.