Internet-connected Valentine
Just in time for Valentine's Day (2017.)
What better way to tell your sweetie you're thinking of them than with some LEDs and an internet-connected ESP8266 microcrontroller?
Press a button on your phone or browser and this heart, wherever in the world it is, begins to glow.
Next: a linked pair of them, with pushbutton to trigger its partner.
Just in time for Valentine's Day (2017.)
What better way to tell your sweetie you're thinking of them than with some LEDs and an internet-connected ESP8266 microcrontroller?
Press a button on your phone or browser and this heart, wherever in the world it is, begins to glow.
Next: a linked pair of them, with pushbutton to trigger its partner.
Request for technical help: I'm using Marco Schwartz's aREST for this with cloud.arest.io, and triggering by sending https://cloud.arest.io/deviceID/led?params=1 from a browser. I'd like to be able to send the trigger directly from another ESP8266, but haven't been able to get the syntax correct for a REST call. GET doesn't seem to do it. My code includes:
WiFiClient espClient; // Clients
PubSubClient client(espClient);
aREST rest = aREST(client); // Create aREST instance
void callback(char* topic, byte* payload, unsigned int length);
client.setCallback(callback); // Set callback
rest.set_id(device_id); // Give name and ID to device
rest.set_name(device_name);
const int httpPort = 80;
if (!espClient.connect("cloud.arest.io", httpPort)) {
Serial.println("connection failed");
return;
}
espClient.print(String("GET /deviceID/led?params=1 HTTP/1.1\r\n") +
"Host: cloud.arest.io\r\n" +
"Connection: close\r\n\r\n");
Any help would be appreciated, just put in comment box below. Thanks.
Update: I suspect it's because the chip isn't doing SSL to reach https://cloud.arest.io