below is the complete code. I have made a new sketch with the air pressure value only - just to keep it simple. It's still not working.
I get the correct reading / values at the serial interface - only the GET request is not working.
How have you verified that the request is being cut? Did you check the server logs or did you use a network monitor/sniffer?
if you have this complete line in the code, it becomes a hyperlink and opens at the webbrowser but everything was cut off behind & - see my first post.
client.print("GET http://192.168.178.21/config/xmlapi/statechange.cgi?ise_id=15324&new_value=1005 HTTP/1.0");
Is there any way to monitor the GET Request in order to see what the arduino is send to the server?
#include <Wire.h>
#include <SPI.h>
#include <Ethernet.h>
#include <BMP085.h>
// I2C
BMP085 dps = BMP085(); // Digital Pressure Sensor
long Temperature = 0, Pressure = 0, Altitude = 58800;
// Enter a MAC address for your controller below.
// Newer Ethernet shields have a MAC address printed on a sticker on the shield
byte mac[] = { 0x90, 0xA2, 0xDA, 0x0D, 0x2D, 0xF9 };
IPAddress server(192,168,178,21);
// Initialize the Ethernet client library
// with the IP address and port of the server
// that you want to connect to (port 80 is default for HTTP):
EthernetClient client;
void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
// start the Ethernet connection:
if (Ethernet.begin(mac) == 0) {
Serial.println("Failed to configure Ethernet using DHCP");
// no point in carrying on, so do nothing forevermore:
for(;;)
;
}
// give the Ethernet shield a second to initialize:
delay(1000);
Serial.println("connecting...");
// if you get a connection, report back via serial:
if (client.connect(server, 80)) {
Serial.println("connected");
}
else {
Serial.println("connection failed");
}
// start I2C für BMP085
Wire.begin();
delay(1000);
dps.init(MODE_ULTRA_HIGHRES, 58800, true); // 588 meters, true = using meter units
}
void loop()
{
// Get Altitude and air pressure
dps.getPressure(&Pressure);
dps.getAltitude(&Altitude);
delay(2000);
Serial.print(" Alt(cm):");
Serial.print(Altitude);
Serial.print(" Pressure(mbar):");
Pressure = Pressure / 100;
Serial.println(Pressure);
client.print("GET /config/xmlapi/statechange.cgi?ise_id=15324&new_value=");
client.print(Pressure);
client.println();
}