MLLighting with UPB

Discussions about Mainlobby running on Apple mobile devices.
User avatar
Senior Member
Senior Member
Posts: 208
Joined: Sat Mar 10, 2007 12:46 pm
Location: North Bay, Ontario, Canada

MLLighting with UPB

Postby maik » Wed Mar 09, 2011 3:41 pm

How do I use the Lighting on the IPhone with my UPB MLLighting Plug in?


Senior Member
Senior Member
Posts: 220
Joined: Mon Jan 14, 2008 10:31 am
Location: Huntsville, AL.

Re: MLLighting with UPB

Postby Clever1 » Tue Mar 15, 2011 9:18 am


This is a pretty open question. The good thing about using the MLLighting plugin is that whether you are using X10, UPB, INSTEON all of the commands to the plugin are the same you will need to make sure that your device ids marry up with the MLLighting command in your iPhone Lighting Page.

By far the easiest way to import your UPB devices into MLLighting is to import a configuration file exported from UPStart. This will allow you to maintain the device IDs that you are currently using.

I am including portions of a Lighting-Room1.html file where the MLLighting comannds are used. In order for this code to work you need a device in MLLighting with a device id of 002 and a UPB controller configured and operational.

$('slider1handle').addEventListener('touchend', function(event) {
var sVal = Math.floor(Sliders[0].curX / Sliders[0].maxX * 100);
$('ml__mllighting_002_value').innerHTML = sVal;
}, false);

<span style="z-index:3;position:absolute;top:0px;left:20px;width:285px;height:34px;text-align:center;font:normal 22px/34px Helvetica;color:rgba(255, 255, 255, 1.0);padding:0px;border:0px;margin:0px;overflow:hidden;text-overflow:clip;">Karen's Lamp</span>
<div class="sliderbase" style="z-index:2;position:absolute;top:30px;left:15px;">
<img id="slider1" src="images/Slider1.png" style="z-index:3;position:inherit;top:16px;left:58px;-webkit-transform:scale(1.45);" />
<img id="slider1handle" src="images/SliderHandle1.png" style="z-index:4;position:inherit;top:16px;left:7px;-webkit-transition: -webkit-transform 0.25s ease" />
<span id="ml__mllighting_002_value" _MLSlider="1" _MLSliderIndex="1" style="visibility:hidden;">{{mllighting_002_value}}</span>
<span onclick="doCommand('Macro|SetVariableFast|mllighting_002_value~0!MLLighting|On~002~0');" class="basebutton" style="z-index:2;position:absolute;top:115px;left:45px;">&nbsp;&nbsp;Off&nbsp;&nbsp;</span>
<span onclick="doCommand('Macro|SetVariableFast|mllighting_002_value~0!MLLighting|On~002~100');" class="basebutton" style="z-index:2;position:absolute;top:115px;left:220px;">&nbsp;&nbsp;On&nbsp;&nbsp;</span>

Return to “MainLobby on iPhone, iPod Touch”

Who is online

Users browsing this forum: No registered users and 1 guest