Hi Everyone!
I am using Tasker with AutoRemote in my home automation system. I would like to send an AR direct message to my phone or tablet from arduino uno board. I think that, its a simple html request, but i cant solve it with Client.connect or client.print.
AR tutorial for direct message:
http://joaoapps.com/autoremote/direct/
I tried the web client examle code with different methods, but does not works. It says succesfull connect, but no message recived.
Can someone help me please to solve this?
Thanks:
Ghorinka
Arank
June 29, 2015, 4:47pm
2
As the link you provided lack in information, the only thing I can presume is, you need to make a request (probably a GET request, but can't be really sure), to http://autoremotejoaomgcd.appspot.com/sendmessage?key=YOUR_KEY&message=hi .
On the Arduino it should be something like:
if (TCP.connect("autoremotejoaomgcd.appspot.com", TCP_PORT) == 1) {
TCP.println(F("GET /sendmessage?key=YOUR_KEY&message=hi HTTP/1.1"));
TCP.stop();
}
For experience, you might have some problema with the '?', I don't know exactly why.
If this don't work, you should make the request from the web browser and capture the package using WireShark for a better analysis.
Hi,
First, thank you for your advice!
I tried your, and my similar methods, but unfortunetly, for some reason this does not work.
I never used network analysis softwares
I found the solution:
#include ...
...
char arserver[] = "autoremotejoaomgcd.appspot.com";
void sendToAutoRemote(char message[]){
client.stop();
if (client.connect(arserver, 80)) {
client.print("GET /sendmessage?key=YOUR_DEVICE_KEY&message=");
client.print(message);
client.println(" HTTP/1.1");
client.print("Host: ");
client.println(arserver);
client.println("User-Agent: Arduino");
client.println();
}
}
void setup{
....
sendToAutoRemote("Arduino Started");
}
void loop{}
Tested, working fine. You can make alerts, notifications, and anyhing you want with tasker, on your phone. You can get your device key from AutoRemote personal link, inside the app.
could you please post a a working example? cannot get this to work.. looking to to the same thning for a doorbell project