Across so many platforms / OS / code or script languages - all of them work with Actions for me, and others.
I’d go one by one with curl on the command line and identify for each Action that isn’t working for you if it works with curl and maybe is something VB.Net
specifically that isn’t playing nice.
Some while back, people using Postman were having issues but we were able to identify and rectify.
If you want, let’s start with TurnOff. It, like many actions, needs to be called with a PUT and an empty payload:
curl -H "BOND-Token: xxxxxxxxxxxxxxxx" -X PUT -i http://192.168.y.z/v2/devices/aaaaaaaa/actions/TurnOff -d {}
HTTP/1.1 200 OK
Content-Length: 18
Content-Type: application/json; charset=utf-8
{"_":"c518e0b2"}
or if using a VB / COM object:
PUT: 200|{"_":"c518e0b2"}
Now, it’s absolutely true if I do not PUT it, I can get a 404 (except somehow if I do it with a VB / COM object instead of curl, it seems like a get a 204):
curl -H "BOND-Token: xxxxxxxxxxxxxxxx" -i http://192.168.y.z/v2/devices/aaaaaaaa/actions/TurnOff -d {}
HTTP/1.1 404 Not Found
Content-Length: 0
GET: 204|
Or if i PUT it via curl, but without the empty payload, I can get an error:
curl -H "BOND-Token: xxxxxxxxxxxxxxxx" -i http://192.168.y.z/v2/devices/aaaaaaaa/actions/TurnOff
curl: (52) Empty reply from server
It also errors out, but as a COM object error, if attempting to PUT via VB / COM object with an empty payload:
COM Error intercepted !
err.number is: 0x80020009 / -2147352567
err.windescription: Exception occurred.
err.description is: The server returned an invalid or unrecognized response
err.source is: WinHttp.WinHttpRequest
err.retcode is: 0x80072F78