[ST Edge] Web Requestor: a driver to issue local POST and GET HTTP requests

Are you including the GET: prefix with that URL?

GET:http://10.0.1.117/bha-api/open-door.cgi?r=ghcbby@1&username=ghbhytk0002&password=6Hldd69YS

Yes, tried both Post and Put too…

Just trying putting the Base64 encoded username and password in the header now…

Yeah, that worked!!

I am trying to get ST to sent a POST command to my Home Assistant. I keep a 401 error even though my token string is correct. Below is my configuration. Thanks in advance.

EDIT: I can get the call to work in Postman, just not with Web Requestor. I have also tried the simpleserv.exe for troubleshooting and couldn’t get that to work either.

Kurt

Hello.

It’s likely a header problem. Servers can be picky about what is included there. If you DM me your exact settings, I will copy/paste into a test request on my end and see if I can replicate the issue. Have you also inspected the request headers sent by postman to see what may be different?

What exactly do you mean by this - is the request not coming through? I think all that does is spit out what it received - of course not checking any authorization. Is your hub on the same subnet as your server?

I haven’t used this driver for a while, but wouldn’t you need to specify an authorization scheme in the Authorization header? For example, Bearer. It looks like you have just specified a token.

I tried Authorization = “Bearer {token string}” and that didn’t seem to help.

Because the token string so long, I only have enough space for the following:

