Author Topic: How to preserve brightness level when turning off/on a Dimmable Light (switch)  (Read 2152 times)

Offline garyd9

  • Sr. Newbie
  • *
  • Posts: 44
  • Karma: +4/-0
I just got a vera plus (firmware 1.7.2138), and have been playing around for a day...  One thing that's annoying me a bit is that any time I turn off a "dimmable light" switch that was previously at a <100% level, when I turn it back on with the vera UI (mobile app or web UI), it shoots up to 100% brightness.

For example, I set an overhead light (that's controlled with a GE in-wall z-wave dimmer switch) to 5% brightness, and then turn it off.  If I then use the Vera app or Vera web UI to turn the light back on, it comes back on at 100% brightness.  (If I turn it back on with the physical in-wall switch, it comes back at the same brightness it was turned off at.)

I have the exact same issue with every "dimmable" switch/light I have (including a GE Link bulb (zigbee), the above mentioned GE/Jasco in-wall dimmer (#12724), a linear WD500Z z-wave dimmer, and a GE/Jasco plug in dimmer (#12718.))

My previous (smartthings) hub didn't have this issue.

How can I change the default behavior of my VeraPlus to preserve the brightness level of all these devices by default?

Thank you
Gary

Offline garyd9

  • Sr. Newbie
  • *
  • Posts: 44
  • Karma: +4/-0
I've been able to verify (by using a minimote as a primary controller) that all these devices will preserve brightness levels by default when sent only a basic on/off z-wave command.  So, this is something happening in the Vera firmware... 

Offline kigmatzomat

  • Sr. Member
  • ****
  • Posts: 353
  • Karma: +21/-0
I only have a couple of dimmable hue bulbs which may not act the same.

 Zwave lights have 2 parameters, switch power and dimming level. I bet that the default buttons reset the dimming level and the power.

You can test this with a scene with the following luup code. Replace the device number with your dimmer's Id. It will turn change the power setting but not the brightness. If this works you may want to use some scenes over the default light option.


local device=39
local switchOnOff = luup.variable_get("urn:upnp-org:serviceId:SwitchPower1", "Status", device)

if (switchOnOff == "1") then
      -- Switch is on
    luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "0"}, device)   
else
     luup.call_action("urn:upnp-org:serviceId:SwitchPower1","SetTarget",{ newTargetValue="1" },device)
    end


If you want to also adjust brightness in a scene use the code below. Target 0= dark, 100=full bright.
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "100"}, device)

Offline garyd9

  • Sr. Newbie
  • *
  • Posts: 44
  • Karma: +4/-0
It appears to be a side effect of calling SetTarget with a parameter of 1.  I guess some people would prefer that a light turned on would always come on at 100% brightness, but not everyone would. 

Being that the vera firmware is doing something additional to set the load level to 100 when turning on the switch, it really should be optional/controllable by a variable.  Perhaps I should give vera/mios support a call tomorrow to inquire about this.




Offline garyd9

  • Sr. Newbie
  • *
  • Posts: 44
  • Karma: +4/-0
Called support... and they said this issue was in their tracking system... 

Offline fossilnews

  • Sr. Newbie
  • *
  • Posts: 37
  • Karma: +0/-0
Any news on this?  Just installed a dimmer and would love vera to store a default brightness setting.

Edit: Vera customer support got back to me with the following idea:
Quote
You can create a scene to set the brightness to 50% when the dimmer is turned on. To do this, please go to Scenes > Add scene and select ?Whenever the Dimmer is turned on? as Trigger, and ?Immediately Dimmer Level 50%? as Device Action. Then, validate your adjustments and hit Finish.

This solution works pretty well for me, hopefully it will for you as well.
« Last Edit: June 06, 2017, 11:25:18 pm by fossilnews »

Offline doinitsideways

  • Jr. Member
  • **
  • Posts: 92
  • Karma: +2/-0

Offline doinitsideways

  • Jr. Member
  • **
  • Posts: 92
  • Karma: +2/-0
I believe the new firmware update on the Vera edge that has been released has fixed this? Or the beta version has anyway.

Offline Jamie-

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
I'm still having this occur, any idea if this will be fixed, or if there is a work around?