From 5844ec12ea2c00dbc701be5da1c8e1f24dd91642 Mon Sep 17 00:00:00 2001 From: structix Date: Wed, 20 Sep 2017 21:14:30 +0200 Subject: [PATCH] Adjusted ESP to Rest service. --- ESP8266/sensornode/sensornode.ino | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ESP8266/sensornode/sensornode.ino b/ESP8266/sensornode/sensornode.ino index fb900b9..494dc8c 100644 --- a/ESP8266/sensornode/sensornode.ino +++ b/ESP8266/sensornode/sensornode.ino @@ -8,7 +8,10 @@ //DHT settings: #define DHTPIN 14 // what digital pin we're connected to -#define MEASURESECONDS 60 //shouldn't be < 2sec +#define MEASURESECONDS 600 //shouldn't be < 2sec + +#define NODE_ID 1 +#define ISOUTSIDE 0 //Outside --> 1 ; Inside --> 0 // Uncomment whatever type you're using! //#define DHTTYPE DHT11 // DHT 11 @@ -75,7 +78,7 @@ void loop() { HTTPClient client; // Make a HTTP request: - String url = "http://raspitemp:1337/abshum/" + String(t) + "/" + String(h); + String url = "http://raspitemp:1337/abshum/" + String(t) + "/" + String(h) + "/" + String(NODE_ID) + "/" + String(ISOUTSIDE); client.begin(url); client.GET(); client.end();