Problem Weather app with arduino uno
I'm using the Weather App with Arduino Uno to connect a DHT22 sensor to the thingworx platform, but i have been unable to show the data from the sensor in thingworx. On the serial monitor I can see the values of temperature and humidity been updated, but not in thingworx (Thingworx 7).

This is the code that I have been using in the arduino:
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <DHT.h>
#include <DHT_U.h>
#include <SPI.h>
#include <Ethernet.h>
#define propertyCount 2
#define DHTPIN 2
#define DHTTYPE DHT22
byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
IPAddress ip(192,168,20,35);
char server[] = "3thmsdws.pp.vuforia.io";
int port = 443;
EthernetClient client;
char appKey[] = "My AppKey";
char thingName[] = "HTD22ThingPrueba";
int timeBetweenRefresh = 5000;
char serviceName[] = "setTempAndHumid";
char* propertyNames[] = {"Temp", "Humid"};
double propertyValues[propertyCount];
unsigned long lastConnectionTime = 0;
boolean lastConnected = false;
DHT dht(DHTPIN, DHTTYPE);
void setup() {
pinMode(4,OUTPUT);
digitalWrite(4,HIGH);
Serial.begin(9600);
Serial.println("Temperatura y Humedad con Arduino");
while (!Serial) {
; }
dht.begin();
Ethernet.begin(mac, ip);
Serial.print("My IP address: ");
Serial.print(Ethernet.localIP());
Serial.println();
}
void loop() {
propertyValues[0] = dht.readTemperature();
propertyValues[1] = dht.readHumidity();
delay(5000);
float h = dht.readHumidity();
float t = dht.readTemperature();
float f = dht.readTemperature(true);
if (isnan(h) || isnan(t) || isnan(f)) {
Serial.println("Failed to read from DHT sensor!");
return;
}
float hif = dht.computeHeatIndex(f, h);
float hic = dht.computeHeatIndex(t, h, false);
Serial.print("Humidity: ");
Serial.print(h);
Serial.print(" %\t");
Serial.print("Temperature: ");
Serial.print(t);
Serial.print(" *C ");
Serial.print(f);
Serial.print(" *F\t");
Serial.print("Heat index: ");
Serial.print(hic);
Serial.print(" *C ");
Serial.print(hif);
Serial.println(" *F");
if (millis() - lastConnectionTime > timeBetweenRefresh) {
updateValues(propertyValues, client, server, appKey, thingName, serviceName, propertyNames);
}
}
void updateValues(double values[] , EthernetClient &client, char server[], char appKey[], char thingName[], char serviceName[], char* sensorNames[])
{
char data[80];
strcpy(data, "?appKey=");
strcat(data, appKey);
strcat(data, "&method=post&x-thingworx-session=true");
if (client.connect(server, 443)) {
Serial.println("connected");
client.print("POST /Thingworx/Things/");
client.print(thingName);
client.print("/Services/");
client.print(serviceName);
client.print(data);
client.print("<");
for (int idx = 0; idx < propertyCount; idx++)
{
client.print("&");
client.print(propertyNames[idx]);
client.print("=");
client.print(propertyValues[idx]);
}
client.print(">");
client.println(" HTTP/1.1");
client.print("Host: ");
client.println(server);
client.println("Content-Type: text/html");
client.println();
client.stop();
lastConnectionTime = millis();
Serial.print("POST /Thingworx/Things/");
Serial.print(thingName);
Serial.print("/Services/");
Serial.print(serviceName);
Serial.print(data);
Serial.print("<");
for (int idx = 0; idx < propertyCount; idx++)
{
Serial.print("&");
Serial.print(propertyNames[idx]);
Serial.print("=");
Serial.print(propertyValues[idx]);
}
Serial.print(">");
Serial.println(" HTTP/1.1");
Serial.print("Host: ");
Serial.println(server);
Serial.println("Content-Type: text/html");
Serial.println();
}
else {
Serial.println("the connection could not be established");
client.stop();
}
}


I appreciate your help, thanks.

