Sending a discrete command to a device

Hi,
I have a 3 button zwave remote for my bali blinds. I can pair the remote via zwave to the hubitat. I would like to create a virtual button that mimics a button push on the remote. I logged the button push that I want to emulate and received this:
parse description: zw device: 23, command: 5B03, payload: BF 00 03 , isMulticast: false

Not sure how I would go about setting up a virtual button to send command: 5B03 and payload: BF 00 03 to my shades. Any help is appreciated.

Thanks

You shouldn't really need to do this anymore: as of hub firmware 2.2.6, the "push" command is required to be implemented on all button drivers. (This is different from, but related to, the "pushed" attribute you'll see under "Current States" that may get changed when a real-world button event happens.) To test it out, go to the device page for your button device (under "Devices" in the admin UI), and look for a button/command at the top labeled "Push." Type in the button number, then click/tap the button to execute the command.

What this does for most devices is basically simulate a "virtual"/digital button press instead of a real/physical press. Apps/rules that subscribe to the button event would see this too, so it should do what you want. If not, check "Logs" and maybe you'll see an error (again, this is new, so some drivers might have this command exposed but not actually have implemented it yet, particularly if it's community code--but it would be pretty easy to add).

Alternatively, you could create a virtual button device, but that would be different--basically, you'd need to add that as a second "trigger" or subscription to whatever app you're using. It wouldn't tie in directly to the real device except via any method, like this, that you could use to make it do the same thing in the end.

1 Like

Thanks for the quick response. Im pretty new to hubitat but I think I tried what you said, ill go back and try again. Some of the issue maybe that the device i have is a bali/graber/somfy 3 button remote (up, down, home) but when its paired it uses the somfy 2 button driver. The home button is the third button. If I push this button it does register in the logs and the device info screne, however when i put 3 in the push it doesnt seem to do anything. Ill check my setup and try again. Thanks

I think that is the primary issue, actually. The hub needs a driver that knows what to do with the third button command from the device. Without that, the hub can see that a z-wave command is being sent out, but can’t do anything about it.

1 Like

Is there anyway for me to send that command i originally listed without writing a new driver?

I’m not a developer so don’t take this as gospel, but I don’t think it’s possible for a purely virtual button device to send a z-wave command in the manner you’re looking to do (perhaps with the right kind of driver, but then you might as well make a driver for the 3 button z-wave remote).

@bertabcd1234 would have a better idea than me.

1 Like

Maybe I'm misunderstanding, but it sounds like you're trying to parse a Z-Wave command, not send one yourself (a Z-Wave "command" also includes things sent from the device to the hub, so the terminology can be confusing)--basically getting that third button into an event on Hubitat somehow, when the driver only sees (and was written for) the first two. You won't be able to make that happen without a driver, and you can't have two drivers associated with the same device (ignoring things like parent/child that don't apply here), so you'd really need one written just for this device. You might try searching here to see if someone has written one, or maybe see if Groovy DTH code is available for SmartThings, which would likely be easy to report.

Alternatively, Hubitat has new-ish built-in "Generic Z-Wave Plus Button Controller" driver as well as the "Generic Z-Wave Button Controller" driver. You might try seeing if one of these works with the device as-is. Otherwise, again, you'd need something written for the device.

I think OP does want to send a z-wave command with a virtual button press (or maybe I’m still confused re: terminology :upside_down_face:).

But I think ultimately, a driver that actually works with the 3 button somfy remote is a necessary step regardless.

I just went back to the remote device page in hubitat and i put all 3 buttons in the "push" area one at a time, hit push and nothing happened.
To reiterate the setup:
Blinds and remote reset to factory
Blinds paired to hub
Remote paired to hub
Remote paired to blinds as secondary controller
Both remote and hubitat can control blinds, however the remote device in hubitat wont operate the shades.
Thanks for all help so far

I also have a 2 button remote paired to another shade and the hub. The 2 button remote device in hubitat also does nothing with the push command for either 1 or 2

Right, this is not going to do anything with Z-Wave. It's just going to generate an event (on Hubitat) that you can use for any purpose, the typical intent being an alternative/"virtual" way to trigger the same automation you'd trigger as the result of a real/physical button event.

To get this third button event (which does seem to be coming into the hub just fine from the debug log you posted), you'd really need a driver that parses this Z-Wave command into an appropriate event on Hubitat. I'm not familiar with this device personally but don't see any built-in driver that looks like it was written specifically for this device, so the generic options I mentioned above are probably your best bets (besides the one you're currently using) unless you are able to find or write a custom driver. (That being said, if this is the only difference between the 2- and 3-button devices, this would probably be enough information for staff to figure out an easy driver modification, too...)

Maybe its not the remote that needs the driver then? I'm getting confused.

I was under the impression that if the device was paired with the hub, and the device had a driver, that if I used the "push" feature in the device page (along with a button number) that the hub would send a zwave command as if it had come from the physical device. I guess this isn't true?
No my understanding is that the "push" feature could really only be used to trigger something else already linked that that button.

Maybe its the shade driver that's the issue.
I can put the shade up, down, or at any value in between 0-100 with the hub no problem.
The issue is that any value I set between 0-100 doesn't ever put the shade in the same state as pushing that third button on the remote.
That third button is doing something, but it doesn't seem that I can reproduce that state with the commands in the generic zwave shade device. Its almost as if the 0-100 doesn't have enough resolution to get me to the correct spot. Level 1 is not enough, Level 2 is too much. I guess that's why I was focusing on trying to send exactly what the remote was sending from the debug log, but I guess that also isn't possible.
If it helps to explain these are layered shades that have alternating panel that slide past each other. When the panels don't overlap its the equivalent of a tilted closed blind. When the panels do overlap, its the equivalent of a tiled open blind. I can never get the panels to overlap completely.

