Skip to main content
1-Visitor
August 25, 2020
Solved

Raspberry Pi Tutorial - Failing to make connection to Thingworx

  • August 25, 2020
  • 1 reply
  • 3500 views

When attempting to update the Thing humidity and temperature properties in Thingworx the python program is failing to make a new connection. The following error occurs.

 

HTTPSConnectionPool(host='thing-server-qa.rd1.thingworx.io', port=8443): Max retries exceeded with url: /Thingworx/Things/RaspberryPi1(5305843aa530edef)/Properties/*?verify=False (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x75f5e830>: Failed to establish a new connection: [Errno 110] Connection timed out',))

 

I have used Postman to test the HTTP put command for the REST API and obtain a status of 200 OK so I know the information being sent to Thingworx server is correct. However, even then the property values are not being updated. For the python program I have verified that the Thing name and app key are correct.

 

So I believe this may point to two issues:

  • Issue with python program establishing connection to Thingworx server
    • Doesn't appear to be an authentication issue.
    • Content type in header is correctly set to application/json.
  • Updating property values even though response is OK.

 

Any guidance would be appreciated.

    Best answer by sdidier

    Hello rsloma,

     

    I suppose that it is due to this settings to enable :

    https://community.ptc.com/t5/PTC-Academic-Program-Discussions/Thingworx-Trial-REST-API-failed/td-p/517312

     

    I think that's in Trial instance, this setting is switch off and it cannot be switch on for some security reasons.

     

    Best regards,

    Samuel

    1 reply

    17-Peridot
    August 28, 2020

    Hello rsloma,

     

    When running the Python program, do you have a look to log files in Thingworx  ?

     

    If a problem occured in Thingworx, it will be quick and accurate to identify it with a verbose in log files, specialy in SecurityLog.log and in ApplicationLog.log files.

     

    Best regards,

    Samuel

    rsloma1-VisitorAuthor
    1-Visitor
    August 28, 2020
    The logs in the Monitoring section are not visible to me.