Dim With Me App Updated

smartapp_lighting

(Todd Wackford) #1

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.


Dim 2 switches at the same time
Group dimmer that actually works with v2 hub?
Using a z-wave wall dimmer to control OTHER lights
SmartTiles Dashboard 5.4.2 - July 13 (www.SmartTiles.click)
Cree to offer Zigbee LED smart bulb
Dim multiple dimmers
Virtual Dimmer and Dim With Me
Combining multiple lightbulbs to act as 1
Keen Smart Home Vents
Zwave dimmer to dim OSRAM bulb
[RELEASE] OSRAM Lightify Dimmer Switch Device Type - use as Switch, not buttons
Fibaro 2 Dimmer (212 not 211)
CoRE - Get peer assistance here with setting up Pistons
2 devices 1 light - can I deal with as 1 Thing?
How to setup a brightness trigger?
Cooper Aspire RF syncing master and auxiliary switches
Virtual Switch created - how to attach 3 smart lights in hallway? Stumped
#2

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!


(Todd Wackford) #3

What brand and model # of dimmers are you using?


#4

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.


#5

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


(Scott G) #6

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.


#7

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.


(Scott G) #8

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.


#9

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()
}


#10

Thanks for the help and suggestions, wackware and Sticks18.


(Joel) #11

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


(Scott G) #12

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.


(Joel) #13

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 ?


(Scott G) #14

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?


(Joel) #15

It doesn’t no. More is the last option


(Joel) #16

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


(Andrew) #17

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


(Andrew) #18

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


(Denver Morton) #19

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?


#22

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.