Author Topic: Aeotec Nano Dimmer Switch Issue  (Read 60 times)

Offline LiteEarthTreader

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Aeotec Nano Dimmer Switch Issue
« on: February 01, 2019, 09:16:19 pm »
Hi,

I've recently purchased a VeraEdge and Aeotec NanoDimmer, and have set up an enclosed test jig with the Nano Dimmer wired in 2 wire mode (eg with Neutral and Active wired together on Nano Dimmer) to a desk lamp.  A standard toggle light switch is wired between the Sw1 and Com contacts.  I originally had a dimmable LED globe in the lamp (with NanoDimmer Bypass), but have replaced with standard Incandescent globe for now.

There is an older member of our family who looses track of time and stays up reading all night - and then sleeping most of the day.  The idea behind this project is to install Nano Dimmers in several lighting circuits in the house concerned, and through the Vera, dim the lights at pre-set times to a level below which she can read, but bright enough for finding her way around the room(s).  She doesn't use Smartphones or PCs, so after initial set-up, the primary controls for the lights need to be good old-fashioned light switches.

The project is partially working; I've set up three Scenes, with Full Brightness, Mid Brightness and Low Brightness light levels specified.  I've used the following Lua (with different initial brightness levels set for the different scenes):

Code: [Select]
luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "70"}, 4)
local lul_tmp = luup.variable_get("urn:upnp-org:serviceId:SwitchPower1", "Status", 4)
if (lul_tmp == "0") then
    luup.call_action("urn:upnp-org:serviceId:Dimming1", "SetLoadLevelTarget", {newLoadlevelTarget = "0"}, 4)
end

When the lamp is already on, the scenes change as expected.
When the lamp is "off", the lamp comes on momentarily then off again.  This is annoying, but from what I've read there's no other way around it.
If I now try and turn on the lamp via the Vera Web interface, the lamp will come on to the newly set level.
However, if I try and turn on the lamp via the switch wired to the NanoDimmer, the lamp switches on, but with the previously selected brightness rather than the new one.
If after changing the scene I use the Web interface to turn the lamp on and off firstly, the lamp will then turn onto the new level via the switch.

Basically, while the switch is supposed to turn on to the last known level, it doesn't appear to do this if the previous action by Vera was to change the level via scene Lua.

Any ideas on settings I should change - or other Lua I should be using?

- Rob.
« Last Edit: February 02, 2019, 07:15:29 pm by LiteEarthTreader »