[OBSOLETE] Aspire Cooper RF9500 Device Type (basic DTH in post 6)

Are you only using the RF9500 for this automation?

Most of the core experts hang out in the core peer assistance thread. :sunglasses: If you ask your question there, they’ll be happy to help.

1 Like

If he is just using the cooper rf9500 it might be better to use Toggimmer as it will be faster response than CoRE.

1 Like

Yes, I’m only using the RF9500.

ST patched the Android app. I was unable to use CoRE or Toggimmer. I’ll give it a try tomorrow.

@whoismoses can you explain why Toggimmer would be faster?

Toggimmer does one thing, CoRE does everything. In this particular case when you press a button and expect it to immediately turn on, even 200-400ms matters. Toggimmer is optimized in the sense that there is less lines of code to execute in order to turn the lights on and use dimming.

2 Likes

Thank you @whoismoses. I’d like to set the dimmer level to 100% when initially turned on. Any recommendations on how to do that?

I added it.setLevel(100) in the switchHandler but the previous state is still maintained.

Did you change this line to it.setLevel(100)?

Yes I did. It does turn on at 100% but the dimming level is off. It keeps the old dimming level. So if the switch was turned off at 50%, turning it back on goes to 100%, and then pressing down on the dimming button continues down from 50% (previous level).

Is there a way to dispatch levelHandler event to have it set to 100%?

Here is the sequence in the logs:

97c50e46-b1fe-4aba-bfd5-afc36fabea81  10:01:37 AM: debug TG -- End levelHandler(evt).
97c50e46-b1fe-4aba-bfd5-afc36fabea81  10:01:37 AM: debug TG -- End setDimmers(val)
97c50e46-b1fe-4aba-bfd5-afc36fabea81  10:01:37 AM: debug TG -- Begin getNextValue()
97c50e46-b1fe-4aba-bfd5-afc36fabea81  10:01:37 AM: debug TG -- Begin setDimmers(val)
97c50e46-b1fe-4aba-bfd5-afc36fabea81  10:01:37 AM: debug TG -- DOWN
97c50e46-b1fe-4aba-bfd5-afc36fabea81  10:01:37 AM: debug TG -- state.sw = 20.
97c50e46-b1fe-4aba-bfd5-afc36fabea81  10:01:37 AM: debug TG -- evt.value = 10.
97c50e46-b1fe-4aba-bfd5-afc36fabea81  10:01:37 AM: debug TG -- Begin levelHandler(evt).
97c50e46-b1fe-4aba-bfd5-afc36fabea81  10:01:32 AM: debug TG -- End switchHandler(evt).
97c50e46-b1fe-4aba-bfd5-afc36fabea81  10:01:32 AM: debug TG -- Current Level = 100.
97c50e46-b1fe-4aba-bfd5-afc36fabea81  10:01:32 AM: debug TG -- Kitchen Cabinets - Left -- Turned on.
97c50e46-b1fe-4aba-bfd5-afc36fabea81  10:01:32 AM: debug TG -- Begin switchHandler(evt).
97c50e46-b1fe-4aba-bfd5-afc36fabea81  10:01:18 AM: debug TG -- End levelHandler(evt).
97c50e46-b1fe-4aba-bfd5-afc36fabea81  10:01:18 AM: debug TG -- End setDimmers(val)
97c50e46-b1fe-4aba-bfd5-afc36fabea81  10:01:18 AM: debug TG -- Begin getNextValue()
97c50e46-b1fe-4aba-bfd5-afc36fabea81  10:01:18 AM: debug TG -- Begin setDimmers(val)
97c50e46-b1fe-4aba-bfd5-afc36fabea81  10:01:18 AM: debug TG -- DOWN
97c50e46-b1fe-4aba-bfd5-afc36fabea81  10:01:18 AM: debug TG -- state.sw = 30.
97c50e46-b1fe-4aba-bfd5-afc36fabea81  10:01:18 AM: debug TG -- evt.value = 20.
97c50e46-b1fe-4aba-bfd5-afc36fabea81  10:01:18 AM: debug TG -- Begin levelHandler(evt).

