Machine Rule for Fibaro RGBW Predefined Programs

I have an older Fibaro RGBW controller FGRGBWM-441 v2.5
This was working fine with HomeSeer Znet (that failed) but have changed to HE8Pro Zwave radio.
Have configured to the native "Fibaro RGBW Controller" driver.
The controller has preprogrammed Light Effects:
image
With the HE phone app "Connect to Hub" screen, I can cycle through the preprogramed effects using Set Next Effect and Set Previous Effect.
I want to be able to set an effect (4 Lite Fade) as an event, but the Rule Machine seems not to provide a way to do this.
On HomeSeer, for this device, I ran a C program to do this:
image
Sub SetParam(ByVal parms As String)
Dim param As String() = parms.Split(",")
' Set HomeID to be address of Zwave controller (ZNet)
Dim HomeID As String = "DD0A77A0"
' 1st param is node id of Fibraro RGBW Controller (2)
Dim NodeID As String = param(0)
' 2nd param is the RGBW Controller Parameter to change
' Parameter 72 is selection of predefined program
Dim FunctionID As String = param(1)
' Predefined programs available:
' 1=normal (default)
' 6=fireplace
' 7=storm
' 8=rainbow
' 9=aurora (rainbow with more colors and slower change)
' 10=LAPD
Dim Value As String = param(2)
Dim ConfigResult As Integer = 0
Dim ConfigResultVal(3) As String
ConfigResultVal(0) = "Unknown"
ConfigResultVal(1) = "Success"
ConfigResultVal(2) = "Queued"
ConfigResultVal(3) = "Failed"
ConfigResult = hs.PluginFunction("Z-Wave", "", "Configuration_Set", {HomeID, Convert.ToByte(NodeID), Convert.ToByte(FunctionID), Convert.ToByte(1), Convert.ToInt32(Value)})
hs.WriteLog("Param Set", "Parameter Set " & ConfigResultVal(ConfigResult))
End Sub

How does one do this with HE Rule Machine?

In short, use a custom action.

Specifically, when adding the action, select Set Mode, Variable or File, Run Custom Action, then select Run Custom Action. When prompted for the capability, choose any that your device supports, like Switch. Then, choose your specific device. Under Select custom command, choose setEffect. Add a parameter, choose number for the type and the effect number you want, then select Done with parameter and then Done with this action.

This, of course, assumes you have some existing rule or one you want to create where you just use this action somewhere inside the rule. If you have problems figuring that out, sharing more information can help someone help you figure something out.

2 Likes

Thanks! Working perfectly!

1 Like