Here are the diffs
Hue (Connect) SmartApp template changes
$ diff stapp.groovy stappnew.groovy
12c12
< name: "Hue (Connect)",
---
> name: "Hue (Connect) with Effects and Alerts",
538a539,541
> sendEvent(d.deviceNetworkId, [name: "effect", value: bulb.value?.state?.effect])
> sendEvent(d.deviceNetworkId, [name: "alert", value: bulb.value?.state?.alert])
>
547c550,553
< }
---
> }
> sendEvent(d.deviceNetworkId, [name: "effect", value: "none"])
> sendEvent(d.deviceNetworkId, [name: "alert", value: "none"])
>
554a561
> log.debug("put response");
567a575
>
579a588,593
> case "effect":
> sendEvent(childDeviceNetworkId, [name: "effect", value: v])
> break
> case "alert":
> sendEvent(childDeviceNetworkId, [name: "alert", value: v])
> break
621a636,645
> def setEffect(childDevice, desired) {
> log.debug "Executing 'setEffect'"
> put("lights/${getId(childDevice)}/state", [effect: desired])
> }
>
> def setAlert(childDevice, desired) {
> log.debug "Executing 'setAlert'"
> put("lights/${getId(childDevice)}/state", [alert: desired])
> }
>
631c655,656
< put("lights/${getId(childDevice)}/state", [hue: level])
---
> // optional - turn off effect if any color change is made
> put("lights/${getId(childDevice)}/state", [hue: level, effect: 'none'])
639c664,665
< def value = [sat: sat, hue: hue]
---
> // optional - turn off effect if any color change is made
> def value = [sat: sat, hue: hue, effect: 'none']
Hue Bulb Device Template Changes
$ diff bulb.groovy bulbnew.groovy
18a19,22
> command "effect"
> command "effectCL"
> command "alertToggle"
>
19a24,26
>
> attribute "effect", "string"
> attribute "alert", "string"
32a40,48
> standardTile("effect", "device.effect", inactiveLabel: false, decoration: "flat") {
> state "default", label:"Reset Effect", action:"effect", icon:"st.lights.philips.hue-single"
> }
> standardTile("alert", "device.alert", inactiveLabel: false, decoration: "flat") {
> state "default", label:"Alert!", action:"alertToggle", icon:"st.lights.philips.hue-single"
> }
> standardTile("effectCL", "device.effect", inactiveLabel: false, decoration: "flat") {
> state "default", label:"ColorLoop Effect", action:"effectCL", icon:"st.lights.philips.hue-single"
> }
59c75
< details(["switch", "levelSliderControl", "rgbSelector", "refresh", "reset"])
---
> details(["switch", "levelSliderControl", "rgbSelector", "refresh", "reset", "effect", "effectCL", "alert"])
145a162,178
> def setEffect(v) {
> log.debug "setEffect: ${v}, $this"
> parent.setEffect(this, v)
> sendEvent(name: "effect", value: v)
> }
>
> def setAlert(v) {
> log.debug "setAlert: ${v}, $this"
> parent.setAlert(this, v)
> sendEvent(name: "alert", value: v)
> }
>
> def alertToggle() {
> log.debug "Executing 'alert select'"
> setAlert("select")
> }
>
150a184,192
> def effectNone() {
> log.debug "Executing 'effect none'"
> setEffect("none")
> }
> def effectCL() {
> log.debug "Executing 'effect colorloop'"
> setEffect("colorloop")
> }
>
If you want to use these, you need to install a direct copy of the Hue Hub device type (just make a copy from the template and save it) - then you can use your self-published Hue (Connect) App to discover your hub as before…
You’ll be able to see the current values of the effect/alert in the state of the bulb, and you can change them from the tile or from an app. Enjoy. Maybe ST can update their base code to include these, in some form…
Edit: Need to add setEffect and setAlert to the commands section if you want to be able to call them from a SmartApp.