Using Global Variable as Parameter

I think this is just a formatting issue, but I'm trying to use a Global Variable as a Parameter value for a Custom Action on a Custom Attribute. It appears to be showing me the value of the variable, but it's not setting that custom attribute and making the bulb change to the specific Scene I want.

This works for me in WebCore and I'm trying to move it to RM.

Rule Machine:

WebCore:

Is it only one or all of the bulbs that don't work? Have you tried performing the RM action on a subset of the bulbs? Do you see anything in the logs? Are they all the same driver?

They are all the same make and model bulb that support the same custom attribute: setScene. Like I said, it works in WebCore just fine. I just think it's how I'm maybe declaring the variable in the parameter string? I'll bump up the logging and send those along.

Also check how the command is presented on the device page for one of the devices.

This is the device error I'm seeing the logs:
groovy.lang.MissingMethodException: No signature of method: WizRGBWLight.setScene() is applicable for argument types: (java.lang.String, null) values: [Party, null] Possible solutions: setScene(java.lang.String), nextScene(), resetScene() on line 6274 (method setScene)

Looks like it's not getting the value....? Strange...

image

You can see the attribute is setScene
image

Just to clarify one thing... What you are trying to do is not related to the attributes of the device. It is related to the Commands that are available and the parameters they accept.

Yes. The behavior of this driver is if I send this setScene command with a value, it will turn on that Scene

In the log, can you identify the device that is producing that log entry? By clicking on the error log type? Or simply the device listed on the left hand side of the log on screen?

It's giving the exact same error for every device I have listed in the action:

It looks like RM thinks you have an extra parameter here. I don't see one in your screenshot, but if you started creating one in the UI and then backed out, maybe finish creating it, then remove it (or just remove it if you already see such an option).

You could also just try re-creating this action in RM to see if that helps. In any case, that's what appears to be the problem from this error.

1 Like

I executed it in WebCore just for a sanity check and it worked fine.
Here is the output I get there:

That was it, thank you! I do see that comma now where it was trying to pull in another parameter.

I'm slowly moving over to Rule Machine from WebCore and it's just been a learning curve as I know all the ins and outs of WebCore.