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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

MASHUP OFFLINE

Telles
12-Amethyst

MASHUP OFFLINE

Hi, Team.

How I can fix it?
The Thing to attach on Mashupe is offline.

Telles_0-1632252282122.png


Regards.
Telles.

1 ACCEPTED SOLUTION

Accepted Solutions
Telles
12-Amethyst
(To:Telles)

Unfortunately, I have to chance the microcontroller to ESP32 and solved the problem!

Regards.
Telles.

View solution in original post

7 REPLIES 7
PaiChung
22-Sapphire I
(To:Telles)

That indicates that the 'Remote type Thing' this entity represents is not connected.

This Thing is expecting a connection and information from maybe Kepware or a ThingWorx Edge Agent

Telles
12-Amethyst
(To:PaiChung)

Hi, PaiChung!
I´m using the Trail Version, and I don´t need communicate with Kepware yet or Edge Agent.

Regards.
Telles.

PaiChung
22-Sapphire I
(To:Telles)

Then you can just ignore that, the Thing will function fine even without being connected.

Not sure if this was a pre-created Thing, but else if you use a ThingTemplate that isn't based on RemoteThing or IndustrialThing you wouldn't see that at all because it won't expect connectivity.

Telles
12-Amethyst
(To:PaiChung)

Hi!
Understood!
Also I´m use the Trial version to do this. 
My ESP32´s code can generate the URL to TW, but return -1. If I copy and paste the same URL in the browser and refresh the Property in Thing, it has updated.
Follow my code and print screen.

#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>

const char* ssid = "";
const char* password = "";

char* server = "https://pp-210616174386.portal.ptc.io"; // your server instance address
char* APIKEY = ""; // your security key

//Thingworx details
char ThingName[]= "Box";
char ServiceName[]= "SetValue";
char Property1[] = "pressao";
char Property2[] = "testpressao";
#define ACCEPT_TYPE "application/json"

#define LED 2

int i = 0;

void setup () {

pinMode(LED,OUTPUT);

Serial.begin(115200);
WiFi.begin(ssid, password);

while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.println("Conectando...");Serial.println("");
}

}

void loop() {

if (WiFi.status() == WL_CONNECTED) { //Check WiFi connection status

HTTPClient http; //Declare an object of class HTTPClient

String d = String(i++);
int h = d.length();

String fullRequestURL = String(server) + "/Thingworx/Things/" + ThingName + "/Properties/" + Property1 + "?method=PUT&value=" + d + "&appKey=" + String(APIKEY);
http.begin(fullRequestURL);//Specify request destination
http.addHeader("Accept",ACCEPT_TYPE,false,false);
http.addHeader("Content-Type","application/json",false,false);
int httpCode = http.PUT(d);/*Send the request*/digitalWrite(LED,HIGH);delay(200);

Serial.println(fullRequestURL);
Serial.print("Valor da variavel: ");Serial.println(d);
Serial.print("Retorno do httpCode: ");
Serial.println(httpCode);Serial.println("");digitalWrite(LED,LOW);delay(200);

if (httpCode > 0) {//Check the returning code

String payload = http.getString();//Get the request response payload
Serial.println(payload);//Print the response payload

String l = String(i);
int h = l.length();
Serial.println(l);

String fullRequestURL = String(server) + "/Thingworx/Things/" + ThingName + "/Properties/" + Property2 + "?appKey=" + String(APIKEY);

http.begin(fullRequestURL); //Specify request destination
http.addHeader("Accept",ACCEPT_TYPE,false,false);
http.addHeader("Content-Type","application/json",false,false);
Serial.println(fullRequestURL);
int httpCode = http.PUT(l);//Send the request

if (httpCode > 0) { //Check the returning code
String payload = http.getString();//Get the request response payload
Serial.println(payload);//Print the response payload
}

http.end();//Close connection

}

delay(2000);//Send a request every 30 seconds

}
}

 

Telles_0-1632502066443.png


Regards.
Telles.



PaiChung
22-Sapphire I
(To:Telles)

is there anything in the logs in ThingWorx application log?

Telles
12-Amethyst
(To:PaiChung)

Hi, @paic .
Has a lot of log´s.
I will study any warnnings.


Regards.
Telles.

Telles
12-Amethyst
(To:Telles)

Unfortunately, I have to chance the microcontroller to ESP32 and solved the problem!

Regards.
Telles.

Top Tags