Cannot Create Custom Command in Rule Machine

I think I understand how it is suppose to work , but mine does not work that way. Once I select a device to create a Custom Command, I seem to be locked in (isolated) to that device’s commands. Right now I can create a Custom Command for any of the Thermostats commands, but nothing but the Thermostats commands. Poll() is not an option.

When I had originally setup up a Temperature device I could create a Poll(), getWeather() (and one other one that I forget), but no other options were available.

When I changed the device and/or capability I get the blank Rule Machine with the ‘Done’ button and nothing else.

I know you think I am crazy … and I am not certain that I am not still doing something wrong. But I cannot get Poll() to work when I have any Thermostat custom commands and I cannot get any Thermostat custom commands when I have Poll() working.

Matthew,

I am seeing the exact same thing here. I have a custom command, poll(), for the native Weather device

If click on New Custom Command, I can see other commands available for the Weather device

image

I then try to change the device to one my my custom devices that I know exposes a custom command

Clicking 'New custom command' I get

Hitting browser BACK, and then changing the test device back to Weather, I get

Something doesn't feel correct.

It seems like only the original device that is used can actually create custom commands.

Matthew,

What I did was modify my RM periodic weather update trigger to issue the now natively supported ‘refresh()’ command, instead of using the custom ‘poll()’ command. I was then able to delete the poll() custom command from RM.

Bruce (@bravenel)

Can you add ‘poll()’ as a standard RM command, please? Seems like something as standard as poll() should be included by default.

I’ll continue to do more testing… I think the issue has something to do with data being left behind from the initial custom command creation process. It seems like after creating the custom command, one has to undo every selection of device and capability as you back out of each window, or else some data is somehow left behind causing the issue.

[UPDATE] I just successfully, for the first time, created two custom commands in RM, from two different devices/capabilities. I did have to UNSELECT every setting as I backed my way out of each screen after creating the first command. Afterwards, I was able to select a new capability, a new device, and then add a new custom command.

Bruce - It feels like just some simple variable cleanup after a command is added is all that is really necessary, maybe? Users typically do not have to unselect everything they done before clicking ‘Done’ on each screen. Thoughts?

This has been an issue with custom commands from the very beginning, back when RM was on ST. Apps do not do well with "re-used" selections, they are in fact quite delicate in this regard, We are well aware of the problem. You did discover the correct steps to avoid the issue. Having said that, we are going to change the implementation to avoid this issue completely.

Will add poll() to RM. Will be in next release.

1 Like

Thank you for verifying I am not completely crazy (at least as far as Custom Commands go). I too found the refresh() late last night and it does seem to be working for me. I never did get another device.capability to work for me and I did try to ‘deselect’ my way back out to the beginning. I probably didn’t get something in the right order.

Thanks for all your help on this. I am still enthusiastic about this product and the support from staff and the community. I expect issues to arise and I am continually amazed at the efforts to resolve them. Keep up the good work.

1 Like

Haha, you know, we want it to be good for you! We are re-structuring custom commands to resolve this once and for all.

I thought this “fix” was in the user guide @bravenel?

I’ve been doing this since you first introduced custom commands but could have sworn I saw it mentioned somewhere on this forum.

Just for others reading this thread, a concise method to do custom commands:

  1. Create custom command
  2. Undo all selections that led to the new command
  3. Continue from 1 as needed until all commands are added
  4. When done, verify all selections are removed before leaving the custom rules section.
1 Like

So a couple of weeks ago I created 93 custom Playtrack() commands to support all the audio notification tracks I use on the Aeotec Doorbell. All are working fine and I created them one after the other without backing all the way out before creating a new one (this was my mode when I used Rule Machine on SmartThings and what made me ache for the simplicity of not having to do this with CoRE).

Should I assume that I have created the scenario where I can no longer create a custom command for a different device? Is delete RM & recreate everything the only method of recovery? While I have no immediate need for custom commands on another device, I’d like to mentally prepare myself if the answer is ‘yes’ (and hope that Playtrack can be supported as a native command).

Try it and see? It might be enough to recreate the last custom command and then back out, unselecting as you go.

The thing is I don’t have (AFAIK) any other device that uses custom commands. I can still create and delete (and re-create) custom commands for the Aeotec Doorbell device just fine.

Yes, the bug occurs when you try to create a custom command on a second device. You could just install any of the custom device codes to trial it… My sinope thermostat one is fairly short, and it has the same poll command that other people were struggling with.

Ah ok. I will give that a go.

EDIT: Just created a virtual thermostat and set it up with your driver. I was able to go into RM and select it for use in creating custom commands and with no issues; was also able to go back and create new commands for the Aeotec Doorbell.

1 Like