Amazon Echo Skill with lights

I guess I just find this strange because I came over from Homeseer.

When I tell Alexa to turn a dimmer ON it turns on but at whatever the level it was set to last.

On the other hand, you can say off instead of setting it to zero. If I wanted a level, I'd tell Alexa what level I wanted.

Is there any way to change this so that "on" means 100?

99% of the time I want 100.

It kinda depends on the device… On/Off commands are separate from level and will usually be last level used..

If you want 100% every time this would likely have to be a custom driver, or a rule that sets level to 100% when switched on.

Thanks for the quick response!

1 Like

Sorry...follow up question.

Is there a way to write a rule...

  1. That can distinguish between local and remote control

  2. I have 30+ Dimmers. Does that mean I need 30 rules?

BTW...many of these are Homeseer 300 dimmers. When operated from the wall they do what I want, in settings they go to 100 by default. Not last level. So, it does seem like something in the way the Alexa app is written that makes last level happen. I'm just used to "on" being like switch just as off will always be zero.

What is happening here is the driver is sending on as Z-Wave switch multilevel command with a value of 0xFF which translates to last non-zero value.

I'm actually kinda shocked that Homeseer sent on as full 100%.. There are lots of reasons why people have different level settings and resetting to 100% all the time could cause chaos..

1 Like

Thanks…I may have been confusing in my response…

They have an option to go to 99 when turned on locally with the driver I’m using.

I’m not really familiar enough with Hubitat, yet to have watched if that is a hub command or something to switch knows without help from Hubitat once set in the driver… I’ll check out that when I get home.

I’m sure this is an individual thing, but I do wish on was on with Alexa… or there was an option to set that in the app.
Again, thanks for the response!

Curios as this is not a configuration parameter listed for this device.. What driver are you using?

HomeSeer HS-WX300 Advanced (Dimmer) RMoRobert Configuration, Actuator, Flash, Refresh, HoldableButton, ReleasableButton, ChangeLevel, SwitchLevel, Switch, PushableButton

Actually. I believe it is....from the device doc.

|36|Sets Default Dim Value when turned ON via paddle press|1|Possible values: 0-99

0 = LAST dim level when switch was last turned off

1-99 = dim level

Cool so you could change line 458 from:

hubitat.zwave.Command cmd = zwave.basicV1.basicSet(value: 0xFF)

to:

hubitat.zwave.Command cmd = zwave.basicV1.basicSet(value: 99)

That is absolutely awesome…will give that a try!

THANKS SO MUCH!

Keep in mind that driver is for the WX300 I believe you have stated before you have 200 series devices. So the settings presented may not be actually available on your device.

But, anyway the fix presented above would be the quick and dirty way to just force them all to full brightness every time they are turned on.

Alexa assumes you want the lights at the same value you used the last time. Normally, my bedroom lights come on a 50% as that is sufficient to get us ready for bed or getting dressed in the morning. However, sometimes we are doing things that require brighter lighting. In that case, I simply instruct Alexa to turn on the bedroom lights to 100% and she complies.

I have a lighting schedule that turns on the bedroom lights 20 minutes before bedtime. In that case, the lights come on at only 50%. When I get up in the morning, I can tell Alexa to turn on the bedroom lights and they will come on at 50% if that is where they were when we went to bed.

If you want low lighting for a romantic environment, you can tell Alexa to dim the lights to 10% or whatever is appropriate.

Thanks! It's not Alexa that assumes this. When using another hub for the last 7 years "on" meant 99. Off meant "0," and you could ask for anything else you wanted. In the past I've had 5 different events for nightlights that are all at low levels, so it changes it up a bit. Those are not levels I want when I actually need light for something other than mood setting.

You can do anything you want in a rule. Alexa takes intervention.

This really should be a customizable feature IMHO.

Thanks. Yes, and sadly while the same driver was working for the 200's, while it actually turned on and off the light...status never updated. Kind of weird.

Thanks!!!

I edited the command above and now have the behavior I wanted with the 300's!!! ...On means on and any level I ask for or set via a rule or Alexa sets correctly.

So, I feel a little awkward asking this, I am using the 200+ drive by Homeseer. for the 200 series. I'd think that somewhere in this chunk of code I might be able to do the same thing. I used to do a little Turbo C programming but that was something like 30 years ago...this looks a lot like it...but not good enough to spot what I might mess up anymore. Just don't respond if you don't want to mess with it. I totally get it. There's another "define ON" section, but it looks like that's for local control.

private dimmerEvents(hubitat.zwave.Command cmd) {
def value = (cmd.value ? "on" : "off")
def result = [createEvent(name: "switch", value: value)]
if (state.lastLevel != cmd.value && enableInfo) log.info "$device.displayName level is ${cmd.value}%"
if (value != device.currentValue("switch") && enableInfo) log.info "$device.displayName switch is ${value}"
state.lastLevel = cmd.value
if (cmd.value && cmd.value <= 100) {
result << createEvent(name: "level", value: cmd.value, unit: "%")
}
return result

That’s what you want.. On is what the command is sent from the Alexa integration to the driver