We have moved at community.getvera.com

Author Topic: Making 2 seperate Dimmers Master/Slave?  (Read 2279 times)

Offline amocored

  • Newbie
  • *
  • Posts: 19
  • Karma: +0/-1
Making 2 seperate Dimmers Master/Slave?
« on: June 19, 2012, 11:37:28 am »
I have two seperate circuits, each with their own dimmer switch.  I would like to make one of the circuits a Master dimmer that will force the other switch to dim accordingly.  I got the slave to go all the way on or off depending in what direction I went with the Master, but I don't know how to have it look at the Master and dim to the same level. 
« Last Edit: June 19, 2012, 11:40:23 am by amocored »

Offline DaveGee

  • Jr. Member
  • **
  • Posts: 73
  • Karma: +0/-0
Re: Making 2 seperate Dimmers Master/Slave?
« Reply #1 on: June 20, 2012, 09:47:28 am »
You'll need to provide more detail, the first three that come to mind would be:

1 What type of Vera 1 2 3 or lite?
2 What version of Vera ui4 or ui5 ... Earlier?
3 What brand and  model are the zwave switches?

I too am new to zwave/Vera but I know those in the know would need the above at a minimum.

Offline RichardTSchaefer

  • Community Beta
  • Master Member
  • ******
  • Posts: 10091
  • Karma: +764/-143
Re: Making 2 seperate Dimmers Master/Slave?
« Reply #2 on: June 20, 2012, 10:04:01 am »
You will probably need some luup code:
Code: [Select]
function setval ()
  DimSvc = "urn:upnp-org:serviceId:Dimming1"
  SlaveDeviceID = 10
  MasterDeviceId = 5
  val = luup.variable_get(DimSvc, "LoadLevelTarget", MasterDeviceID)
  luup.call_action(DimSvc, "SetLoadLevelTarget", {newLoadLevelTarget = val}, SlaveDeviceID)
end

Some init code:
luup.variable_watch("setval", DimSvs, "LoadLevelTarget", MasterDeviceID)
See: http://wiki.mios.com/index.php/Luup_Scenes_Events for more info.
« Last Edit: June 20, 2012, 09:31:19 pm by RichardTSchaefer »

Offline amocored

  • Newbie
  • *
  • Posts: 19
  • Karma: +0/-1
Re: Making 2 seperate Dimmers Master/Slave?
« Reply #3 on: June 20, 2012, 05:46:54 pm »
Vera 3, UI5, Intermatic c300 dimmers.

Thanks for the code.  I see where you got it from.  I will still have some questions, but I am going to play with it tonight and see what I get.  I Love This Stuff.

Offline garrettwp

  • Master Member
  • *******
  • Posts: 6371
  • Karma: +227/-128
  • Vera 3, Lite, ISY994
Re: Making 2 seperate Dimmers Master/Slave?
« Reply #4 on: June 20, 2012, 06:33:08 pm »
Problem with the luup code is that the intermatic switches technically do not support instant status. So there will be a delay when manually operating the switch.

- Garrett

Offline RichardTSchaefer

  • Community Beta
  • Master Member
  • ******
  • Posts: 10091
  • Karma: +764/-143
Re: Making 2 seperate Dimmers Master/Slave?
« Reply #5 on: June 20, 2012, 09:19:31 pm »
Does not use the status ... reads the SetTarget value and set the others SetTarget.

Offline garrettwp

  • Master Member
  • *******
  • Posts: 6371
  • Karma: +227/-128
  • Vera 3, Lite, ISY994
Re: Making 2 seperate Dimmers Master/Slave?
« Reply #6 on: June 20, 2012, 09:29:00 pm »
Correct, but any changes to the target value on the switch manually will not take effect right away on the other switch. Hence instant updates will not be used.

- Garrett

Offline oTi@

  • Community Beta
  • Master Member
  • ******
  • Posts: 4041
  • Karma: +32/-6
  • UI what ?!
Re: Making 2 seperate Dimmers Master/Slave?
« Reply #7 on: June 21, 2012, 08:36:31 am »
Wouldn't you need to watch LoadLevelStatus to pick up changes made locally on the device? (Potentially only after polling, as mentioned.)
Dezwaved at the moment...

Offline amocored

  • Newbie
  • *
  • Posts: 19
  • Karma: +0/-1
Re: Making 2 seperate Dimmers Master/Slave?
« Reply #8 on: June 27, 2012, 02:56:06 pm »
Ok... tried the code.  can you be more in  depth on exactly where to put it?  It goes in there exactly as written but with my device numbers?  I tried some blinking code, but only made it work once and i don't know how I did it.  ahahahahahaaaa

Offline amocored

  • Newbie
  • *
  • Posts: 19
  • Karma: +0/-1
Re: Making 2 seperate Dimmers Master/Slave?
« Reply #9 on: June 28, 2012, 06:17:59 pm »
Ok... I am trying this but with no success.  Could you please elaberate a little more on what I need to do?  I have entered this into the scene luup.  I have added the right addresses in the Master/ Slave and I get "code error".