Skip to main content
1-Visitor
April 12, 2018
Solved

Connecting Raspberry Pi to Thingworx Error

  • April 12, 2018
  • 2 replies
  • 2153 views

Hi,

 

I'm following the Raspberry Pi Quickstart and trying to setup EMS on a Raspberry Pi but it throws an error when I try to run the EMS.

 

[FORCE] 2018-04-12 05:38:50,298 ./wsems: Initializing EMS ....
[FORCE] 2018-04-12 05:38:50,298 main: Using config file /home/pi/microserver/etc/config.json
[INFO ] 2018-04-12 05:38:50,298 ./wsems: Creating the WsEms proxy.
[INFO ] 2018-04-12 05:38:50,298 ./wsems: Starting HTTP Server.
[INFO ] 2018-04-12 05:38:50,299 Main: Using custom certificate and private key for HTTP Server
[ERROR] 2018-04-12 05:38:50,299 Main: Failed to get HTTP Server ssl configuration.
[FORCE] 2018-04-12 05:38:50,299 Main: Exiting....
[DEBUG] 2018-04-12 05:38:50,299 jsonConfigurator::~jsonConfigurator: Deleting JSON object

 

Here is my config.json file:

 

{
    "ws_servers":   [{
            "host": "pp-1804050929fh.devportal.ptc.io",
            "port": 443
        }],
    "http_server":  {
        "host": "127.0.0.1",
        "port": 8080
    },
    "appKey":   "xxxx",
    "logger":   {
        "level":    "DEBUG"
    },
    "auto_bind":    [{
            "name": "PiThing",
            "gateway":  false
        }],
    "certificates": {
        "validate": false,
        "allow_self_signed":true
    },
    "ws_connection":    {
        "encryption":   "ssl",
        "verbose":  true,
        "msg_timeout":  1000

}

}

 

This is my first time doing this, any help would be appreciated. Thanks.

Best answer by NHummel

Hi BlackIce21, 

you can try 

{
 "ws_servers": [{
 "host": "pp-1804050929fh.devportal.ptc.io",
 "port": 443
 }],
 "http_server": {
 "host": "127.0.0.1",
 "port": 8080,
 "ssl": false,
	"authenticate": false
 },
 "appKey": "xxxx",
 "logger": {
 "level": "DEBUG"
 },
 "auto_bind": [{
 "name": "PiThing",
 "gateway": false
 }],
 "certificates": {
 "validate": false,
 "allow_self_signed":true
 },
 "ws_connection": {
 "encryption": "none",
 "verbose": true,
 "msg_timeout": 1000
}
}

 

2 replies

5-Regular Member
April 12, 2018

Just to chime in I replaced the value of appKey with 'xxxx.' Exposing that value could be a potential security risk.

 

Thank you,

 

-- Craig A.

NHummel1-VisitorAnswer
1-Visitor
April 13, 2018

Hi BlackIce21, 

you can try 

{
 "ws_servers": [{
 "host": "pp-1804050929fh.devportal.ptc.io",
 "port": 443
 }],
 "http_server": {
 "host": "127.0.0.1",
 "port": 8080,
 "ssl": false,
	"authenticate": false
 },
 "appKey": "xxxx",
 "logger": {
 "level": "DEBUG"
 },
 "auto_bind": [{
 "name": "PiThing",
 "gateway": false
 }],
 "certificates": {
 "validate": false,
 "allow_self_signed":true
 },
 "ws_connection": {
 "encryption": "none",
 "verbose": true,
 "msg_timeout": 1000
}
}