PDA

View Full Version : custom device help needed please



yonu
June 18th, 2013, 02:31 PM
ok I have managed to create a device in the lighting lua to produce what I needed in however I need on thing different and i cant seem to get it to work the button is currently labed button I need it to show a status such as open or closed however I can see it get it to do it everytime I replace the Name = 'Button', with a variable I get a lua error I am hoping there is something I am missing here is the full code


--[[

push Device Class


--]]


local Push = Switch:New ( {

Type = 'Switch\\Push',

AddControls = function (self)

local control = DeviceManager.Controls.Classes.PushButton: New ( {ID = 'Switch',Name = 'Button',Device = self, Command = self.Command} )

-- self:AddControl (control)
self:AddControl (control)
control:UpdateValue("Idle")

end,

} )

Thanks,
Yonu

yonu
June 19th, 2013, 02:57 PM
Hey question I was looking at the composite.lua in the devicemanager folder but is there an example on how to use it I Was thinking it may do what I need.

Thank
yonu

yonu
June 19th, 2013, 02:57 PM
Sorry doublebpost
yonu