@TAustin, I’m struggling with your EdgeBridge proxy, to push json payloads.
My test case is with a smart sound bar, creating an input for HDMI1 and an input for HDMI2. Right now I am testing via regular CLI using curl:
Running remotely on local LAN.
(IP addresses, tokens, etc. are all faked)
Works OK
This proves connectivity is ok, and the basics of the proxy work, including the configuration file with the bearer token. Woohoo!
Fails
curl -vv “http://192.168.1.18:8088/api/forward?url=https://api.smartthings.com/v1/devices/1a123ab1-abc1-1234-1a12-123a45b6789a/commands” --header “Content-Type: application/json” --data-raw ‘{“commands”:[{“component”:“main”,“capability”:“mediaInputSource”,“command”:“setInputSource”,“arguments”:[“HDMI2”]}]}’
Curl Response - 422
Trying 192.168.1.18:8088…
Connected to 192.168.1.18 (192.168.1.18) port 8088 (#0)
POST /api/forward?url=https://api.smartthings.com/v1/devices/1a123ab1-abc1-1234-1a12-123a45b6789a/commands HTTP/1.1
Host: 192.168.1.18:8088
User-Agent: curl/7.79.1
Accept: /
Content-Type: text/json
Content-Length: 116
.
Mark bundle as not supporting multiuse
HTTP 1.0, assume close after body
HTTP/1.0 422 Unprocessable Entity
Server: SimpleHTTP/0.6 Python/3.10.6
Date: Thu, 08 Sep 2022 00:24:31 GMT
CONTENT-TYPE: text/xml; charset=“utf-8”
DATE: Thu, 08 Sep 2022 00:24:31 GMT
SERVER: edgeBridge
CONTENT-LENGTH: 0
.
Closing connection 0