Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
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:
Any guidance would be appreciated.
Solved! Go to Solution.
Hello rsloma,
I suppose that it is due to this settings to enable :
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
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
Code snippets follow.
thing = 'RaspberryPi1(5305843aa530edef)'
url = 'https://thing-server-qa.rd1.thingworx.io:8443/Thingworx/Things/' + thing + '/Properties/*?verify=False'
headers = {'Content-Type': 'application/json', 'appKey': 'xxx'}
...
payload = '{\"Prop_Humidity\":' + '{0:.1f}'.format(humidity) + ', \"Prop_Temperature\":' + '{0:.1f}'.format(temperature) + '}'
response = requests.put(url, headers=headers, json=payload)
print(response.text.encode('utf8'))
-------------------------------
HTTPS response is the timeout shown in the original message.
Attached is a screen capture of attempting to connect via Postman.
Receive back a status of 200 OK.
However, the Thing property values do not update.
Hello rsloma,
I suppose that it is due to this settings to enable :
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
Thanks for the answer. I don't have access to be able to change the Platform Subsystem settings, so I cannot complete this project. That's too bad since I was looking forward to it.