Dim With Me App Updated

All,

I have updated the “Dim With Me” app. Please get the latest code from below. The update fixes a problem with some dimmer devices only setting the “level” event. Dim with me was subscribing to “setLevel” event only. It now subscribes to both. Make sure to cut and past from github using the “raw” screen. Past it to your IDE, save and publish.

I’ll submit “Dim with Me” to ST soon so we can stop cut and pasting for future updates.

7 Likes

I’m trying to get this to work for me, but am having some issues. I’d like my slave dimmers to follow the master dimmer level, but it doesn’t seem to ever get into the ‘def switchSetLevelHandler(evt)’, even when the master dimmer level is changed and I see a setLevel change in the log.

Here is a sample log where I am changing the master dimmer level:

6f300ef3-2c10-4bff-92e2-4119f107d2a9 1:50:04 PM: trace setLevel(22.0)

But, no response from Dim With Me.

Any ideas?

Thanks!

What brand and model # of dimmers are you using?

I am using 2 GE Link Bulbs, and a GE/Jasco in-wall dimmer switch. My end goal is to have the in-wall switch be the master, so I’ve have tried that, but have also tried setting up a Dim With Me from a GE Link Bulb master to another GE Link Bulb as slave. Looks like I had already been using the 0.2 Version of Dim With Me as well. Thanks for the reply— any other suggestions are much appreciated.

I looked at the GE switch, it appears to be a GE 45639. The bulbs are GE Link Bulbs.

Sorry if this is a silly question, but are the GE bulbs powered by the GE/Jasco switch? Or are they always on?

You might try creating a virtual switch to act as the master and having all 3 follow it. I have 6 GE Link Bulbs that follow a virtual switch and it’s working great.

GE Bulbs are always on.

GE/Jasco switch powers one incandescent bulb.

I’m not familiar with virtual switches. Where can I install those?

Also, in debugging a little bit, it seems that the Dim With Me app is not notified when I change the level on the master switch; i.e. I can see ‘setLevel(59)’ for the master switch in the main log, but no additional entries are generated in the Dim With Me log.

You can do this in the developer IDE on the devices page. Click the add device button in top right, and fill out the form to create a name, device ID, and assign it to a dimmer switch device type (I like the Better Virtual Dimmer Device linked below). This device will now show up in ST, and you use it as the main switch in the Dim With Me.

1 Like

I made a few adjustments, but got the app to work for my situation with the following:

def installed()
{
subscribe(masters, “switch.on”, switchOnHandler)
subscribe(masters, “switch.off”, switchOffHandler)
subscribe(masters, “level”, switchSetLevelHandler)
log.info “installed to all of switches events”
}

def updated()
{
unsubscribe()
subscribe(masters, “switch.on”, switchOnHandler)
subscribe(masters, “switch.off”, switchOffHandler)
subscribe(masters, “level”, switchSetLevelHandler)
log.info “subscribed to all of switches events”
}

def switchSetLevelHandler(evt)
{
log.info "switchSetLevelHandler Event: ${masters.latestValue(“level”)}"
slaves?.setLevel(masters.latestValue(“level”))
}

def switchOnHandler(evt) {
log.info "switchOnHandler Event: ${evt.value}"
slaves?.setLevel(masters.latestValue(“level”))
//slaves?.on()
slaves2?.on()
}

def switchOffHandler(evt) {
log.info "switchoffHandler Event: ${evt.value}"
slaves?.off()
slaves2?.off()
}

Thanks for the help and suggestions, wackware and Sticks18.

Cool app thank you for sharing. From what I can tell, you can only use this for one setting. I.e i can’t set master and slaves for each room? Or am I wrong? I can’t workout how to add additional room settings. I have 19 dimmable smart lights.

if not how do i do that so that i can add only one light which controls all other lights in that room to the dashboard (click tiles for example).

Thank you

You can install multiple instances of the same SmartApp. Follow the steps in here to add the SmartApp code via the IDE and publish it for yourself. Then you My Apps section and choose Dim with Me. This will let you choose a master and slaves, and you name it for one of your rooms. Rinse, repeat for additional rooms.

Thank you. My apps does not appear when I go to add an action or select more. Even after I publish for me. Any idea what can cause this ?

There should be one more section to the right of “More” called “My Apps”. That is typically where self-published SmartApps will reside. Does that exist for you?

It doesn’t no. More is the last option

Logged out and logged back into mobile app and it appears now all good. I couldn’t work out how to install the app settings multiple times from the desktop site my apps. Hopefully I can with mobile. Can you actually install settings many yikes for apps from desktop ? Thanks so much for your help

I don’t know if this is the latest post for “Dim with me” but i submitted a pull request to have the master switch update state if the slaves are all the same. I didn’t like seeing my “all kitchens” switch look off because i had turned them all on some other way.

Here’s the file if people want to update now:
https://github.com/ajma/twack-smarthings-apps/blob/patch-1/dim-with-me.app.groovy

Alternatively, we could make it a config setting to have the master switch update based on slave states. Thoughts?

I am using 4x WeMo Smart LED bulbs and I can only get it to control two of them when using the app. I have tried with one bulb as the master and with a virtual dimmer as the master. All 4 will turn on and off but only two receive the dim command. Any ideas?

ok, i’ve tried this app with my hue bulbs and jasco dimmers, and the slaves don’t follow the masters dimming level, unfortunately… just the state [on/off]. i do have the slaves in the ‘slave dimmer switches’ section, too.