cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Unable to authenticate from arduino uno to thingworx academic platform.

ahmed123
4-Participant

Unable to authenticate from arduino uno to thingworx academic platform.

#include <DHT_U.h>
#include <SPI.h>
#include <Ethernet.h>
#define propertyCount 2
#define DHTPIN 2 // what digital pin we're connected to
#define DHTTYPE DHT11

byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};

char server[] = "https://academic.cloud.thingworx.com/Thingworx/Things/salesforceThing_ahmed123/Properties/Temperature";

EthernetClient client;

char appKey[] = "03bbedef-bb57-4ec1-9cad-8126d72d2e75";

char thingName[] = "salesforceThing_ahmed123";

int timeBetweenRefresh = 5000;

char serviceName[] = "setTempAndHumid";


char* propertyNames[] = {"Temp", "Humid"};

double propertyValues[propertyCount];

unsigned long lastConnectionTime = 0;

boolean lastConnected = false;

DHT dht(DHTPIN, DHTTYPE);

 

##########################################################################

I'm getting this response in arduino uno serial monitor,

DHT22 Library Demo
Trying to get an IP address using DHCP
My IP address: 192.168.0.38
Humidity: 27.00 % Temperature: 30.00 *C 86.00 *F Heat index: 28.55 *C 83.40 *F
Humidity: 27.00 % Temperature: 30.00 *C 86.00 *F Heat index: 28.55 *C 83.40 *F
connected
POST /Thingworx/Things/salesforceThing_ahmed123/Services/setTempAndHumid?appKey=03bbedef-bb57-4ec1-9cad-8126d72d2e75&method=post&x-thingworx-session=true<&Temp=30.00&Humid=27.00> HTTP/1.1
Host: https://academic.cloud.thingworx.com/Thingworx/Things/salesforceThing_ahmed123/Properties/Temperature
Content-Type: text/html

Humidity: 28.00 % Temperature: 30.00 *C 86.00 *F Heat index: 28.62 *C 83.51 *F
Humidity: 27.00 % Temperature: 30.00 *C 86.00 *F Heat index: 28.55 *C 83.40 *F
connected
POST /Thingworx/Things/salesforceThing_ahmed123/Services/setTempAndHumid?appKey=03bbedef-bb57-4ec1-9cad-8126d72d2e75&method=post&x-thingworx-session=true<&Temp=30.00&Humid=28.00> HTTP/1.1
Host: https://academic.cloud.thingworx.com/Thingworx/Things/salesforceThing_ahmed123/Properties/Temperature

 

 

Could you please guide me, is I'm passing my server url properly with all parameters ?

I'm very thankful if someone guide me to update arduino data to Thingworx.

1 REPLY 1
CRArko
17-Peridot
(To:ahmed123)

Hi, this looks like a duplicate of this other post .

 

Please direct future responses to that post.

 

Thank you,

 

-- Craig A.

 

 

Announcements


Top Tags