The problem is that there is logic in the levelHandler that maintains the virtual level…

This might work… Add this method to the Toggimmer app…

def levelUp(evt, theLight, theLevel) {
    log("Begin levelUp(evt...).", "DEBUG")
    
    log("evt.value = ${evt.value}.", "DEBUG")
    log("state.sw = ${state.sw[evt.displayName]}.", "DEBUG")
    log("UP", "DEBUG")
    state.sw[evt.displayName] = theLevel
    
    theLight.setLevel(theLevel)

    log("End levelUp(evt...).", "DEBUG")
}

Then replace the it.on() on the switcHandler

levelUp(evt, it, 100)

This might work, but it isn’t perfect.

Unfortunately, that did not work. Same outcome. The event value stays as-is but the level changes.

What ends up happening is:
state.sw = 100 //changed in the app
evt.value = 0 //looks like maintained by the switch events?

@whoismoses - Do you have a recommendation on how to keep the On/Off state between the dimmer and light synchronized? I find that if someone in my household uses Alexa to turn on the lights, the Cooper Switch is still in the off position. I can press the button on the Copper switch to toggle the on/off state but then in ST the states are not synchronized – one shows ON while the other shows OFF.

I don’t have this issue and you shouldn’t either. See the method below. When there is a switch event (on or off) it loops through the selected lights and toggles them. Can you post a screenshot of your settings for Toggimmer?

def switchHandler(evt) {
	log("Begin switchHandler(evt).", "DEBUG")
	lights.each { it->
    	if(it.currentValue("switch") == "on") {
        	it.off()
            log("${it.label} -- Turned off.", "DEBUG")
        } else {
        	it.on()
            log("${it.label} -- Turned on.", "DEBUG")
        }
    }
	log("End switchHandler(evt).", "DEBUG")
}

Here’s the screenshot:

I’m using your “Beast” device handler. I noticed that when I try to set level 100 in the app the Cooper Switch dim level in ST stays as-is. If it was set to 50% it stays at 50%. The only way I’m able to change the Cooper Switch dim level is using the physical dim buttons on the switch.

@whoismoses Could it be the device handler? If I try to move the dimming level in ST app for Cooper Switch it doesn’t change. Wondering if that’s normal.

The device handler for the cooper switch isn’t really meant to be used in the app. I could take a look at it this week.

The lights you have there, are they just lights (LIFX, HUE) or are they really smart wall dimmers.

1 Like

Thanks. I’m using Osram Lightify LED strip lights which are dimmable in ST app.

Your app without any changes works great. What’s strange is if Alexa or ST app is used to turn on one of my Kitchen Lights the Cooper Switch remains off in ST. There’s gotta be a way to synchronize the dimmer and the light.

Do you have Alexa turning the Osram lights on or the RF9500?

I use the Cooper Switch to turn on the Osram lights. These lights are also hooked up to Alexa. When my family asks Alexa to turn on the Osram lights that’s when ST state for Cooper Switch gets out of sync.

I was thinking of linking the Cooper Switch to Alexa instead but as you pointed out the dimming is not working directly in ST. If the Cooper Switch dimming in ST app changed the Osram lights then that solution may work. Another solution, which I think may be easier, is to make some changes to Toggimmer which will keep the switch status in synch.

Ok, I get it. When I built the DH for the Cooper RF9500 I never intended to use the ST app. However, if you turn the lights on using Alexa, taping the switch once (physical) should turn the lights off and the other way around. I get that the Cooper RF9500 in the ST app might say on, but it should still just toggle. Does the scenario i mention above work?

Alexa On
Tap Physical Switch off
Tap Physical Switch on
Alexa off

Does that work as expected?

1 Like