V2.6.32-beta not responding to SetSpeed Action

Fan not responding to SetSpeed action even though it is defined as compatible with the action.

Action Sent

URL PUT REQUEST ENDPOINT: http://10.0.0.78/v2/devices/750531f0/actions/SetSpeed
HEADERS: BOND-Token = TOKEN
DATA: {“argument”:3}

Error Reported

{“_error_id”:61,“_error_msg”:“action not supported”}

Device Information (ID 750531f0)

{"name":"Great Room Fan","type":"CF","location":"","actions":["SetSpeed","StartDimmer","TurnOff","ToggleLight","Stop","TogglePower","TurnOn","IncreaseSpeed","DecreaseSpeed","TurnLightOn","TurnLightOff"],"_":"9851fd42","commands":{"_":"ce0df3e7"},"properties":{"_":"e9fa15b4"},"state":{"_":"a71134fa"}}

Device State

{"power":0,"speed":1,"light":0,"_":"a71134fa"}

System Information

{"target":"zermatt","fw_ver":"v2.6.32-beta","fw_date":"Wed Jun 26 18:44:50 UTC 2019","uptime_s":9277,"make":"Olibra","model":"BD-1000","branding_profile":"O_BD-1000","upgrade_http":true,"api":2,"_":"1fc8a4a2"}
01/07/2019 23:26:50 - Getting device token

Hey there, do you have a command with action “SetSpeed” with argument 3?

One quick check to see what “SetSpeed” arguments that should be supported is: GET the properties endpoint for the device, does it have a “max_speed” field?

I’ll need to reach out to the beta tester. There is no max_speed field available. Does that mean that there is no SetSpeed options? If so why is SetSpeed an available action?

It’s likely that “SetSpeed” action is present because the “IncreaseSpeed” or “DecreaseSpeed” command is present, but for now a “SetSpeed” command is the only source of “max_speed”.

This is because “IncreaseSpeed” is indicative of a stateful device, which is not readily-handleable by a command-based approach (with 4 speeds and 40 brightnesses, typical of a simple stateful remote, there are 160 possible signals). For now, this is the type of device that we let the backend handle, and is also known as a “cloud device”. My main focus at the moment is bringing such “cloud” devices on the Bond itself, defined by a signal-building script.

I believe that we’ve seen non-stateful remote that has Increase/Decrease Speed buttons. I need to think about how to handle this one… probably just with a PATCH to its properties…

A rough roadmap for stateful remotes:

Near future: Beta release, this sort of remote is supported as a “Cloud device” and works with our integrations and app.
~1 month after beta release: (*If everything goes smoothly with the public release) Our scripted devices moved offline, at which point they’d be accessible by the local API
Beyond: support for custom, user-defined scripts

1 Like

so for now do you think i should utilise the speed feedback to determine what speed they are currently on and then increase and decrease based upon that feedback?

I reached out to the beta tester about this. His remote has discrete codes.which is displayed as discrete codes in the Bond app as well. See photo of remote below.

Any reason why it wouldn’t have max speed if it did have discrete commands?

No, it definitely should have a max speed! How did the tester set up the device? V1 app, V2 app, or straight through the API?

I expect to see 6 commands with the following structure {“name”: “Speed 1”, “action”, “SetSpeed”, “argument”: 1} and so on, upon getting the properties endpoint, the Bond should just find the highest “SetSpeed” argument to be its "max_speed"

I am not sure how they set it up to be honest.

There was no max_speed key available. We don’t look at commands in our software and rely purely on actions. Should we grab a list of all commands and parse it to look for the command with the highest number for the max speed?

This shouldn’t be necessary, as this is already what is done when the properties endpoint of a device is requested. Both the apps should populate the proper actions/arguments for a given command, and users of the local API can just ignore commands and use actions.

I’m not sure where the error is, if the user can supply a Bond serial I can investigate further.

@jacob I have a fan remote that is non-stateful and has increase/decrease speed buttons. I have no expectation that the bridge attempt to fake saving state for such a remote. Just send the requested command as-is.

I understand the problem now and am making a quick patch.

Thanks Jacob. Really appreciate the hard work.

It turns out that there was no need for a new app release to make this change. Try it out now, there should be an option to record Increase/Decrease Speed commands, which should work for your normal control purposes. The corresponding actions may give you some trouble (as I hadn’t yet accounted for lack of max_speed), but I hope to have a fix in the next version, which I’ll release in the next couple days bundled with some other fixes/features.

1 Like

I would if it were possible. unfortunately, my bridge is now in bad shape. The light ring is now a steady orange. unplugging, waiting 15 seconds, plugging back in results in the bridge returning to the same state. I have made no changes since it was working two days ago.

The old link here says solid orange indicates that the Bond Bridge was unable to connect to WiFi and suggests a green reset (reset button held for 5 seconds, not just a hard reboot).
Thought we had better options now in the new firmware but I can’t find it right now, of course.
Still, a green reset shouldn’t delete any devices.

Now, the Config AP will re-enable if the Bond was unable to connect to our backend. @j4nd3rs0n mentioned that his config AP re-enabled at an inappropriate time, leading me to believe that the Bond is unable to connect to our backend. The Bond will also eventually reboot if it’s unable to connect, which would explain the frequent DHCP requests.

1 Like

If SetSpeed is not supported you can still use the BOND API to transmit the appropriate signal to your fan (Assuming the BOND has recognized your fan already.) Use the “GET command” API to find the appropriate command then use the “PUT command” API to control your fan.