Legrand adorne lighting control plug-in


Legrand has a collection of lighting control devices (which includes RF devices) in a line they call adorne. Up to this point, I’ve been using legrand’s own scene controller which while it’s easy to set-up, is pretty limited in terms of flexibility and of course does not directly integrate with any other home automation.

Within the past couple weeks I purchased Vera Lite (UI7) for the purpose of controlling a couple Kwikset locks. I thought that would be the end of it…then I learned of the rather “open” nature of Vera and in short order had my OnQ garage doors and Sonos system integrated with Vera. It’s only natural to want my lighting integrated as well.

Of course, the RF technology Legrand uses (“Top-Dog”) is not a compatible protocol with Vera. However, Legrand does offer a “serial-to-top-dog RF” controller (Model MR-232G) that should be well suited to do the job of interfacing between Vera and my lighting devices.

I’m a “self-taught” coder, very proficient in VBA…at least it’s more or less object oriented and event driven. However, I have no experience with luup, uPnP, java script…basically no unix, XML. But I’ve decided to try my hand at building the plug-in for Vera.

So I’m going to use this thread to document my trials, take suggestions, etc. At the end of it, I hope to have a plug-in / app that others can use that would do the following at a minimum.

  1. Installs the parent control (the serial-to-rf controller)
  2. Search for all Legrand lighting groups and automatically create a Vera dimmable light device to control it. (With legrand devices and control, you technically don’t control individual devices, you control device “groups” of one or more devices paired with one another.)
  3. Expose all relative actions (on/off, dimming / ramp rate, etc.)
  4. Use Vera’s already built d_DimmableLight1.json for the UI7 interface.

After that potentially include any of the following

  1. Polling for group status so that the user interface control properly reflects the state of the lighting group / responds to events. (On/Off - dimming level).
  2. Provide an interface to be able to programmatically bind controls together to form groups, rooms, etc. (Currently this is only done with the controls themselves.)
  3. Differentiate between groups that can dim and ones that are strictly on/off, and bind it to the appropriate Vera device (dimmable light vs. switch power)

Good luck to me! ;D

Good luck on the project!!

I started my “journey” trying to get acquainted with the file structure, the tools I’ll need, etc. This link proved to be very helpful to get me started.

I’m developing on a Win7 PC, so I downloaded / installed the following tools:

[ul][li]Notepad ++ (plus JSON and XML plug-ins for structured viewing / editing)[/li]
[li]Putty (for SSH into Vera)[/li]
[li]HyperTerminal – extracted from a WinXP installation disk (for Direct communication with the Serial-RF device)[/li]
[li]Serial to RF Protocol Guide – for the commands to send / receive to the Legrand control unit.[/li][/ul]

So far, I’ve just gone through the paces of getting acquainted with the process I’ll be needed to edit, post, test, debug. So I’ve successfully logged into Vera as root, witnessed the log file being generated, examined some xml and json files. I don’t have the controller hardware or USBtoSerial cable yet (they arrive early next week), so I obviously can’t do any testing yet, but I’m starting to form a plan for my process.

I’m thinking my implementation will end up utilizing the following:

  1. D_LegrandRF1.xml – I will create this for the Device Description for the RF controller.
  2. I_LegrandRF1.xml – I will create this for the Device Implementation for the RF Controller. This will be a parent device for the “Dimmable Light” children.
  3. D_DimmableLight1.xml – This is the standard Dimmable Light device definition included with Vera.
  4. D_DimmableLight1.json – The is the standard Dimmable Light json included with Vera

The DimmableLight device utilizes several services, standard with Vera:
5) S_SwitchPower1.xml
6) S_Dimming1.xml
7) S_EnergyMetering1.xml
8) S_HaDevice1.xml

The following services:actions should be sufficient to control any lighting group:


Believe it or not, the “SetTarget” action, which is essentially “turn on / turn off” the device group, will be the more complicated. I will have to first poll the status of the group and get the result before applying the appropriate command.

If anyone can see any red flags with my approach, feel free to suggest alternatives!

I’m going to “move” this discussion to the Programming / Plug-in forum as I beleive it’s more appropriate there.