I have the following setup:
- Arduino + Ethernet Shield
- Homeseer 2 + tenHsServer installed
and like to use the Arduino to control devices in Homeseer by sending HTTP requests from the arduino to Homeseer in a format like <!-- m -->http://192.168.1.140/tenHsServer/tenHsS ... vice&d=v90<!-- m -->
For some reason I cannot get this to work from the arduino, Homeseer does not understand the GET I am sending and does not reply.
Serial.print ("Connecting to Homeseer on "); // if you get a connection, report back via serial:
Serial.println (HSserver);
if (client.connect(HSserver, HSport)) {
Serial.print ("Succesfully connected to Homeseer on port ");
Serial.println (HSport);
// send the HTTP request:
client.println("GET /tenHsServer/tenHsServer.aspx?t=ab&f=toggleDevice&d=v90 HTTP/1.1");
client.println("Host: 192.168.1.140");
client.println("Connection: close");
client.println();
I am able to establish a connection from the arduino to homeseer (confirmed in WireShark traces), the payload looks the same but for some reason when using a normal browser the URL works but from the arduino it doesn't. The device status is not changed and no feedback from tenHsServer is provided
The above sketch is part of an example provided on the arduino website and originally points to <!-- m -->http://www.google.com<!-- m -->. When using it in it original format it works and returns content from the google website.
Has anybody done this before? If so can you point me in the right direction?
Can someone confirm this (using aspx) should work?
Your help is much appreciated!
Francois
- Arduino + Ethernet Shield
- Homeseer 2 + tenHsServer installed
and like to use the Arduino to control devices in Homeseer by sending HTTP requests from the arduino to Homeseer in a format like <!-- m -->http://192.168.1.140/tenHsServer/tenHsS ... vice&d=v90<!-- m -->
For some reason I cannot get this to work from the arduino, Homeseer does not understand the GET I am sending and does not reply.
Serial.print ("Connecting to Homeseer on "); // if you get a connection, report back via serial:
Serial.println (HSserver);
if (client.connect(HSserver, HSport)) {
Serial.print ("Succesfully connected to Homeseer on port ");
Serial.println (HSport);
// send the HTTP request:
client.println("GET /tenHsServer/tenHsServer.aspx?t=ab&f=toggleDevice&d=v90 HTTP/1.1");
client.println("Host: 192.168.1.140");
client.println("Connection: close");
client.println();
I am able to establish a connection from the arduino to homeseer (confirmed in WireShark traces), the payload looks the same but for some reason when using a normal browser the URL works but from the arduino it doesn't. The device status is not changed and no feedback from tenHsServer is provided
The above sketch is part of an example provided on the arduino website and originally points to <!-- m -->http://www.google.com<!-- m -->. When using it in it original format it works and returns content from the google website.
Has anybody done this before? If so can you point me in the right direction?
Can someone confirm this (using aspx) should work?
Your help is much appreciated!
Francois
Comment