Slider Widget

12 replies [Last post]
AndrewJ
Offline
United Kingdom
Joined: 22 Nov 2012

Hi Brett

 

Im trying to implement a slider for dimmer control using Garrys Dimmable endpoint lua -http://homeautomationhub.com/content/he107-switch#comment-2936

I've created a slider listener event as below, can i specify the xapSource this way? - Im not seeing any BSC levels in XFX Viewer

-- Slider listener
local function sliderListener( event )
    local slider = event.target
    local value = event.value
    xapSource="dbzoo.livebox.Plugboard:LoungeLights." .. value
    print( "Slider at " .. value .. "%" )
end

local slider = widget.newSlider
{
    top = 200,
    left = 50,
     width = 200,
    listener = sliderListener

}

 

brett
Offline
Providence, United States
Joined: 9 Jan 2010
Now I'm almost set back up

Now I'm almost set back up again let me have a poke about with sliders with both Corona and on the Joggler and see how they work.   I'll amend the wiki and post here with my findings.

Brett

AndrewJ
Offline
United Kingdom
Joined: 22 Nov 2012
Thanks Brett,I've also tried

Thanks Brett,

I've also tried bsc.sendLevel("dbzoo.livebox.Plugboard:LoungeLights", value)

Andrew

brett
Offline
Providence, United States
Joined: 9 Jan 2010
I've added a corona demo of

I've added a corona demo of how to control a xAPBSC endpoint that is of the LEVEL type using a Slider.

http://livebox-hah.googlecode.com/svn/trunk/userapps/HAHCorona/

Don't forget to copy the hahlib folder into silderControl so the demo will run.

Brett

brett
Offline
Providence, United States
Joined: 9 Jan 2010
Andrew I take it you got this

Andrew I take it you got this Corona slider demo to work for you?  I never got any feedback on this code.

AndrewJ
Offline
United Kingdom
Joined: 22 Nov 2012
Brett, Yes sorry for the late

Brett,

 

Yes sorry for the late reply, i am indeed, thanks to Mark Baldwin too we have some pretty nifty lua working well now (4 sliders controlling 4 dimmable sockets HE108C)

im sure Mark will be happy to share his mods here when all the bugs are ironed out

thanks for taking time to code the demo

thanks

 

Andrew