V2.6.21-beta release: Actions/State and 12 devices

Hey all, I just released Android & iOS versions 1.142.2, which contain firmware version v2.6.21. This version exposes your Bond devices’ Action, State, and Properties in the local API. As always, there’ll be a delay before Apple approves the iOS build for testing.

Now you can request the Bond device to “TurnOn” (devices/x/actions/TurnOn) instead of remembering which command has this effect and calling devices/x/commands/y/tx. The Bond will also keep track of the device state: power, light, speed, fan direction, etc. State should also update if you use the commands API as well, and thus should also work through the app.

(Note that state tracking doesn’t persist past a reboot at the moment! The next release will likely fix this.)

Please try out actions, look at devices/x/state as you do, and let me know if anything looks off.

The only in-app change is a little bonus: I’ve increased the max number of devices from 6 to 12. More to come on this limit soon…

4 Likes

Holy update, Batman!

2 Likes

It works but make sure to use this format:

curl -H “BOND-Token: (token)” -i http://(ip address)/v2/devices/(device id)/actions/(action id) -X PUT -d {}

Is there anyway to send HTTP requests to control the devices? That would make integrating it with 3rd party control systems so much easier.

Out of curiosity, @80mileseast - what third party system(s) are you integrating that don’t allow for PUT requests?
I’ve integrated using the Command TX with my HA controller (an ISY994i) but due to this new firmware I will be updating to use actions instead.

I use RTI but I don’t have the programming skills to create a driver. I know enough to get myself in trouble. Using HTTP requests has been a pretty good workaround. I’m sure someone will eventually create a driver but I didnt want to rely on that.

The documented requests are just that, HTTP requests! Let me break down the curl for you:

curl -H “BOND-Token: (token)” -i http://(ip address)/v2/devices/(device id)/actions/(action id) -X PUT -d {}

“BOND-Token: (token)”

This is a header ^

http://(ip address)/v2/devices/(device id)/actions/(action id)

This is the URL ^

PUT

This is the method ^

{}

This is the body ^ (in this case, it’s just an empty JSON object)

I tried to update and I’m getting the same error as the previous version: “Aww snap! We had trouble upgrading your Bond’s firmware. Error code 0x18100”.

Can you post the API info for upgrading a ‘B’ device?

Thanks.

Wow, I thought that issue was resolved, sorry about that. Yes, of course, here’s the curl for the upgrade.

Important Note: this is only for Bond’s with serials starting in A or B

curl -H “BOND-Token: <Your BOND Token>” -i http://<IP addr>/v2/sys/upgrade -X PUT -d ' {"http_port": 80, "sig": "", "host": "s3.amazonaws.com", "info": "a8bd32d54932ee2740a6b1fc4bd3091770ee04bf2e3f88a5e34e2987037e3680:bond-snowbird:v2.6", "port": 443, "path": "/bond-updates/v2/snowbird/beta-snowbird/bond-snowbird.v2.6.21-beta.bin", "reboot": 1}'

Stay tuned for app changes that’ll finally make this method of firmware delivery unnecessary.

1 Like

Just had to use this curl update as well on iOS 1.142.2 (1), both going from v2.6.7-beta and v2.6.10-beta.

Thanks much. That worked quickly.
I look forward to the new delivery method.

Could someone post an example of a working curl statement that would use the SetSpeed action to set the speed to 2? Per the docs, something like …/actions/SetSpeed(2) should work but that throws an error and the fan doesn’t change speed.

Thanks.

I haven’t been able to track it down exactly but actions seem a bit flaky. When I was previously calling the command directly it worked 100% of the time, using the TurnOff and TurnOn actions it’s maybe 75%

Thanks for the reply. How do I specify the speed argument in the curl statement?

May have figured it out. Let me know if this is not correct:
…/actions/SetSpeed -X PUT -d ‘{“argument”: 2}’

This is correct. SetSpeed and Increase/DecreaseSpeed all take an argument. See the API docs Feature section for more

What commands are present on the device? I’d like to try to reproduce what you’re seeing.

Just TurnOn and TurnOff. It’s a fireplace FYI. I will do more testing today but I’m not home and don’t want to play with a fireplace remotely.

I wish I could get more commands added, unfortunately my FP isn’t in your database and hasn’t been added since December when I submitted the FCC ID to your team :cry:

Jacob,

Thanks. I just couldn’t find any place in the docs that explained how to include the {“argument”: 2} in a curl statement.

Bryan

Got it, okay, we’ll clarify that part of the documentation!

Just adding that I also had to use the curl method to upgrade after receiving the “Error code 0x18100” from the app.