Content-Type = application/json, Authorization=token string, Accept=*/*

Here is what Postman is sending, I did try adding Authorization=”Bearer LongString” in SmartThings to no avail, still 401 error.

I got simpleserv working and here is what is showing up, I don’t know if the Authorization token should be showing up since it is 184 bytes by itself and simpleserv is shoing 106 bytes received..

Are you able to enter your entire token into the Settings screen Headers for the device? I recall there was a character limit for Settings fields, which is why I had to provide a “More Body” field

Can you please DM me the exact copied text from your Settings screens so I can copy and paste into a device here to test? Re-typing from images you post is tedious and error prone. :slight_smile:

The body and headers should definitely be showing from simpleserv. Try editing both the body and header settings fields- changing them somehow and resaving them. Then run it again with simpleserv. I’m wondering if it’s finding something wrong with the text in those fields.

If you know how to run the CLI, it would be good to get driver logs to see what may be happening.

@TAustin great to see you posting again. I want to say thanks again for your work.

I have recently come up against an issue with an apparent limit on the size of the response message. I think I read there is a limit but can’t find the post right now. I don’t get an error … I just don’t get the whole message back and consequently, I can’t extract the data I want.

Do you know if the response string size can be increased?

Hello! I’ll have to look at the code. The only limitation that I can think of is what can actually be displayed on the Controls screen - those fields certainly have limits. I’ve not tested limits lately, but last I knew SmartThings took away multi-line output fields. The Extracted string and numeric fields would presumably be something relatively small - is that where you are having a problem? Maybe you can give me more details so I can understand where the problem might be.

Absolutely.

The following is an example response:

It’s incomplete … the actual response is longer and the part truncated contains the value I am trying to extract. But reading your post above, perhaps that’s simply a display limit issue?

Here’s the response I get using Postman. The bolded line is what I am trying extract.

{
“device”: {
“name”: “Sync Box - Family Rm”,
“deviceType”: “HSB2”,
“uniqueId”: “xxx”,
“apiLevel”: 10,
“firmwareVersion”: “2.5.4”,
“buildNumber”: 814593634,
“termsAgreed”: true,
“wifiState”: “wan”,
“ipAddress”: “xxx”,
“wifi”: {
“ssid”: “xxx”,
“strength”: 4
},
“lastCheckedUpdate”: “2025-09-26T08:10:55Z”,
“updatableBuildNumber”: null,
“updatableFirmwareVersion”: null,
“update”: {
“autoUpdateEnabled”: true,
“autoUpdateTime”: 8
},
“ledMode”: 1,
“action”: “none”,
“pushlink”: “idle”,
“capabilities”: {
“maxIrCodes”: 24,
“maxPresets”: 16
},
“beta”: false,
“overheating”: false,
“undervolt”: false,
“bluetooth”: false
},
“hue”: {
“bridgeUniqueId”: “xxx”,
“bridgeIpAddress”: “192.168.254.87”,
“groupId”: “293ea41c-5297-4932-a4c4-6e38929e16be”,
“groups”: {
“293ea41c-5297-4932-a4c4-6e38929e16be”: {
“name”: “Family Room - All”,
“numLights”: 10,
“active”: false
},
“61668ba3-59d2-463e-9001-2269b33e6f24”: {
“name”: “Kitchen”,
“numLights”: 8,
“active”: false
},
“866bc5bc-940d-4989-a0f1-f96f613f58a8”: {
“name”: “Back Garden”,
“numLights”: 8,
“active”: false
},
“c9db684a-e06b-416c-a8d0-dad74714adea”: {
“name”: “Front of House”,
“numLights”: 8,
“active”: false
},
“ab993743-0add-43e5-9c88-f4e9fbc86d60”: {
“name”: “Master Bedroom”,
“numLights”: 2,
“active”: false
}
},
“connectionState”: “connected”
},
“execution”: {
“mode”: “powersave”,
“syncActive”: false,
“hdmiActive”: false,
“hdmiSource”: “input4”,
“hueTarget”: “293ea41c-5297-4932-a4c4-6e38929e16be”,
“brightness”: 100,
“lastSyncMode”: “video”,
“video”: {
“intensity”: “high”,
“backgroundLighting”: true
},
“game”: {
“intensity”: “intense”,
“backgroundLighting”: false
},
“music”: {
“intensity”: “high”,
“palette”: “melancholicEnergetic”
},
“preset”: null
},
“hdmi”: {
“input1”: {
“name”: “HDMI 1”,
“type”: “generic”,
“status”: “unplugged”,
“lastSyncMode”: “video”
},
“input2”: {
“name”: “HDMI 2”,
“type”: “generic”,
“status”: “unplugged”,
“lastSyncMode”: “video”
},
“input3”: {
“name”: “HDMI 3”,
“type”: “generic”,
“status”: “unplugged”,
“lastSyncMode”: “video”
},
“input4”: {
“name”: “Receiver”,
“type”: “avreceiver”,
“status”: “plugged”,
“lastSyncMode”: “video”
},
“output”: {
“name”: “HDMI Out”,
“type”: “generic”,
“status”: “plugged”,
“lastSyncMode”: “video”
},
“contentSpecs”: “0 x 0 @ 0 - SDR”,
“videoSyncSupported”: false,
“audioSyncSupported”: true
},
“behavior”: {
“inactivePowersave”: 0,
“cecPowersave”: 0,
“usbPowersave”: 0,
“hpdInputSwitch”: 0,
“hpdOutputEnableMs”: 0,
“arcBypassMode”: 1,
“input1”: {
“cecInputSwitch”: 0,
“hpdInputPortSwitch”: 0,
“linkAutoSync”: 0
},
“input2”: {
“cecInputSwitch”: 0,
“hpdInputPortSwitch”: 0,
“linkAutoSync”: 0
},
“input3”: {
“cecInputSwitch”: 0,
“hpdInputPortSwitch”: 0,
“linkAutoSync”: 0
},
“input4”: {
“cecInputSwitch”: 0,
“hpdInputPortSwitch”: 0,
“linkAutoSync”: 0
}
},
“ir”: {
“defaultCodes”: true,
“scan”: {
“scanning”: false,
“code”: null,
“codes”:
},
“codes”: {}
},
“registrations”: {
“1”: {
“appName”: “Hue App iOS”,
“instanceName”: “iPhone”,
“role”: “admin”,
“verified”: true,
“lastUsed”: “2025-09-23T04:16:33Z”,
“created”: “2025-08-17T20:20:28Z”
},
“2”: {
“appName”: “Hue App iOS”,
“instanceName”: “iPad”,
“role”: “user”,
“verified”: true,
“lastUsed”: “2025-09-21T17:48:57Z”,
“created”: “2025-08-22T18:07:41Z”
},
“3”: {
“appName”: “SmartThings”,
“instanceName”: “SmartThings”,
“role”: “user”,
“verified”: false,
“lastUsed”: “2025-09-26T21:02:22Z”,
“created”: “2025-08-22T18:23:44Z”
}
},
“presets”: {}
}

Note, I do this on another device with success, but the response message is shorter.

UPDATE: It does appear the full response is returned. Here’s the response in the CLI logs. I apologize, I should have reviewed the logs before reporting the problem above.

2025-09-27T13:25:02.355063894Z DEBUG Web Requestor Multi v1.2  Response:
>>>{"device":{"name":"Sync Box - Family Rm","deviceType":"HSB2","uniqueId":"xxx","apiLevel":10,"firmwareVersion":"2.5.4","buildNumber":814593634,"termsAgreed":true,"wifiState":"wan","ipAddress":"192.168.254.233","wifi":{"ssid":"xxx","strength":4},"lastCheckedUpdate":"2025-09-27T08:10:55Z","updatableBuildNumber":null,"updatableFirmwareVersion":null,"update":{"autoUpdateEnabled":true,"autoUpdateTime":8},"ledMode":1,"action":"none","pushlink":"idle","capabilities":{"maxIrCodes":24,"maxPresets":16},"beta":false,"overheating":false,"undervolt":false,"bluetooth":false},"hue":{"bridgeUniqueId":"xxx","bridgeIpAddress":"192.168.254.87","groupId":"293ea41c-5297-4932-a4c4-6e38929e16be","groups":{"293ea41c-5297-4932-a4c4-6e38929e16be":{"name":"Family Room - All","numLights":10,"active":false},"61668ba3-59d2-463e-9001-2269b33e6f24":{"name":"Kitchen","numLights":8,"active":false},"866bc5bc-940d-4989-a0f1-f96f613f58a8":{"name":"Back Garden","numLights":8,"active":false},"c9db684a-e06b-416c-a8d0-dad74714adea":{"name":"Front of House","numLights":8,"active":false},"ab993743-0add-43e5-9c88-f4e9fbc86d60":{"name":"Master Bedroom","numLights":2,"active":false}},"connectionState":"connected"},"execution":{"mode":"powersave","syncActive":false,"hdmiActive":false,"hdmiSource":"input4","hueTarget":"293ea41c-5297-4932-a4c4-6e38929e16be","brightness":100,"lastSyncMode":"video","video":{"intensity":"high","backgroundLighting":true},"game":{"intensity":"intense","backgroundLighting":false},"music":{"intensity":"high","palette":"melancholicEnergetic"},"preset":null},"hdmi":{"input1":{"name":"HDMI 1","type":"generic","status":"unplugged","lastSyncMode":"video"},"input2":{"name":"HDMI 2","type":"generic","status":"unplugged","lastSyncMode":"video"},"input3":{"name":"HDMI 3","type":"generic","status":"unplugged","lastSyncMode":"video"},"input4":{"name":"Receiver","type":"avreceiver","status":"plugged","lastSyncMode":"video"},"output":{"name":"HDMI Out","type":"generic","status":"plugged","lastSyncMode":"video"},"contentSpecs":"0 x 0 @ 0 - SDR","videoSyncSupported":false,"audioSyncSupported":true},"behavior":{"inactivePowersave":0,"cecPowersave":0,"usbPowersave":0,"hpdInputSwitch":0,"hpdOutputEnableMs":0,"arcBypassMode":1,"input1":{"cecInputSwitch":0,"hpdInputPortSwitch":0,"linkAutoSync":0},"input2":{"cecInputSwitch":0,"hpdInputPortSwitch":0,"linkAutoSync":0},"input3":{"cecInputSwitch":0,"hpdInputPortSwitch":0,"linkAutoSync":0},"input4":{"cecInputSwitch":0,"hpdInputPortSwitch":0,"linkAutoSync":0}},"ir":{"defaultCodes":true,"scan":{"scanning":false,"code":null,"codes":[]},"codes":{}},"registrations":{"1":{"appName":"Hue App iOS","instanceName":"iPhone","role":"admin","verified":true,"lastUsed":"2025-09-27T02:20:43Z","created":"2025-08-17T20:20:28Z"},"2":{"appName":"Hue App iOS","instanceName":"iPad","role":"user","verified":true,"lastUsed":"2025-09-21T17:48:57Z","created":"2025-08-22T18:07:41Z"},"3":{"appName":"SmartThings","instanceName":"SmartThings","role":"user","verified":false,"lastUsed":"2025-09-27T13:25:02Z","created":"2025-08-22T18:23:44Z"}},"presets":{}}<<<

And here’s the part where it’s failing to extract the value:

2025-09-27T13:25:02.428229560Z DEBUG Web Requestor Multi v1.2  Parsing response for key Execution.brightness
2025-09-27T13:25:02.428542644Z WARN Web Requestor Multi v1.2  Configured Key value was not found

this may be a dumb question, but for the key, did you provide “execution.brightness” or “Execution.brightness”? Just make sure you used lower case. I know in the Settings screen, they erroneously show a capitalized first character of text values (even though it isn’t), but the log output should be showing lower-case ‘e’, so that’s why I’m asking.

If that’s not the issue, I may need to try and duplicate this on my end so I can see what’s going on.

Well, that’s embarrassing. That was exactly it. I got thrown off by the display in Settings as I remembered that capitalization issue. However, in this field it does seem to save the lower case for the first letter.

Sorry for wasting your time.

No problem at all! Just happy we found it.

I just wanted to jump in and say a BIG thank you for the edge driver development you’ve done!! It is amazing!

I’ve just integrated control of my Reolink cameras through the Web Requestor driver to post HTTP requests towards their API.

And then also added the MQTT Driver to get notifications from the cameras and temperature data from my 1-wire sensors into Smartthings.

All done with some python and apache/php glue.

I started out trying to figure out how to use the official Smartthings REST API but since the personal access tokens are now only valid for 24h the only option was to go full OAuth support and that seems more or less impossible unless I want to expose my web server towards public Internet and have a valid public URL and valid trusted certificates.

So using your drivers proved a much better and simpler option for me and with the benefit of running everything local.

So once again, BIG THANKS! (and hope the drivers will continue to work and be supported for ever :smile: )

That’s awesome. Glad it was helpful.

As an aside, did you consider trying my ONVIF camera driver? Reolink cameras work pretty well with it for purposes of motion alerts. Unfortunately SmartThings had taken away the ability to view the camera video feed for Edge drivers, but to be honest I’m not sure what value that provided anyway. The manufacturer’s app will always be superior.

Thanks for the suggestion, I saw the ONVIF driver a few weeks ago when I started playing around with my Reolink cameras but haven’t tried it yet (but I have it on my todo list).

Does it provide support for the different types of “AI” alerts/notifications, like ‘person’, ‘animal’, ‘vehicle’, etc?

Because one of the reasons I’ve done my own integration through webhooks and MQTT was to get full support of the different alerts and also being able to configure the cameras from Smartthings through the camera’s HTTP REST API. (and also because I like to tinker and already have a Linux server up and running for other purposes.

(And linking my 1-wire network into Smartthings through MQTT and virtual MQTT temp and humidity sensors is just great!!)