I assumed it wass the remote that needs the driver, or at least I assume what you want is for Hubitat to interpret a press of the third button on this device as a "button 3 pushed" event or some similar event that you could use to perform an automation on the hub.

But, maybe I'm confused--and I think that may be the case from the additional descriptions above. If you've figured out what the remote is sending (via Z-Wave) to the blinds and want to send that to your blinds (via some hub-based method), you should be technically do that form an app--or, I think, driver, though "raw" Z-Wave commands from apps is rare (but not impossible according to my testing) and I've never tried using a driver to send a command to a different device, though I assume that it should be similarly possible (and equally awkward, but again, not impossible--I assume). But the command you posted looks like some Central Scene Notification, which I assume would just be what the remote is sending to the hub, conventionally interpreted as a button event on Hubitat.

I can see where this is a bit confusing, but for most button devices, the "push" command on the device page just generates a "digital"/virtual/simulated push--so you can use it to trigger the same apps/automations that a real push would. It is all on the hub side and does not work at the protocol level at all (no Z-Wave, Zigbee, etc. involved), and there were debates in the early days of the platform about whether these commands should even be required for such devices, which generally work only in the opposite direction (real-world actions causing hub events).

So this is interesting...
If i set the blinds as generic zwave dimmers, and use a dimmer on my dashboard, if I click the dimmer "on" the shades behavior is exactly what Im looking for. It splits the blinds perfectly.

The third button on the remote sets a "preferred level" which in the case of these blinds is the level where they split evenly. I don't know what it is about the dimmer driver, but clicking it "on" activates that preferred level.

So now I can at least get the functionality working on the blinds, however it is at the expense of losing some of the icon and reporting features on the dash board (partially open, etc...) and battery level reading in the device page

Any explanation of why this dimmer "on" seems to work?

Not sure, but I suppose the blinds interpret whatever Z-Wave command the hub is sending (Basic Set? Mutlilevel Set? with some value, but for "on" I'd assume 0xFF for either, which I'd expect to be fully open or closed, but I'm not familiar with any blinds besides the ones I have) as whatever you're seeing.

I suppose it may be useful to take a step back and ask what you're actually trying to do. If you just want a Dashboard button to open the blinds to a specific level, a virtual button added to Dashboard with a rule that sets the blinds to a specific level in response to that virtual button push would be sufficient.

I suppose it may be useful to take a step back and ask what you're actually trying to do. If you just want a Dashboard button to open the blinds to a specific level, a virtual button added to Dashboard with a rule that sets the blinds to a specific level in response to that virtual button push would be sufficient.

This would be the easiest, the issue is that there is no level that sets the blinds correctly. This is difficult to explain because of the unique design of the shade. Setting level to "1" doesn't move the shade enough setting level to "2" moves the shade too much when using the generic zwave shade driver. When using the dimmer driver and clicking the dimmer "on" it will activate that "preferred level" if the shade is completely closed to start.

Interesting--most Z-Wave devices take a level from 1-99, but it sounds like going from 1 to 2 has unexpected results for your device? I can't speak to that. However, the "open" command on a blinds/shades driver should e similar to the "on" command for a switch/dimmer, so if you haven't tried that, it can't hurt. Otherwise, you might need a custom driver for this device (or maybe try searching for your model number here or even in the ST forums to see if anyone has found a way around this?).

Thats what I was hoping as well, however the "on" command with the shade driver fully opens the shade the same as the "open" command.

Weird. If I remember, Hubitat's Z-Wave dimmer drivers had to change to using Z-Wave's Switch Multilevel Set commands instead of the Basic Set commands to turn on the device. A "Set Level" would likely also use a Switch Multilevel Set command, but most drivers will scale whatever value you provide to the accepted level range of 1-99, so getting a 255 to get passed through that way seems unlikely to be but probably all you could do without custom code otherwise. Or I suppose you could keep using the dimmer driver if it works; you won't get the blinds/shades capabilities exposed, but a lot of apps work better with devices that present as dimmers anyway (though voice control might be awkward). A custom app should also be able to send this "raw" Z-Wave command and I could probably throw something together that would (pretty sure I still have the code I wrote to test this a while back...), but I'm not sure if that's the best possibility...

Hey @ksg123 and @bertabcd1234: any progress on this?

I'm trying to do something very similar with Bali blinds (my post is here). I have a different remote, but I'm trying to do the exact same thing: emulate a remote command.

The reason I am trying to do this is because the remote, through magic which is unknown at this time, can control multiple blinds simultaneously, with one command. This is preferrable to how Hubitat controls the blinds because it sends individual commands, resulting in a noticeable delay between each individual blind's open/close behavior.

For more context, the blinds and remote are both paired with Hubitat, and then the remote was "associated" with the blinds afterwards. I'm guessing OP's setup is the same.

I included an example of the remote's command (logged) in my original post; it's the same as what OP (@ksg123) is attempting to emulate.

I'm not sure if it's possible to send a command to remote to force the remote to press a button (my various attempts have all failed), but I'd be both surprised and disappointed if there's no way for Hubitat to send the exact same command.

@bertabcd1234, if you can find your test from a while back (or give any hints on how I might build that behavior from scratch), that would be extremely helpful.