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

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Thingworx Protocol with ESP8266

Telles
13-Aquamarine

Thingworx Protocol with ESP8266

Hi, Team.

I´m use the ESP12F in my board, to communicate with TX.

I´m use the code bellow to update my Things.

String fullRequestURL = String(server) + "/Thingworx/Things/" + ThingName + "/Properties/" + Property1 + "?method=PUT&value=" + d + "&appKey=" + String(APPKEY);
http.begin(fullRequestURL);//Specify request destination
http.addHeader("Accept",ACCEPT_TYPE,false,false);
http.addHeader("Content-Type","application/json",false,false);

int httpCode = http.sendRequest("PUT", d);

The httpCode has answer -1. 
In reference table, -1 it´s 404 to web server. But the server keeps on line. Also I copy and paste the generated URL, the Property Thing has updated.

Regards.
Telles.

ACCEPTED SOLUTION

Accepted Solutions
Telles
13-Aquamarine
(To:Telles)

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

Regards.
Telles.

View solution in original post

4 REPLIES 4
nmilleson
17-Peridot
(To:Telles)

@Telles ,

 

Did you check the tomcat localhost logs or the ThingWorx Error log?  Sometimes that will yield some useful information about why your request didn't go through correctly.

 

--Nick

Telles
13-Aquamarine
(To:nmilleson)

Hi, @nmilleson.
I´m ever check all permissions programs, like TOMCAT, FIREWALLS, etc. At least no lower my security.
I made a different code, abstracting in just one single URL, and swaping the ESP8266 by ESP32, it´s some better. Now the server aswer to ESP: 401. But these test I made by homeofficing.

Regards. Have a nice weekend.
Telles.

Telles
13-Aquamarine
(To:Telles)

Also, maybe that´s the reason for can´t get speach updates?

Regards.
Telles.


Telles
13-Aquamarine
(To:Telles)

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

Regards.
Telles.

Announcements


Top Tags