Add external webthing to local gateway

I have a webthing server which hosts a single webthing using the python framework. It is accessible via a reverse proxy (nginx).

I want to add this thing to a webthings gateway running on a different network. Adding it via the URL is working fine, but after a moment the gateway loses the connection.

The websocket works fine using other applications (python script, postwoman), although the ws link in the thing definition automatically states a local one:
{"rel": "alternate", "href": "ws://192.168.178.20:8888/"}. Furthermore, security is set to: {"security": "nosec_sc"}.

The gateway logs show the following:

  1. “Successfully created new thing MyLamp”
  2. “Failed to get property on: getProperty: device: http—<myurl.com> not found.”

The Any help is appreciated

The gateway will use the WebSocket URL specified in the thing description, which currently is incorrect. Make sure that your reverse proxy passes the Host header through. If it does that, you should get the proper URL in your thing description.

See here: https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/#passing-request-headers

That worked! Thank you very much :slight_smile: