I have it working, but there seems to be a problem with getting the device ID: here is device list from curl output:
curl -H "BOND-Token: [mytoken]" -i http://[myip]/v2/devices
HTTP/1.1 200 OK
Content-Length: 39
Content-Type: application/json; charset=utf-8
{"":"83777720","1":{"":"f1013395"}}
If I hardcode 1 as the device ID in the function getDeviceById, everything works.
outputting ${deviceId} at the line that calls this function reveals it is sending: "1={_=f1013395}"
I am not sure how the data is actually being parsed as I am not that familiar with JSON, but it appears there is a problem with that.
As long as I can hard code it, seems to work great though.