Push all files

parent ba095c98
K 25
svn:wc:ra_dav:version-url
V 55
/microchip/!svn/ver/636/trunk/Unixmedia/Web/CommonPages
END
reboot.htm
K 25
svn:wc:ra_dav:version-url
V 66
/microchip/!svn/ver/341/trunk/Unixmedia/Web/CommonPages/reboot.htm
END
ajax.xml
K 25
svn:wc:ra_dav:version-url
V 64
/microchip/!svn/ver/990/trunk/Unixmedia/Web/CommonPages/ajax.xml
END
ioconf.htm
K 25
svn:wc:ra_dav:version-url
V 66
/microchip/!svn/ver/627/trunk/Unixmedia/Web/CommonPages/ioconf.htm
END
users.htm
K 25
svn:wc:ra_dav:version-url
V 65
/microchip/!svn/ver/344/trunk/Unixmedia/Web/CommonPages/users.htm
END
reset.htm
K 25
svn:wc:ra_dav:version-url
V 65
/microchip/!svn/ver/341/trunk/Unixmedia/Web/CommonPages/reset.htm
END
iostat.htm
K 25
svn:wc:ra_dav:version-url
V 66
/microchip/!svn/ver/344/trunk/Unixmedia/Web/CommonPages/iostat.htm
END
upload.htm
K 25
svn:wc:ra_dav:version-url
V 66
/microchip/!svn/ver/341/trunk/Unixmedia/Web/CommonPages/upload.htm
END
devconf.bin
K 25
svn:wc:ra_dav:version-url
V 67
/microchip/!svn/ver/136/trunk/Unixmedia/Web/CommonPages/devconf.bin
END
config.htm
K 25
svn:wc:ra_dav:version-url
V 66
/microchip/!svn/ver/623/trunk/Unixmedia/Web/CommonPages/config.htm
END
config.bin
K 25
svn:wc:ra_dav:version-url
V 66
/microchip/!svn/ver/135/trunk/Unixmedia/Web/CommonPages/config.bin
END
ioconf.xml
K 25
svn:wc:ra_dav:version-url
V 66
/microchip/!svn/ver/343/trunk/Unixmedia/Web/CommonPages/ioconf.xml
END
netcfg.htm
K 25
svn:wc:ra_dav:version-url
V 66
/microchip/!svn/ver/990/trunk/Unixmedia/Web/CommonPages/netcfg.htm
END
domotika.css
K 25
svn:wc:ra_dav:version-url
V 68
/microchip/!svn/ver/623/trunk/Unixmedia/Web/CommonPages/domotika.css
END
10
dir
793
https://svn.unixmedia.net/microchip/trunk/Unixmedia/Web/CommonPages
https://svn.unixmedia.net/microchip
2012-12-11T14:23:00.559274Z
636
nextime
9872420c-b032-40af-96d2-e8d557942bcc
reboot.htm
file
2012-04-30T08:37:04.000000Z
b1ef82a4d401f4f9ccc4276c8658cd81
2012-05-01T01:11:26.259405Z
341
nextime
has-props
435
ajax.xml
file
990
2013-07-23T11:51:53.000000Z
6938624532bfb3464ef0b0a44ce95f2c
2013-08-13T00:59:55.756042Z
990
nextime
1849
users.htm
file
2012-05-10T11:30:30.000000Z
0cbea6135cb78b6340adbc1f23b2653a
2012-05-18T10:04:42.242751Z
344
nextime
813
iostat.htm
file
2012-05-04T14:37:41.000000Z
2c2727e70b605c3cf6e58fd594eea6f1
2012-05-18T10:04:42.242751Z
344
nextime
has-props
1658
devconf.bin
file
2011-11-29T13:10:37.000000Z
ee25b52d1479460319021a7a53387eed
2011-12-03T21:40:12.317602Z
136
nextime
has-props
14
config.htm
file
2012-11-07T11:38:25.000000Z
5f42ccf1a2d1d90adcbac8f1ea3545e7
2012-11-07T20:31:55.790650Z
623
nextime
has-props
4066
netcfg.htm
file
990
2013-07-23T11:51:30.000000Z
2ab9af33a05cc135bcfbf59c088e850d
2013-08-13T00:59:55.756042Z
990
nextime
has-props
2183
domotika.css
file
2012-11-06T17:08:24.000000Z
8df53d67109224bb7686b34dfa32f931
2012-11-07T20:31:55.790650Z
623
nextime
has-props
8541
favicon.ico
file
2011-09-18T23:05:30.000000Z
00af8abebb97e3327cc6ace4637b9c48
2011-09-18T23:07:38.823909Z
32
nextime
has-props
198
cgi
dir
ioconf.htm
file
2013-06-04T13:58:23.000000Z
580e30e2df7983ac1af7bd1389be4140
2012-11-12T10:46:51.706595Z
627
nextime
has-props
13041
reset.htm
file
2012-04-30T08:37:12.000000Z
099108a01a9cca105657b2b4c4ada7ba
2012-05-01T01:11:26.259405Z
341
nextime
345
upload.htm
file
2012-04-30T08:37:19.000000Z
924bdebbdf5dcec87145b0326a47bc6c
2012-05-01T01:11:26.259405Z
341
nextime
has-props
832
img
dir
js
dir
config.bin
file
2011-11-29T13:10:07.000000Z
b6e04e658a5239bacb1a63fdad0fd8ac
2011-12-03T21:37:32.419087Z
135
nextime
has-props
14
ioconf.xml
file
2012-05-01T23:11:26.000000Z
4018036d37bba215461ddda99fb2b022
2012-05-03T12:08:36.446638Z
343
nextime
1769
K 14
svn:executable
V 1
*
K 13
svn:mime-type
V 24
application/octet-stream
END
<r>
<stfail>~stfail~</stfail>
<stok>~stok~</stok>
<bst>~stan(2)~</bst>
<stan>~stan(1)~</stan>
<need_reboot>~need_reboot~</need_reboot>
<adczero>~adczero~</adczero>
<adcmoltiplier>~adcmoltiplier~</adcmoltiplier>
<adccompensation>~adccompensation~</adccompensation>
<cfg_ntpe>~cfg_ntpe~</cfg_ntpe>
<cfg_slave>~cfg_slave~</cfg_slave>
<cfg_adcalchecked>~cfg_adcalchecked~</cfg_adcalchecked>
<cfg_adcadchecked>~cfg_adcadchecked~</cfg_adcadchecked>
<cfg_mac>~cfg_mac~</cfg_mac>
<cfg_hostname>~cfg_hostname~</cfg_hostname>
<cfg_dhcpchecked>~cfg_dhcpchecked~</cfg_dhcpchecked>
<cfg_ip>~cfg_ip~</cfg_ip>
<cfg_gw>~cfg_gw~</cfg_gw>
<cfg_subnet>~cfg_subnet~</cfg_subnet>
<cfg_dns1>~cfg_dns1~</cfg_dns1>
<cfg_dns2>~cfg_dns2~</cfg_dns2>
<cfg_tchkp>~cfg_tchkp~</cfg_tchkp>
<cfg_sntp>~cfg_sntp~</cfg_sntp>
<wport>~wp~</wport>
<tz>~tz~</tz>
<dst>~dst~</dst>
<dsts>~dsts~</dsts>
<dstr>~dstr~</dstr>
<upConf>~uplConf~</upConf>
<board>~board~</board>
<fwname>~fwname~</fwname>
<fwver>~fwver~</fwver>
<defmac>~defmac~</defmac>
<stv>~sver~</stv>
<bd>~bd~</bd>
<dt>~dt~</dt>
<nb>~nb~</nb>
<ap>~ap~</ap>
<np>~np~</np>
<epoch>~epoch~</epoch>
<r1>~rel(1)~</r1>
<r2>~rel(2)~</r2>
<r3>~rel(3)~</r3>
<r4>~rel(4)~</r4>
<r5>~rel(5)~</r5>
<r6>~rel(6)~</r6>
<r7>~rel(7)~</r7>
<r8>~rel(8)~</r8>
<r9>~rel(9)~</r9>
<r10>~rel(10)~</r10>
<r11>~rel(11)~</r11>
<r12>~rel(12)~</r12>
<i1>~inp(1)~</i1>
<i2>~inp(2)~</i2>
<i3>~inp(3)~</i3>
<i4>~inp(4)~</i4>
<i5>~inp(5)~</i5>
<i6>~inp(6)~</i6>
<i7>~inp(7)~</i7>
<i8>~inp(8)~</i8>
<i9>~inp(9)~</i9>
<i10>~inp(10)~</i10>
<i11>~inp(11)~</i11>
<i12>~inp(12)~</i12>
<p1>~pot(1)~</p1>
<p2>~pot(2)~</p2>
<p3>~pot(3)~</p3>
<p4>~pot(4)~</p4>
<p5>~pot(5)~</p5>
<p6>~pot(6)~</p6>
<p7>~pot(7)~</p7>
<p8>~pot(8)~</p8>
<p9>~pot(9)~</p9>
<p10>~pot(10)~</p10>
<p11>~pot(11)~</p11>
<p12>~pot(12)~</p12>
<a1>~an(1)~</a1>
<a2>~an(2)~</a2>
<b1>~btn(1)~</b1>
</r>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script src=/js/d.js></script>
<script>hdr();</script>
<div id=content>
<h1>General Config</h1>
<form name=cff>
<h2>Generic Configurations</h2>
<fieldset>
<!-- <div><label>Debug:</label><input type=checkbox class=sm name=debug value=1 disabled /></div> -->
<div><label>TimeCheck:</label><input type=checkbox class=sm name=tchkp value=1 disabled /></div>
<div><label>Serial Device:</label><select name=slave class=sm disabled >
<option value=0 selected>Disabled</option>
<option value=1>Serial RTC</option>
<option value=2>KeeLoq RF</option>
</select></div>
<div id=cs1><input type=checkbox class=sm name=adcal value=1 disabled />Enable ADC Auto Calibration</div>
<div id=cs2><input type=checkbox class=sm name=adcad value=1 disabled onclick="cBox()" />Enable Current Sensors auto-deviation</div>
<div id=cs3><label>ADC Zero Deviation:</label><input type=text class=num name=adczd disabled>-99 to 99</div>
<div id=cs4><label>ADC Compensation:</label><input type=text class=num name=adcco disabled>0 to 99</div>
<div id=cs5><label>ADC Moltiplier:</label><input type=text class=num name=adcmp disabled>99 to 299</div>
<div id=cs7><label>NET Buf Size:</label><input type=text class=num name=netbu disabled>1 to 99</div>
<div id=cs8><label>Act Port:</label><input type=text class=num name=aport disabled>1 to 65535</div>
<div id=cs9><label>Notify Port:</label><input type=text class=num name=nport disabled>1 to 65535</div>
<div id=tzc><label>GMT tz:</label><input type=text class=num name=tzcfg disabled>-23 to 23</div>
<div id=dst><input type=checkbox class=sm name=tzdst value=1 disabled />use DST</div>
<div id=dss><label>DST shift:</label><input type=text class=num name=dstsh disabled>-23 to 23</div>
<div id=dsr><label>DST rule:</label><input type=text class=num name=dstru disabled></div>
<div id=btn></div>
<div><span class="domoB pressB grayO grayB" OnClick="sForm('cff','/config.htm',null)">Save</span></div>
</fieldset>
</form>
</div>
<script>
function cBox() {
e = $d.forms.cff;
if(e.adcad.checked)
{
e.adczd.disabled=true;
e.adcco.disabled=false;
} else {
e.adczd.disabled=false;
e.adcco.disabled=true;
}
}
function aLoopCB(xDt) {
e = $d.forms.cff;
if(e.adcad.checked)
{
e.adczd.value=getX(xDt, 'adczero');
} else {
e.adcco.value=getX(xDt, 'adccompensation');
}
}
function aFirstCB(xDt) {
if(xDt)
{
e = $d.forms.cff;
if(getX(xDt,'cfg_adcalchecked')=='checked')
{
e.adcal.checked=true;
}
e.tchkp.disabled=false;
e.adczd.disabled=false;
e.adcal.disabled=false;
e.adcad.disabled=false;
e.netbu.disabled=false;
e.slave.disabled=false;
e.adcmp.disabled=false;
/*e.debug.disabled=false;*/
e.aport.disabled=false;
e.nport.disabled=false;
e.tzdst.disabled=false;
e.tzcfg.disabled=false;
e.dstsh.disabled=false;
e.dstru.disabled=false;
e.adcmp.value=getX(xDt,'adcmoltiplier');
if(getX(xDt,'cfg_adcadchecked')=='checked')
{
e.adcad.checked=true;
} else {
e.adcad.checked=false;
}
/*
if(getX(xDt,'cfg_debug')=='checked')
{
e.debug.checked=true;
} else {
e.debug.checked=false;
}*/
if(getX(xDt,'cfg_tchkp')=='checked')
{
e.tchkp.checked=true;
} else {
e.tchkp.checked=false;
}
if(getX(xDt,'dst')=='checked')
{
e.tzdst.checked=true;
} else {
e.tzdst.checked=false;
}
e.slave.options[parseInt(getX(xDt,'cfg_slave'))].selected=true;
cBox();
e.netbu.value=getX(xDt,'nb');
e.adczd.value=getX(xDt,'adczero');
e.adcco.value=getX(xDt,'adccompensation');
e.aport.value=getX(xDt,'ap');
e.nport.value=getX(xDt,'np');
e.tzcfg.value=getX(xDt,'tz');
e.dstsh.value=getX(xDt,'dsts');
e.dstru.value=getX(xDt,'dstr');
}
}
ftr();
</script>
body {
font-family: Verdana, Arial, sans-serif;
background: #ffffff;
margin: 0px auto;
padding: 0 0 20px 0;
}
#page {
width: 760px;
border: 1px solid #006699;
background: #fff;
border-top: 0;
padding: 20px;
font-size: 10pt;
margin: 0px auto;
}
#page td {
font-size: 10pt;
}
#title {
background: #222;
padding: 4px;
font-weight: bold;
color: #fff;
margin-bottom: 15px;
height: 16px;
}
#title .right {
float: right;
width: 300px;
text-align: right;
}
#menu {
float: left;
width: 150px;
padding-right: 20px;
position:fixed;
}
#menu a {
width: 140px;
display: block;
background: #222;
color: white;
padding: 8px;
font-weight: bold;
border-bottom: 1px solid #fff;
text-decoration: none;
}
#menu a:hover {
background: #006699;
}
.tcon {
border:1px solid #669CCC;
padding-bottom:15px;
width:100%;
margin-bottom:3px;
}
.tabf {
padding-bottom:0px;
margin-top:2px;
margin-bottom:0px;
display:table;
}
.tabf div {
padding-bottom: 5px;
padding-right: 8px;
padding-left: 8px;
font-weight: bold;
margin-left: 5px;
padding-top: 5px;
color: #000;
float: left;
}
.tabon, .taboff, .expand {
border-bottom-color: #669CCC;
border-right-color: #669CCC;
background-position: bottom;
border-left-color: #669CCC;
border-bottom-style: solid;
background-color: #EFEFEF;
border-right-style: solid;
border-top-color: #669CCC;
border-left-style: solid;
border-bottom-width: 0px;
border-right-width: 1px;
border-top-style: solid;
border-left-width: 1px;
border-top-width: 1px;
padding: 1px 1px 1px 1px;
cursor: pointer;
}
.tabon {
background-color: #BBB;
}
#content {
width: 550px;
min-height:330px;
float: right;
padding-right: 10px;
}
#content a {
color: #c00;
text-decoration: none;
}
#content a:hover {
color: #d33;
text-decoration: underline;
}
#content h1 {
margin-top: 0px;
}
.spacer {
clear: both;
}
#footer {
font-size: 0.8em;
color: #666;
text-align: center;
margin: 10px 50px 0 50px;
padding-top: 10px;
border-top: 1px dotted #666;
}
#status {
padding: 10px;
margin: 10px;
border: 1px dotted #666;
font-weight: bold;
}
#status p {
padding: 5px 0 5px 10px;
text-indent: -10px;
margin: 0;
}
#status .relays {
font-size: 14pt;
}
#status .relays a {
color: #ddd;
cursor: pointer;
}
#status .relays a:hover {
color: #ddd;
text-decoration: none;
}
#status .rele a {
background-color: #99FFFF;
cursor: pointer;
text-decoration: none;
border: 1px solid #000;
color: #000;
}
#status .rele a:hover {
background-color: #0066CC;
text-decoration: none;
border: 1px double #000;
color: #000;
}
.configbox {
margin:10px 40px 10px 40px;
padding: 8px;
border: 1px dotted #333;
text-align:center;
background:#ddd;
}
.code {
font-family: Courier New, Courier, fixed-width, fixed;
}
.exercise {
background: #fe9;
padding: 5px;
margin-left: 10px;
border-left: 2px solid #eb3;
}
.error {
margin-left: 10px;
padding: 10px;
background: #fdd;
border-left: 2px solid #900;
}
#content h6 {
border-top: 1px dashed #333;
margin: 15px;
padding: 0px;
height: 1px;
}
form fieldset {
margin:10px 40px 10px 40px;
padding: 8px;
border: 1px dotted #333;
background:#ddd;
}
form fieldset div {
padding: 2px 0px 2px 150px;
}
fieldset div label {
margin-left: -150px;
padding-top: 2px;
width: 145px;
font-weight: bold;
position: absolute;
}
fieldset input {
width: 250px;
}
fieldset input.num {
width: 125px;
}
fieldset input.sm {
width: auto;
}
fieldset textarea {
width: 250px;
}
.ress
{
padding: 12px;
border: 2px solid #3366ff;
text-align: center;
font-weight: bold;
background: #cceeff;
top:10px;
width: 128px;
}
.ok {
border-color: #6b6;
background: #efe;
}
.fail {
border-color: #b66;
background: #fee;
}
.unk {
border-color: #cc6;
background: #ffd;
}
.domoB {
-moz-border-radius:10px;
-webkit-border-radius:10px;
border-radius:10px;
display:inline-block;
font-family:arial;
font-size:15px;
font-weight:bold;
padding:7px 23px;
margin: 2px;
text-decoration:none;
}
.pressB:active {
position:relative;
top:3px;
left:1px;
}
.deactiveB {
background-color:#d9d5d9;
-moz-border-radius:10px;
-webkit-border-radius:10px;
border-radius:10px;
display:inline-block;
color:#adadad;
font-family:arial;
font-size:15px;
font-weight:bold;
padding:7px 23px;
text-decoration:none;
margin: 2px;
}
.greenB {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ced9d7), color-stop(1, #22ba1a) );
background:-moz-linear-gradient( center top, #ced9d7 5%, #22ba1a 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ced9d7', endColorstr='#22ba1a');
background-color:#ced9d7;
border:2px solid #a89ea8;
color:#232d57;
}
.greenO:hover {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #22ba1a), color-stop(1, #ced9d7) );
background:-moz-linear-gradient( center top, #22ba1a 5%, #ced9d7 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#22ba1a', endColorstr='#ced9d7');
background-color:#22ba1a;
}
.redB {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #d1c6c6), color-stop(1, #ff1414) );
background:-moz-linear-gradient( center top, #d1c6c6 5%, #ff1414 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#d1c6c6', endColorstr='#ff1414');
background-color:#d1c6c6;
border:2px solid #a89ea8;
color:#3b1537;
}
.redO:hover {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ff1414), color-stop(1, #d1c6c6) );
background:-moz-linear-gradient( center top, #ff1414 5%, #d1c6c6 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff1414', endColorstr='#d1c6c6');
background-color:#ff1414;
}
.grayB {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ededed), color-stop(1, #dfdfdf) );
background:-moz-linear-gradient( center top, #ededed 5%, #dfdfdf 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed', endColorstr='#dfdfdf');
background-color:#ededed;
border:2px solid #a89ea8;
color:#2e54b3;
}
.grayO:hover {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #dfdfdf), color-stop(1, #ededed) );
background:-moz-linear-gradient( center top, #dfdfdf 5%, #ededed 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#dfdfdf', endColorstr='#ededed');
background-color:#dfdfdf;
}
.blueB {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #c3d1e3), color-stop(1, #3058db) );
background:-moz-linear-gradient( center top, #c3d1e3 5%, #3058db 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#c3d1e3', endColorstr='#3058db');
background-color:#c3d1e3;
border:2px solid #c4bec4;
color:#030408;
}
.blueO:hover {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #3058db), color-stop(1, #c3d1e3) );
background:-moz-linear-gradient( center top, #3058db 5%, #c3d1e3 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#3058db', endColorstr='#c3d1e3');
background-color:#3058db;
}
.yellowB {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #dfe3c3), color-stop(1, #c8d600) );
background:-moz-linear-gradient( center top, #dfe3c3 5%, #c8d600 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#dfe3c3', endColorstr='#c8d600');
background-color:#dfe3c3;
border:2px solid #c4bec4;
color:#20399e;
}
.yellowO:hover {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #c8d600), color-stop(1, #dfe3c3) );
background:-moz-linear-gradient( center top, #c8d600 5%, #dfe3c3 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#c8d600', endColorstr='#dfe3c3');
background-color:#c8d600;
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script src=/js/d.js></script>
<script>hdr();</script>
<div id=content >
<h1>I/O Config</h1>
<hr><h2>${{Digital Inputs}}$</h2>
<div id=c1init>${{LOADING}}$...</div>
<div class=configbox id=cbox1 style="display:none"></div>
<hr><h2>${{Analog Inputs}}$</h2>
<div id=c3init>${{LOADING}}$...</div>
<div class=configbox id=cbox3 style="display:none">
</div>
<hr><h2>${{Outputs}}$</h2>
<div id=c2init>${{LOADING}}$...</div>
<div class=configbox id=cbox2 style="display:none">
</div>
</div>
<script>
var ho="";
var hi="";
function chRelOpt(iz)
{
os=$('otype_'+iz);
osel=os.selectedIndex;
oselv=parseInt(os[osel].value);
nrel=0;
seq="none";
ctxdiv='block';
if(oselv>0)
nrel=1;
if(oselv>=0xf0)
nrel=2;
if(oselv==0xff)
{
nrel=255;
seq="block";
nrel=0;
ctxdiv='none';
}
if(oselv==244)
$('og'+iz).style.display="block";
else
$('og'+iz).style.display="none";
$('ctxd'+iz).style.display=ctxdiv;
for(nr=1;nr<=2;nr++)
{
nrz=zfill(nr,2);
rdiv="none";
if(nr<=nrel){rdiv='block';}
$('rdiv_'+iz+'_'+nrz).style.display=rdiv;
}
$('seq'+iz).style.display=seq;
}
function addROpt()
{
for(i=1;i<=12;i++)
{
ho=" ";
var iz=zfill(i,2);
ho+='<div id=ctxd'+iz+' style="display:none"><b> Ctx: <select name=o_01_'+iz+'_00_00></b>';
for(k in DmCtx)
{
ho+='<option value="'+DmCtx[k]+'">'+k+'</option>';
}
ho+='</select><br /><br />';
// Output per cancelli
ho+='<div id=og'+iz+' style="display:none"><b>${{startt}}$: </b><input type=text size=3 name=o_12_'+iz+'_00_00 value=0><b>${{opent}}$: </b><input type=text size=3 name=o_13_'+iz+'_00_00 value=0><b>${{pauset}}$: </b><input type=text size=3 name=o_14_'+iz+'_00_00 value=0><br/><b>${{Banging}}$:</b><select name=o_15_'+iz+'_00_00><option value=0>${{No}}$</option><option value=1>${{Yes}}$</option></select></div>';
// Fine output per cancelli
ho+='<br/></div>';
for(nr=1;nr<=2;nr++)
{
var nrz=zfill(nr,2);
ho+='<div id=rdiv_'+iz+'_'+nrz+' style="display:none"><hr><b> R'+nr+': </b><select name=o_05_'+iz+'_'+nrz+'_00><option value="0">${{None}}$</option>';
for(rn=1;rn<=12;rn++)
{
ho+='<option value='+rn+'>${{Relay}}$ '+rn+'</option>';
}
ho+='</select>'+
'<select name=o_07_'+iz+'_'+nrz+'_00><option value=0>NA (${{Open}}$)</option><option value=1>NC (${{Close}}$)</option><option value=2>${{Save}}$</option></select><br/>'+
'<b>${{runtime}}$: </b><input type=text size=3 name=o_09_'+iz+'_'+nrz+'_00 value=0>'+
'<b> ${{Retard}}$: <b><input type=text size=3 name=o_08_'+iz+'_'+nrz+'_00 value=0>'+
'<br/><b>${{break delay}}$: <b><input type=text size=3 name=o_06_'+iz+'_'+nrz+'_00 value=0>'+
'<b>${{rearm}}$: <b><input type=text size=3 name=o_11_'+iz+'_'+nrz+'_00 value=0>'+
'<b> ${{A Max}}$: <b><input type=text size=3 name=o_03_'+iz+'_'+nrz+'_00 value=160>'+
'<br/></div>';
}
ho+='<div id=seq'+iz+' style="display:none">${{SEQUENCE}}$</div>';
$("ropt_"+i).innerHTML=ho;
}
}
function chInOpt(iz,tz,sel,i)
{
osel=sel.selectedIndex;
oselv=parseInt(sel[osel].value);
maxact=0;
if(oselv)
{
if(oselv<160) // 0xa0
maxact=1;
else if(oselv<208) // 0xd0
maxact=2;
else
maxact=3;
}
if(i>12)
maxact=3;
for(a=1;a<=3;a++) {
actvis="none";
if(a<=maxact) {actvis="block";}
$('adiv'+iz+tz+'_'+a).style.display=actvis;
}
}
function addInputOpts(iz,tz,i,pulse)
{
var hi="";
for(a=1;a<=3;a++) {
hi+='<div id=adiv'+iz+tz+'_'+a+' style="display:none">';
if(a>1) { hi+='<br /><hr><br/>'; }
hi+='<b>${{action}}$ '+a+': </b><input type=text size=25 name=i_02_'+iz+'_'+tz+'_0'+a+' value="${{wait}}$..."><br/>';
hi+='<b> ${{msg}}$:</b><select name=i_07_'+iz+'_'+tz+'_0'+a+'>';
for(k in DmMsgType)
{
hi+='<option value="'+DmMsgType[k]+'">'+k+'</option>';
}
hi+='</select>';
hi+='<b> ${{ctx}}$:</b><select name=i_03_'+iz+'_'+tz+'_0'+a+'>';
for(k in DmCtx)
{
hi+='<option value="'+DmCtx[k]+'">'+k+'</option>';
}
hi+='</select><br/>';
hi+='<b> ${{act}}$:</b><select name=i_01_'+iz+'_'+tz+'_0'+a+'>';
for(k in DmAct)
{
hi+='<option value="'+DmAct[k]+'">'+k+'</option>';
}
hi+='</select>';
tval="${{Time}}$";
if(pulse)
{
tval="${{Time/Count}}$";
}
else if(i>12)
{
if(a==2)
tval="${{Low}}$";
if(a>2)
tval="${{Hi}}$";
}
hi+='<b> '+tval+': </b><input type=text size=3 name=i_10_'+iz+'_'+tz+'_0'+a+' value=0>';
hi+='<br/><b> ${{Opt}}$:</b><select name=i_14_'+iz+'_'+tz+'_0'+a+'>';
for(k in DmOpt)
{
hi+='<option value="'+DmOpt[k]+'">'+k+'</option>';
}
hi+='</select>';
hi+='<input type=text size=15 name=i_15_'+iz+'_'+tz+'_0'+a+' value="">';
hi+='<br/><b> ${{Dst}}$: </b><input type=text size=15 name=i_04_'+iz+'_'+tz+'_0'+a+' value="0.0.0.0">';
hi+='</div>';
}
return hi;
}
function addInp(i,seld,name)
{
pulse=0;
InpT=new Object();
for(k in seld){InpT[k]=seld[k];}
if($w.DmBoard=='DMRv1')
{
if(i<9 && i>4)
{
for(k in DmISR1){InpT[k]=DmISR1[k];}
pulse=1;
}
} else { // DMRv3
if(i<5)
{
for(k in DmISR1){InpT[k]=DmISR1[k];}
pulse=1;
}
}
var iz=zfill(i,2);
hi+='<form name=diginp_'+iz+'>'+
'<b>'+name+' ${{name}}$:</b><input type=text size=20 name=i_08_'+iz+'_00_00 value="${{wait}}$...">'+
'<span onClick="toggleMe(\'inp'+i+'\',this);" style="padding:1px 1px" class="domoB pressB grayO grayB">${{Expand}}$ &or;</span><br/>'+
'<div id=inp'+i+' style="background-color: #EFEFEF; display:none;">'+
'<div class="tabf" id=tabf-'+i+'>'+
'<div id=tab_1-'+i+' class="tabon" onclick="tabC.chTab(this,'+i+');">${{Status}}$ Default</div>'+
'<div id=tab_2-'+i+' class="taboff" onclick="tabC.chTab(this,'+i+');">${{Status}}$ 2</div>'+
'<div id=tab_3-'+i+' class="taboff" onclick="tabC.chTab(this,'+i+');">${{Status}}$ 3</div>'+
'<div id=tab_4-'+i+' class="taboff" onclick="tabC.chTab(this,'+i+');">${{Status}}$ 4</div>'+
"</div>";
for(t=1;t<=4;t++)
{
var tz=zfill(t,2);
hi+='<div id=tab_'+t+'-'+i+'_data class="tcon" style="background-color:#BBBBBB;display:';
if(t==1) {hi+='table;"><div>';} else {hi+='none;"><div>';}
hi+='<b>${{Status name}}$: </b><input type=text size=25 name=i_09_'+iz+'_'+tz+'_00 value="${{wait}}..."><br/>'+
'<b>${{Enabled}}$:</b><select name=i_05_'+iz+'_'+tz+'_00><option value=0>${{No}}$</option><option value=1>${{Yes}}$</option></select>'+
' <b> ${{type}}$: </b><select name=i_11_'+iz+'_'+tz+'_00 onChange="chInOpt(\''+iz+'\',\''+tz+'\',this,'+i+');">';
for(k in InpT)
{
hi+='<option value="'+InpT[k]+'">'+k+'</option>';
}
hi+='</select><br/>'+
'<b>${{Min time}}$: </b><input type=text size=3 name=i_06_'+iz+'_'+tz+'_00 value=0>';
if(i>12) {
hi+='<b>${{Min val}}$: </b><input type=text size=3 name=i_12_'+iz+'_'+tz+'_00 value=0>'+
'<b>${{Max val}}$: </b><input type=text size=3 name=i_13_'+iz+'_'+tz+'_00 value=0>';
}
hi+='<hr>'+
'<div id=iopt_'+iz+'_'+tz+'>';
hi+=addInputOpts(iz,tz,i,pulse);
hi+='</div></div></div>';
}
delete InpT;
var fna='diginp_'+iz;
hi+='<span class="domoB pressB grayO grayB" onclick="hOpt(\''+fna+'\');sForm(\''+fna+'\',\'/ioconf.xml\',null);sOpt(\''+fna+'\');">${{Save}}$</span></form></div>';
}
for(i=1;i<=12;i++)
{
var iz=zfill(i,2);
addInp(i,DmInputType,'${{Input}}$ '+i);
// FINE INPUT
ho+='<form name=relays_'+iz+'>'+
'<b>${{Device name}}$ '+i+':</b> <input type=text size=20 name=o_04_'+iz+'_00_00 value="${{wait}}$..."><span onClick="toggleMe(\'out'+i+'\',this);" style="padding:1px 1px" class="domoB pressB grayO grayB">${{Expand}}$ &or;</span><br />'+
'<div id=out'+i+' style="background-color:#BBBBBB;display:none;">'+
'<b>${{Enabled}}$:</b><select name=o_02_'+iz+'_00_00><option value=0>${{No}}$</option><option value=1>${{Yes}}$</option></select>'+
' <b>${{Output type}}$: </b><select id=otype_'+iz+' name=o_10_'+iz+'_00_00 onChange="chRelOpt(\''+iz+'\');">';
for(k in DmOutputType)
{
ho+='<option value="'+DmOutputType[k]+'">'+k+'</option>';
}
ho+='</select><br/>'+
'<div id=ropt_'+i+'></div>'+
// FINE DEVICE
'<span class="domoB pressB grayO grayB" onclick="sForm(\'relays_'+iz+'\',\'/ioconf.xml\',null);">${{Save}}$</span>'+
'</div></form>';
}
$("cbox1").innerHTML+=hi+"</div>";
$("cbox2").innerHTML+=ho+"</div>";
hi="";
for(i=1;i<3;i++)
{
addInp(i+12,DmAnType,'${{Analog}}$ '+i);
}
$("cbox3").innerHTML+=hi+"</div>";
for(i=1;i<15;i++)
{
tabC.addTabs("tabf-"+i,i);
}
addROpt();
function setC(el,val)
{
var nname=el.nodeName;
if(el.name!="save")
{
if(nname=='SELECT')
{
l=el.length;
while(l){
if(el[--l].value==parseInt(val)){
el.selectedIndex=l;
l=0;
}
}
} else {
el.value=val;
}
}
}
function ioCf(xDt)
{
if(xDt)
{
for(f=1;f<15;f++)
{
var iname=getX(xDt,'i'+f);
var fz=zfill(f,2);
ie=$d.forms['diginp_'+fz];
el=ie.elements;
el["i_08_"+fz+"_00_00"].value=iname;
for(t=1;t<=4;t++)
{
tz=zfill(t,2);
var ix=getX(xDt,'i'+f+'s'+t);
var ixv=ix.split(";");
setC(el["i_09_"+fz+"_"+tz+"_00"],ixv[0]);
setC(el["i_06_"+fz+"_"+tz+"_00"],ixv[1]);
setC(el["i_05_"+fz+"_"+tz+"_00"],ixv[2]);
setC(el["i_11_"+fz+"_"+tz+"_00"],ixv[3]);
co=4;
for(ac=1;ac<=3;ac++)
{
acz=zfill(ac,2);
setC(el["i_02_"+fz+"_"+tz+"_"+acz],ixv[co]);
setC(el["i_04_"+fz+"_"+tz+"_"+acz],ixv[co+1]);
setC(el["i_10_"+fz+"_"+tz+"_"+acz],ixv[co+2]);
setC(el["i_03_"+fz+"_"+tz+"_"+acz],ixv[co+3]);
setC(el["i_07_"+fz+"_"+tz+"_"+acz],ixv[co+4]);
setC(el["i_01_"+fz+"_"+tz+"_"+acz],ixv[co+5]);
setC(el["i_14_"+fz+"_"+tz+"_"+acz],ixv[co+6]);
setC(el["i_15_"+fz+"_"+tz+"_"+acz],ixv[co+7]);
//co+=6;
co+=8;
}
if(f>12) {
setC(el["i_12_"+fz+"_"+tz+"_00"],ixv[co]);
setC(el["i_13_"+fz+"_"+tz+"_00"],ixv[co+1]);
}
chInOpt(fz,tz,el['i_11_'+fz+'_'+tz+'_00'],f);
}
if(f<13)
{
var ox=getX(xDt,'o'+f);
de=$d.forms['relays_'+fz];
el=de.elements;
var oxv=ox.split(";");
el["o_04_"+fz+"_00_00"].value=oxv[0]; // Output Name
setC(el["o_01_"+fz+"_00_00"],oxv[1]);
setC(el["o_09_"+fz+"_01_00"],oxv[2]);
setC(el["o_09_"+fz+"_02_00"],oxv[3]);
setC(el["o_06_"+fz+"_01_00"],oxv[4]);
setC(el["o_11_"+fz+"_01_00"],oxv[5]);
setC(el["o_06_"+fz+"_02_00"],oxv[6]);
setC(el["o_11_"+fz+"_02_00"],oxv[7]);
setC(el["o_08_"+fz+"_01_00"],oxv[8]);
setC(el["o_08_"+fz+"_02_00"],oxv[9]);
setC(el["o_05_"+fz+"_01_00"],oxv[10]);
setC(el["o_05_"+fz+"_02_00"],oxv[11]);
setC(el["o_07_"+fz+"_01_00"],oxv[12]);
setC(el["o_07_"+fz+"_02_00"],oxv[13]);
setC(el["o_03_"+fz+"_01_00"],oxv[14]);
setC(el["o_03_"+fz+"_02_00"],oxv[15]);
setC(el["o_10_"+fz+"_00_00"],oxv[16]);
setC(el["o_02_"+fz+"_00_00"],oxv[17]);
setC(el["o_12_"+fz+"_00_00"],oxv[18]);
setC(el["o_13_"+fz+"_00_00"],oxv[19]);
setC(el["o_14_"+fz+"_00_00"],oxv[20]);
setC(el["o_15_"+fz+"_00_00"],oxv[21]);
chRelOpt(fz);
}
sOpt('diginp_'+fz);
}
$('c1init').style.display="none";
$('c2init').style.display="none";
$('c3init').style.display="none";
$('cbox1').style.display="block";
$('cbox2').style.display="block";
$('cbox3').style.display="block";
} else {
ACmd('ioconf.xml',ioCf);
}
}
ACmd('ioconf.xml',ioCf);
ftr();
</script>
<r>
<i1>~i(1,0)~</i1>
<i2>~i(2,0)~</i2>
<i3>~i(3,0)~</i3>
<i4>~i(4,0)~</i4>
<i5>~i(5,0)~</i5>
<i6>~i(6,0)~</i6>
<i7>~i(7,0)~</i7>
<i8>~i(8,0)~</i8>
<i9>~i(9,0)~</i9>
<i10>~i(10,0)~</i10>
<i11>~i(11,0)~</i11>
<i12>~i(12,0)~</i12>
<i13>~i(13,0)~</i13>
<i14>~i(14,0)~</i14>
<i1s1>~i(1,1)~</i1s1>
<i1s2>~i(1,2)~</i1s2>
<i1s3>~i(1,3)~</i1s3>
<i1s4>~i(1,4)~</i1s4>
<i2s1>~i(2,1)~</i2s1>
<i2s2>~i(2,2)~</i2s2>
<i2s3>~i(2,3)~</i2s3>
<i2s4>~i(2,4)~</i2s4>
<i3s1>~i(3,1)~</i3s1>
<i3s2>~i(3,2)~</i3s2>
<i3s3>~i(3,3)~</i3s3>
<i3s4>~i(3,4)~</i3s4>
<i4s1>~i(4,1)~</i4s1>
<i4s2>~i(4,2)~</i4s2>
<i4s3>~i(4,3)~</i4s3>
<i4s4>~i(4,4)~</i4s4>
<i5s1>~i(5,1)~</i5s1>
<i5s2>~i(5,2)~</i5s2>
<i5s3>~i(5,3)~</i5s3>
<i5s4>~i(5,4)~</i5s4>
<i6s1>~i(6,1)~</i6s1>
<i6s2>~i(6,2)~</i6s2>
<i6s3>~i(6,3)~</i6s3>
<i6s4>~i(6,4)~</i6s4>
<i7s1>~i(7,1)~</i7s1>
<i7s2>~i(7,2)~</i7s2>
<i7s3>~i(7,3)~</i7s3>
<i7s4>~i(7,4)~</i7s4>
<i8s1>~i(8,1)~</i8s1>
<i8s2>~i(8,2)~</i8s2>
<i8s3>~i(8,3)~</i8s3>
<i8s4>~i(8,4)~</i8s4>
<i9s1>~i(9,1)~</i9s1>
<i9s2>~i(9,2)~</i9s2>
<i9s3>~i(9,3)~</i9s3>
<i9s4>~i(9,4)~</i9s4>
<i10s1>~i(10,1)~</i10s1>
<i10s2>~i(10,2)~</i10s2>
<i10s3>~i(10,3)~</i10s3>
<i10s4>~i(10,4)~</i10s4>
<i11s1>~i(11,1)~</i11s1>
<i11s2>~i(11,2)~</i11s2>
<i11s3>~i(11,3)~</i11s3>
<i11s4>~i(11,4)~</i11s4>
<i12s1>~i(12,1)~</i12s1>
<i12s2>~i(12,2)~</i12s2>
<i12s3>~i(12,3)~</i12s3>
<i12s4>~i(12,4)~</i12s4>
<i13s1>~i(13,1)~</i13s1>
<i13s2>~i(13,2)~</i13s2>
<i13s3>~i(13,3)~</i13s3>
<i13s4>~i(13,4)~</i13s4>
<i14s1>~i(14,1)~</i14s1>
<i14s2>~i(14,2)~</i14s2>
<i14s3>~i(14,3)~</i14s3>
<i14s4>~i(14,4)~</i14s4>
<o1>~o(1)~</o1>
<o2>~o(2)~</o2>
<o3>~o(3)~</o3>
<o4>~o(4)~</o4>
<o5>~o(5)~</o5>
<o6>~o(6)~</o6>
<o7>~o(7)~</o7>
<o8>~o(8)~</o8>
<o9>~o(9)~</o9>
<o10>~o(10)~</o10>
<o11>~o(11)~</o11>
<o12>~o(12)~</o12>
</r>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script src=/js/d.js></script>
<script>hdr();</script>
<div id=content>
<div id=status>
<div id=load style="display:none">No data</div>
<div id=display>
<div>
<p>RELAYS:<br/><span class=relays id=rl>
</span></p>
<p>INPUTS:<br/>
<span id=ip></span>
</p>
<p>ANALOGS:<br/>
<span>AN1: </span><span id=an1></span></br>
<span>AN2: </span><span id=an2></span>
</p>
</div>
</div>
</div>
</div>
<script>
rl="|";
ip="";
for(i=1;i<=12;i++)
{
rl+='<a id=rel'+i+' onclick="ACmd(\'/cgi/relays.cgi?rel='+i+'\');">'+i+'</a>'+
'<span style="font-size:9px;" id="cs'+i+'">'+i+'</span>|';
ip+='<span id=inp'+i+'>'+i+'</span> &nbsp;';
}
$('rl').innerHTML=rl;
$('ip').innerHTML=ip;
function aLoopCB(xDt) {
if(!xDt)
{
$('display').style.display='none';
$('load').style.display='inline';
return;
}
$('load').style.display='none';
$('display').style.display='inline';
for(i=1;i<13;i++) {
if(getX(xDt,'r'+i)=='1')
{
$('rel'+i).style.color='#090';
$('cs'+i).innerHTML=parseInt(getX(xDt,'p'+i))/10;
}
else
{
$('rel'+i).style.color='#ddd';
$('cs'+i).innerHTML='0';
}
}
for(i=1;i<13;i++) {
if(getX(xDt,'i'+i)=='up')
{
$('inp'+i).style.color='#3366ff';
}
else
{
$('inp'+i).style.color='#e00000';
}
}
$('an1').innerHTML=getX(xDt,'a1');
$('an2').innerHTML=getX(xDt,'a2');
}
ftr();
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script src=/js/d.js></script>
<script>hdr();</script>
<div id=content>
<h1>Network Conf</h1>
<form method=post action=/netcfg.htm name=config>
<fieldset>
<div><label>HW addr:</label>
<input type=text name=mac disabled /></div>
<div><label>Hostname:</label>
<input type=text name=host disabled /></div>
<div>&nbsp;</div>
<div>
<input type=checkbox class=sm name=dhcp value=1 onclick="cBox()" disabled /> Use DHCP</div>
<div>
<input type=checkbox class=sm name=ntpe value=1 disabled /> Use SNTP</div>
<div><label>IP addr:</label>
<td><input type=text name=ip disabled /></div>
<div><label>Gateway:</label>
<td><input type=text name=gw disabled /></div>
<div><label>Subnet Mask:</label>
<td><input type=text name=sub disabled /></div>
<div><label>DNS1:</label>
<td><input type=text name=dns1 disabled /></div>
<div><label>DNS2:</label>
<input type=text name=dns2 disabled/></div>
<div><label>SNTP:</label>
<input type=text name=sntp disabled/></div>
<div><label>Web Port:</label>
<input type=text name=port disabled/></div>
<div><input type=submit class=sm value=Save name=save disabled /></div>
</fieldset>
</form>
</div>
<script>
function cBox() {
e=$d.forms.config;
st1=e.dhcp.checked;
st=0;
if(st1){st=st1;}
e.ip.disabled=st;
e.gw.disabled=st;
e.sub.disabled=st;
e.dns1.disabled=st;
e.dns2.disabled=st;
}
function aFirstCB(xDt)
{
if(xDt)
{
e=$d.forms.config;
if(getX(xDt,'cfg_dhcpchecked')){e.dhcp.checked=1;}
if(getX(xDt,'cfg_ntpe')){e.ntpe.checked=1;}
e.mac.value=getX(xDt,'cfg_mac');
e.host.value=getX(xDt,'cfg_hostname');
e.ip.value=getX(xDt,'cfg_ip');
e.gw.value=getX(xDt,'cfg_gw');
e.sub.value=getX(xDt,'cfg_subnet');
e.dns1.value=getX(xDt,'cfg_dns1');
e.dns2.value=getX(xDt,'cfg_dns2');
e.sntp.value=getX(xDt,'cfg_sntp');
e.port.value=getX(xDt,'wport');
cBox();
e.mac.disabled=0;
e.host.disabled=0;
e.dhcp.disabled=0;
e.sntp.disabled=0;
e.save.disabled=0;
e.ntpe.disabled=0;
e.port.disabled=0;
}
}
ftr();
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script src=/js/d.js></script>
<script>hdr();</script>
<div id=content>
<h1>Rebooting...</h1>
</div>
<script>
function rD(x){}
if(location.search=='?r')
setTimeout("ACmd('/cgi/reset.cgi',rD,false);",500);
else
setTimeout("ACmd('/cgi/reboot.cgi',rD,false);",500);
setTimeout("$w.location='/';",5000);
ftr();
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script src=/js/d.js></script>
<script>hdr();</script>
<div id=content>
<h1>Rebooting...</h1>
</div>
<script>
function rD(x){}
setTimeout("ACmd('/cgi/reset.cgi',rD,false);",500);
setTimeout("$w.location='/';",5000);
ftr();
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script type="text/javascript" src="/js/hdr.js"></script>
<div id="content">
<div id="status">
<div id="loading" style="display:none">Error:<br />Connection to board was lost.</div>
<div id="display">
<div>
<span style="float:right;font-size:9px;font-weight:normal;padding-top:8px;text-indent:0px">(click to toggle)</span>
<p>RELAYS:<br /><span class="relays">
<a id="relay1" onclick="newAJAXCommand('/cgi/relays.cgi?relay=1');">1</a>
<a id="relay2" onclick="newAJAXCommand('/cgi/relays.cgi?relay=2');">2</a>
<a id="relay3" onclick="newAJAXCommand('/cgi/relays.cgi?relay=3');">3</a>
<a id="relay4" onclick="newAJAXCommand('/cgi/relays.cgi?relay=4');">4</a>
<a id="relay5" onclick="newAJAXCommand('/cgi/relays.cgi?relay=5');">5</a>
<a id="relay6" onclick="newAJAXCommand('/cgi/relays.cgi?relay=6');">6</a>
<a id="relay7" onclick="newAJAXCommand('/cgi/relays.cgi?relay=7');">7</a>
<a id="relay8" onclick="newAJAXCommand('/cgi/relays.cgi?relay=8');">8</a>
<a id="relay9" onclick="newAJAXCommand('/cgi/relays.cgi?relay=9');">9</a>
<a id="relay10" onclick="newAJAXCommand('/cgi/relays.cgi?relay=10');">10</a>
<a id="relay11" onclick="newAJAXCommand('/cgi/relays.cgi?relay=11');">11</a>
<a id="relay12" onclick="newAJAXCommand('/cgi/relays.cgi?relay=12');">12</a>
</span></p>
<p>INPUTS:<br />
<span id="input1">1</span> &nbsp;
<span id="input2">2</span> &nbsp;
<span id="input3">3</span> &nbsp;
<span id="input4">4</span> &nbsp;
<span id="input5">5</span> &nbsp;
<span id="input6">6</span> &nbsp;
<span id="input7">7</span> &nbsp;
<span id="input8">8</span> &nbsp;
<span id="input9">9</span> &nbsp;
<span id="input10">10</span> &nbsp;
<span id="input11">11</span> &nbsp;
<span id="input12">12</span>
</p>
</div>
<div id="exprel" style="display:none">
<p> SLAVE RELAYS:<br /><span class="relays">
<a id="relay13" onclick="newAJAXCommand('/cgi/relays.cgi?relay=13');">13</a>
<a id="relay14" onclick="newAJAXCommand('/cgi/relays.cgi?relay=14');">14</a>
<a id="relay15" onclick="newAJAXCommand('/cgi/relays.cgi?relay=15');">15</a>
<a id="relay16" onclick="newAJAXCommand('/cgi/relays.cgi?relay=16');">16</a>
<a id="relay17" onclick="newAJAXCommand('/cgi/relays.cgi?relay=17');">17</a>
<a id="relay18" onclick="newAJAXCommand('/cgi/relays.cgi?relay=18');">18</a>
<a id="relay19" onclick="newAJAXCommand('/cgi/relays.cgi?relay=19');">19</a>
<a id="relay20" onclick="newAJAXCommand('/cgi/relays.cgi?relay=20');">20</a>
<a id="relay21" onclick="newAJAXCommand('/cgi/relays.cgi?relay=21');">21</a>
<a id="relay22" onclick="newAJAXCommand('/cgi/relays.cgi?relay=22');">22</a>
<a id="relay23" onclick="newAJAXCommand('/cgi/relays.cgi?relay=23');">23</a>
<a id="relay24" onclick="newAJAXCommand('/cgi/relays.cgi?relay=24');">24</a>
</span></p>
<p>SLAVE INPUTS:<br />
<span id="input13">13</span> &nbsp;
<span id="input14">14</span> &nbsp;
<span id="input15">15</span> &nbsp;
<span id="input16">16</span> &nbsp;
<span id="input17">17</span> &nbsp;
<span id="input18">18</span> &nbsp;
<span id="input19">19</span> &nbsp;
<span id="input20">20</span> &nbsp;
<span id="input21">21</span> &nbsp;
<span id="input22">22</span> &nbsp;
<span id="input23">23</span> &nbsp;
<span id="input24">24</span>
</p>
</div>
</div>
</div>
<script type="text/javascript">
<!--
function ajaxLoopCBack(xmlData) {
if(!xmlData)
{
document.getElementById('display').style.display = 'none';
document.getElementById('loading').style.display = 'inline';
return;
}
document.getElementById('loading').style.display = 'none';
document.getElementById('display').style.display = 'inline';
for(i = 1; i < 25; i++) {
if(getXMLValue(xmlData, 'relay'+i) == '1')
{
document.getElementById('relay' + i).style.color = '#090';
}
else
{
document.getElementById('relay' + i).style.color = '#ddd';
}
}
for(i = 1; i < 25; i++) {
if(getXMLValue(xmlData, 'input'+i) == 'up')
{
document.getElementById('input' + i).style.color = '#3366ff';
}
else
{
document.getElementById('input' + i).style.color = '#e00000';
}
}
}
function ajaxFirstCBack(xmlData)
{
document.getElementById('exprel').style.display=getXMLValue(xmlData, 'expansion_relays');
}
//-->
</script>
</div>
<script type="text/javascript" src="/js/ftr.js"></script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script src=/js/d.js></script>
<script>hdr();</script>
<div id=content>
<h1>Backup conf</h1>
<div class=configbox>
<a href=/config.bin>Download Complete Config</a><br/>
<a href=/devconf.bin>Download I/O Config</a><br/>
</div>
</p>
<h1>Conf file Upload</h1>
<form action=upload.htm target=upt method=post enctype="multipart/form-data">
<div class=configbox>
<div id=up></div>
<p style="margin-bottom: 2px"><b>File: </b>&nbsp;
<input type=file name=cf size=30 /> &nbsp;
<input type=submit value="Upload Config" />
</p>
</div>
</form>
<iframe name=upt src="" style="width:0;height:0;border:0px solid #fff;"></iframe>
</div>
<script>
function aLoopCB(xDt)
{
$('up').innerHTML=getX(xDt,'upConf');
}
ftr();
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script src=/js/d.js></script>
<script>hdr();</script>
<div id=content>
<h1>Auth Configuration</h1>
<form action=users.htm method=post>
<fieldset id=f>
</fieldset>
</form>
</div>
<script>
c='';
n={adm:"Admin pwd",usr:"User pwd",net:"Net key",mst:"Sys key"};
for(k in n)
{
r='';
for(i=1;i<3;i++){
if(i==2) r='rep. ';
c+='<div><label>'+r+n[k]+':</label><input type=password name='+k+i+' /></div>';
}
}
c+='<div><input type=submit class=sm value=Save /></div>';
$('f').innerHTML=c;
f=$d.forms[0];
function v()
{
for(k in n)
{
if(f[k+'1'].value!=f[k+'2'].value){
alert(n[k]+" doesn't match");
return false;
}
}
}
f.onsubmit=v;
ftr();
</script>
<r>
<stfail>~stfail~</stfail>
<stok>~stok~</stok>
<bst>~stan(2)~</bst>
<stan>~stan(1)~</stan>
<need_reboot>~need_reboot~</need_reboot>
<adczero>~adczero~</adczero>
<adcmoltiplier>~adcmoltiplier~</adcmoltiplier>
<adccompensation>~adccompensation~</adccompensation>
<cfg_ntpe>~cfg_ntpe~</cfg_ntpe>
<cfg_slave>~cfg_slave~</cfg_slave>
<cfg_adcalchecked>~cfg_adcalchecked~</cfg_adcalchecked>
<cfg_adcadchecked>~cfg_adcadchecked~</cfg_adcadchecked>
<cfg_mac>~cfg_mac~</cfg_mac>
<cfg_hostname>~cfg_hostname~</cfg_hostname>
<cfg_dhcpchecked>~cfg_dhcpchecked~</cfg_dhcpchecked>
<cfg_ip>~cfg_ip~</cfg_ip>
<cfg_gw>~cfg_gw~</cfg_gw>
<cfg_subnet>~cfg_subnet~</cfg_subnet>
<cfg_dns1>~cfg_dns1~</cfg_dns1>
<cfg_dns2>~cfg_dns2~</cfg_dns2>
<cfg_tchkp>~cfg_tchkp~</cfg_tchkp>
<cfg_sntp>~cfg_sntp~</cfg_sntp>
<wport>~wp~</wport>
<tz>~tz~</tz>
<dst>~dst~</dst>
<dsts>~dsts~</dsts>
<dstr>~dstr~</dstr>
<upConf>~uplConf~</upConf>
<board>~board~</board>
<fwname>~fwname~</fwname>
<fwver>~fwver~</fwver>
<defmac>~defmac~</defmac>
<stv>~sver~</stv>
<bd>~bd~</bd>
<dt>~dt~</dt>
<nb>~nb~</nb>
<ap>~ap~</ap>
<np>~np~</np>
<epoch>~epoch~</epoch>
<r1>~rel(1)~</r1>
<r2>~rel(2)~</r2>
<r3>~rel(3)~</r3>
<r4>~rel(4)~</r4>
<r5>~rel(5)~</r5>
<r6>~rel(6)~</r6>
<r7>~rel(7)~</r7>
<r8>~rel(8)~</r8>
<r9>~rel(9)~</r9>
<r10>~rel(10)~</r10>
<r11>~rel(11)~</r11>
<r12>~rel(12)~</r12>
<i1>~inp(1)~</i1>
<i2>~inp(2)~</i2>
<i3>~inp(3)~</i3>
<i4>~inp(4)~</i4>
<i5>~inp(5)~</i5>
<i6>~inp(6)~</i6>
<i7>~inp(7)~</i7>
<i8>~inp(8)~</i8>
<i9>~inp(9)~</i9>
<i10>~inp(10)~</i10>
<i11>~inp(11)~</i11>
<i12>~inp(12)~</i12>
<p1>~pot(1)~</p1>
<p2>~pot(2)~</p2>
<p3>~pot(3)~</p3>
<p4>~pot(4)~</p4>
<p5>~pot(5)~</p5>
<p6>~pot(6)~</p6>
<p7>~pot(7)~</p7>
<p8>~pot(8)~</p8>
<p9>~pot(9)~</p9>
<p10>~pot(10)~</p10>
<p11>~pot(11)~</p11>
<p12>~pot(12)~</p12>
<a1>~an(1)~</a1>
<a2>~an(2)~</a2>
<b1>~btn(1)~</b1>
</r>
<r>
<stfail>~stfail~</stfail>
<stok>~stok~</stok>
<bst>~stan(2)~</bst>
<stan>~stan(1)~</stan>
<need_reboot>~need_reboot~</need_reboot>
<adczero>~adczero~</adczero>
<adcmoltiplier>~adcmoltiplier~</adcmoltiplier>
<adccompensation>~adccompensation~</adccompensation>
<cfg_ntpe>~cfg_ntpe~</cfg_ntpe>
<cfg_slave>~cfg_slave~</cfg_slave>
<cfg_adcalchecked>~cfg_adcalchecked~</cfg_adcalchecked>
<cfg_adcadchecked>~cfg_adcadchecked~</cfg_adcadchecked>
<cfg_mac>~cfg_mac~</cfg_mac>
<cfg_hostname>~cfg_hostname~</cfg_hostname>
<cfg_dhcpchecked>~cfg_dhcpchecked~</cfg_dhcpchecked>
<cfg_ip>~cfg_ip~</cfg_ip>
<cfg_gw>~cfg_gw~</cfg_gw>
<cfg_subnet>~cfg_subnet~</cfg_subnet>
<cfg_dns1>~cfg_dns1~</cfg_dns1>
<cfg_dns2>~cfg_dns2~</cfg_dns2>
<cfg_tchkp>~cfg_tchkp~</cfg_tchkp>
<cfg_sntp>~cfg_sntp~</cfg_sntp>
<wport>~wp~</wport>
<tz>~tz~</tz>
<dst>~dst~</dst>
<dsts>~dsts~</dsts>
<dstr>~dstr~</dstr>
<upConf>~uplConf~</upConf>
<board>~board~</board>
<fwname>~fwname~</fwname>
<fwver>~fwver~</fwver>
<defmac>~defmac~</defmac>
<stv>~sver~</stv>
<bd>~bd~</bd>
<dt>~dt~</dt>
<nb>~nb~</nb>
<ap>~ap~</ap>
<np>~np~</np>
<epoch>~epoch~</epoch>
<r1>~rel(1)~</r1>
<r2>~rel(2)~</r2>
<r3>~rel(3)~</r3>
<r4>~rel(4)~</r4>
<r5>~rel(5)~</r5>
<r6>~rel(6)~</r6>
<r7>~rel(7)~</r7>
<r8>~rel(8)~</r8>
<r9>~rel(9)~</r9>
<r10>~rel(10)~</r10>
<r11>~rel(11)~</r11>
<r12>~rel(12)~</r12>
<i1>~inp(1)~</i1>
<i2>~inp(2)~</i2>
<i3>~inp(3)~</i3>
<i4>~inp(4)~</i4>
<i5>~inp(5)~</i5>
<i6>~inp(6)~</i6>
<i7>~inp(7)~</i7>
<i8>~inp(8)~</i8>
<i9>~inp(9)~</i9>
<i10>~inp(10)~</i10>
<i11>~inp(11)~</i11>
<i12>~inp(12)~</i12>
<p1>~pot(1)~</p1>
<p2>~pot(2)~</p2>
<p3>~pot(3)~</p3>
<p4>~pot(4)~</p4>
<p5>~pot(5)~</p5>
<p6>~pot(6)~</p6>
<p7>~pot(7)~</p7>
<p8>~pot(8)~</p8>
<p9>~pot(9)~</p9>
<p10>~pot(10)~</p10>
<p11>~pot(11)~</p11>
<p12>~pot(12)~</p12>
<a1>~an(1)~</a1>
<a2>~an(2)~</a2>
<b1>~btn(1)~</b1>
</r>
K 25
svn:wc:ra_dav:version-url
V 59
/microchip/!svn/ver/130/trunk/Unixmedia/Web/CommonPages/cgi
END
relays.cgi
K 25
svn:wc:ra_dav:version-url
V 70
/microchip/!svn/ver/130/trunk/Unixmedia/Web/CommonPages/cgi/relays.cgi
END
homebtn.cgi
K 25
svn:wc:ra_dav:version-url
V 70
/microchip/!svn/ver/58/trunk/Unixmedia/Web/CommonPages/cgi/homebtn.cgi
END
10
dir
793
https://svn.unixmedia.net/microchip/trunk/Unixmedia/Web/CommonPages/cgi
https://svn.unixmedia.net/microchip
2011-11-28T23:13:36.684899Z
130
nextime
9872420c-b032-40af-96d2-e8d557942bcc
relays.cgi
file
2011-11-24T16:43:32.000000Z
0a992b524637e70da40900e10fec143c
2011-11-28T23:13:36.684899Z
130
nextime
has-props
18
reset.cgi
file
2011-09-18T23:05:30.000000Z
3ac6392960ea2cb2b2b19d548bde1506
2011-09-18T23:07:38.823909Z
32
nextime
has-props
8
bootload.cgi
file
2011-09-18T23:05:30.000000Z
6236ad7979aa7052a50812099d33a0e8
2011-09-18T23:07:38.823909Z
32
nextime
has-props
11
reboot.cgi
file
2011-09-18T23:05:30.000000Z
7302474c63c9a8c7d813d2aa26d15152
2011-09-18T23:07:38.823909Z
32
nextime
has-props
8
homebtn.cgi
file
2011-10-04T07:49:27.000000Z
8e91ebc661de2689e55b56f93d137b09
2011-10-18T23:37:20.958954Z
58
nextime
has-props
22
~reboot~
\ No newline at end of file
Success! ~homebtn(1)~
~reboot~
\ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script src=/js/d.js></script>
<script>hdr();</script>
<div id=content>
<h1>General Config</h1>
<form name=cff>
<h2>Generic Configurations</h2>
<fieldset>
<!-- <div><label>Debug:</label><input type=checkbox class=sm name=debug value=1 disabled /></div> -->
<div><label>TimeCheck:</label><input type=checkbox class=sm name=tchkp value=1 disabled /></div>
<div><label>Serial Device:</label><select name=slave class=sm disabled >
<option value=0 selected>Disabled</option>
<option value=1>Serial RTC</option>
<option value=2>KeeLoq RF</option>
</select></div>
<div id=cs1><input type=checkbox class=sm name=adcal value=1 disabled />Enable ADC Auto Calibration</div>
<div id=cs2><input type=checkbox class=sm name=adcad value=1 disabled onclick="cBox()" />Enable Current Sensors auto-deviation</div>
<div id=cs3><label>ADC Zero Deviation:</label><input type=text class=num name=adczd disabled>-99 to 99</div>
<div id=cs4><label>ADC Compensation:</label><input type=text class=num name=adcco disabled>0 to 99</div>
<div id=cs5><label>ADC Moltiplier:</label><input type=text class=num name=adcmp disabled>99 to 299</div>
<div id=cs7><label>NET Buf Size:</label><input type=text class=num name=netbu disabled>1 to 99</div>
<div id=cs8><label>Act Port:</label><input type=text class=num name=aport disabled>1 to 65535</div>
<div id=cs9><label>Notify Port:</label><input type=text class=num name=nport disabled>1 to 65535</div>
<div id=tzc><label>GMT tz:</label><input type=text class=num name=tzcfg disabled>-23 to 23</div>
<div id=dst><input type=checkbox class=sm name=tzdst value=1 disabled />use DST</div>
<div id=dss><label>DST shift:</label><input type=text class=num name=dstsh disabled>-23 to 23</div>
<div id=dsr><label>DST rule:</label><input type=text class=num name=dstru disabled></div>
<div id=btn></div>
<div><span class="domoB pressB grayO grayB" OnClick="sForm('cff','/config.htm',null)">Save</span></div>
</fieldset>
</form>
</div>
<script>
function cBox() {
e = $d.forms.cff;
if(e.adcad.checked)
{
e.adczd.disabled=true;
e.adcco.disabled=false;
} else {
e.adczd.disabled=false;
e.adcco.disabled=true;
}
}
function aLoopCB(xDt) {
e = $d.forms.cff;
if(e.adcad.checked)
{
e.adczd.value=getX(xDt, 'adczero');
} else {
e.adcco.value=getX(xDt, 'adccompensation');
}
}
function aFirstCB(xDt) {
if(xDt)
{
e = $d.forms.cff;
if(getX(xDt,'cfg_adcalchecked')=='checked')
{
e.adcal.checked=true;
}
e.tchkp.disabled=false;
e.adczd.disabled=false;
e.adcal.disabled=false;
e.adcad.disabled=false;
e.netbu.disabled=false;
e.slave.disabled=false;
e.adcmp.disabled=false;
/*e.debug.disabled=false;*/
e.aport.disabled=false;
e.nport.disabled=false;
e.tzdst.disabled=false;
e.tzcfg.disabled=false;
e.dstsh.disabled=false;
e.dstru.disabled=false;
e.adcmp.value=getX(xDt,'adcmoltiplier');
if(getX(xDt,'cfg_adcadchecked')=='checked')
{
e.adcad.checked=true;
} else {
e.adcad.checked=false;
}
/*
if(getX(xDt,'cfg_debug')=='checked')
{
e.debug.checked=true;
} else {
e.debug.checked=false;
}*/
if(getX(xDt,'cfg_tchkp')=='checked')
{
e.tchkp.checked=true;
} else {
e.tchkp.checked=false;
}
if(getX(xDt,'dst')=='checked')
{
e.tzdst.checked=true;
} else {
e.tzdst.checked=false;
}
e.slave.options[parseInt(getX(xDt,'cfg_slave'))].selected=true;
cBox();
e.netbu.value=getX(xDt,'nb');
e.adczd.value=getX(xDt,'adczero');
e.adcco.value=getX(xDt,'adccompensation');
e.aport.value=getX(xDt,'ap');
e.nport.value=getX(xDt,'np');
e.tzcfg.value=getX(xDt,'tz');
e.dstsh.value=getX(xDt,'dsts');
e.dstru.value=getX(xDt,'dstr');
}
}
ftr();
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script src=/js/d.js></script>
<script>hdr();</script>
<div id=content>
<h1>General Config</h1>
<form name=cff>
<h2>Generic Configurations</h2>
<fieldset>
<!-- <div><label>Debug:</label><input type=checkbox class=sm name=debug value=1 disabled /></div> -->
<div><label>TimeCheck:</label><input type=checkbox class=sm name=tchkp value=1 disabled /></div>
<div><label>Serial Device:</label><select name=slave class=sm disabled >
<option value=0 selected>Disabled</option>
<option value=1>Serial RTC</option>
<option value=2>KeeLoq RF</option>
</select></div>
<div id=cs1><input type=checkbox class=sm name=adcal value=1 disabled />Enable ADC Auto Calibration</div>
<div id=cs2><input type=checkbox class=sm name=adcad value=1 disabled onclick="cBox()" />Enable Current Sensors auto-deviation</div>
<div id=cs3><label>ADC Zero Deviation:</label><input type=text class=num name=adczd disabled>-99 to 99</div>
<div id=cs4><label>ADC Compensation:</label><input type=text class=num name=adcco disabled>0 to 99</div>
<div id=cs5><label>ADC Moltiplier:</label><input type=text class=num name=adcmp disabled>99 to 299</div>
<div id=cs7><label>NET Buf Size:</label><input type=text class=num name=netbu disabled>1 to 99</div>
<div id=cs8><label>Act Port:</label><input type=text class=num name=aport disabled>1 to 65535</div>
<div id=cs9><label>Notify Port:</label><input type=text class=num name=nport disabled>1 to 65535</div>
<div id=tzc><label>GMT tz:</label><input type=text class=num name=tzcfg disabled>-23 to 23</div>
<div id=dst><input type=checkbox class=sm name=tzdst value=1 disabled />use DST</div>
<div id=dss><label>DST shift:</label><input type=text class=num name=dstsh disabled>-23 to 23</div>
<div id=dsr><label>DST rule:</label><input type=text class=num name=dstru disabled></div>
<div id=btn></div>
<div><span class="domoB pressB grayO grayB" OnClick="sForm('cff','/config.htm',null)">Save</span></div>
</fieldset>
</form>
</div>
<script>
function cBox() {
e = $d.forms.cff;
if(e.adcad.checked)
{
e.adczd.disabled=true;
e.adcco.disabled=false;
} else {
e.adczd.disabled=false;
e.adcco.disabled=true;
}
}
function aLoopCB(xDt) {
e = $d.forms.cff;
if(e.adcad.checked)
{
e.adczd.value=getX(xDt, 'adczero');
} else {
e.adcco.value=getX(xDt, 'adccompensation');
}
}
function aFirstCB(xDt) {
if(xDt)
{
e = $d.forms.cff;
if(getX(xDt,'cfg_adcalchecked')=='checked')
{
e.adcal.checked=true;
}
e.tchkp.disabled=false;
e.adczd.disabled=false;
e.adcal.disabled=false;
e.adcad.disabled=false;
e.netbu.disabled=false;
e.slave.disabled=false;
e.adcmp.disabled=false;
/*e.debug.disabled=false;*/
e.aport.disabled=false;
e.nport.disabled=false;
e.tzdst.disabled=false;
e.tzcfg.disabled=false;
e.dstsh.disabled=false;
e.dstru.disabled=false;
e.adcmp.value=getX(xDt,'adcmoltiplier');
if(getX(xDt,'cfg_adcadchecked')=='checked')
{
e.adcad.checked=true;
} else {
e.adcad.checked=false;
}
/*
if(getX(xDt,'cfg_debug')=='checked')
{
e.debug.checked=true;
} else {
e.debug.checked=false;
}*/
if(getX(xDt,'cfg_tchkp')=='checked')
{
e.tchkp.checked=true;
} else {
e.tchkp.checked=false;
}
if(getX(xDt,'dst')=='checked')
{
e.tzdst.checked=true;
} else {
e.tzdst.checked=false;
}
e.slave.options[parseInt(getX(xDt,'cfg_slave'))].selected=true;
cBox();
e.netbu.value=getX(xDt,'nb');
e.adczd.value=getX(xDt,'adczero');
e.adcco.value=getX(xDt,'adccompensation');
e.aport.value=getX(xDt,'ap');
e.nport.value=getX(xDt,'np');
e.tzcfg.value=getX(xDt,'tz');
e.dstsh.value=getX(xDt,'dsts');
e.dstru.value=getX(xDt,'dstr');
}
}
ftr();
</script>
body {
font-family: Verdana, Arial, sans-serif;
background: #ffffff;
margin: 0px auto;
padding: 0 0 20px 0;
}
#page {
width: 760px;
border: 1px solid #006699;
background: #fff;
border-top: 0;
padding: 20px;
font-size: 10pt;
margin: 0px auto;
}
#page td {
font-size: 10pt;
}
#title {
background: #222;
padding: 4px;
font-weight: bold;
color: #fff;
margin-bottom: 15px;
height: 16px;
}
#title .right {
float: right;
width: 300px;
text-align: right;
}
#menu {
float: left;
width: 150px;
padding-right: 20px;
position:fixed;
}
#menu a {
width: 140px;
display: block;
background: #222;
color: white;
padding: 8px;
font-weight: bold;
border-bottom: 1px solid #fff;
text-decoration: none;
}
#menu a:hover {
background: #006699;
}
.tcon {
border:1px solid #669CCC;
padding-bottom:15px;
width:100%;
margin-bottom:3px;
}
.tabf {
padding-bottom:0px;
margin-top:2px;
margin-bottom:0px;
display:table;
}
.tabf div {
padding-bottom: 5px;
padding-right: 8px;
padding-left: 8px;
font-weight: bold;
margin-left: 5px;
padding-top: 5px;
color: #000;
float: left;
}
.tabon, .taboff, .expand {
border-bottom-color: #669CCC;
border-right-color: #669CCC;
background-position: bottom;
border-left-color: #669CCC;
border-bottom-style: solid;
background-color: #EFEFEF;
border-right-style: solid;
border-top-color: #669CCC;
border-left-style: solid;
border-bottom-width: 0px;
border-right-width: 1px;
border-top-style: solid;
border-left-width: 1px;
border-top-width: 1px;
padding: 1px 1px 1px 1px;
cursor: pointer;
}
.tabon {
background-color: #BBB;
}
#content {
width: 550px;
min-height:330px;
float: right;
padding-right: 10px;
}
#content a {
color: #c00;
text-decoration: none;
}
#content a:hover {
color: #d33;
text-decoration: underline;
}
#content h1 {
margin-top: 0px;
}
.spacer {
clear: both;
}
#footer {
font-size: 0.8em;
color: #666;
text-align: center;
margin: 10px 50px 0 50px;
padding-top: 10px;
border-top: 1px dotted #666;
}
#status {
padding: 10px;
margin: 10px;
border: 1px dotted #666;
font-weight: bold;
}
#status p {
padding: 5px 0 5px 10px;
text-indent: -10px;
margin: 0;
}
#status .relays {
font-size: 14pt;
}
#status .relays a {
color: #ddd;
cursor: pointer;
}
#status .relays a:hover {
color: #ddd;
text-decoration: none;
}
#status .rele a {
background-color: #99FFFF;
cursor: pointer;
text-decoration: none;
border: 1px solid #000;
color: #000;
}
#status .rele a:hover {
background-color: #0066CC;
text-decoration: none;
border: 1px double #000;
color: #000;
}
.configbox {
margin:10px 40px 10px 40px;
padding: 8px;
border: 1px dotted #333;
text-align:center;
background:#ddd;
}
.code {
font-family: Courier New, Courier, fixed-width, fixed;
}
.exercise {
background: #fe9;
padding: 5px;
margin-left: 10px;
border-left: 2px solid #eb3;
}
.error {
margin-left: 10px;
padding: 10px;
background: #fdd;
border-left: 2px solid #900;
}
#content h6 {
border-top: 1px dashed #333;
margin: 15px;
padding: 0px;
height: 1px;
}
form fieldset {
margin:10px 40px 10px 40px;
padding: 8px;
border: 1px dotted #333;
background:#ddd;
}
form fieldset div {
padding: 2px 0px 2px 150px;
}
fieldset div label {
margin-left: -150px;
padding-top: 2px;
width: 145px;
font-weight: bold;
position: absolute;
}
fieldset input {
width: 250px;
}
fieldset input.num {
width: 125px;
}
fieldset input.sm {
width: auto;
}
fieldset textarea {
width: 250px;
}
.ress
{
padding: 12px;
border: 2px solid #3366ff;
text-align: center;
font-weight: bold;
background: #cceeff;
top:10px;
width: 128px;
}
.ok {
border-color: #6b6;
background: #efe;
}
.fail {
border-color: #b66;
background: #fee;
}
.unk {
border-color: #cc6;
background: #ffd;
}
.domoB {
-moz-border-radius:10px;
-webkit-border-radius:10px;
border-radius:10px;
display:inline-block;
font-family:arial;
font-size:15px;
font-weight:bold;
padding:7px 23px;
margin: 2px;
text-decoration:none;
}
.pressB:active {
position:relative;
top:3px;
left:1px;
}
.deactiveB {
background-color:#d9d5d9;
-moz-border-radius:10px;
-webkit-border-radius:10px;
border-radius:10px;
display:inline-block;
color:#adadad;
font-family:arial;
font-size:15px;
font-weight:bold;
padding:7px 23px;
text-decoration:none;
margin: 2px;
}
.greenB {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ced9d7), color-stop(1, #22ba1a) );
background:-moz-linear-gradient( center top, #ced9d7 5%, #22ba1a 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ced9d7', endColorstr='#22ba1a');
background-color:#ced9d7;
border:2px solid #a89ea8;
color:#232d57;
}
.greenO:hover {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #22ba1a), color-stop(1, #ced9d7) );
background:-moz-linear-gradient( center top, #22ba1a 5%, #ced9d7 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#22ba1a', endColorstr='#ced9d7');
background-color:#22ba1a;
}
.redB {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #d1c6c6), color-stop(1, #ff1414) );
background:-moz-linear-gradient( center top, #d1c6c6 5%, #ff1414 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#d1c6c6', endColorstr='#ff1414');
background-color:#d1c6c6;
border:2px solid #a89ea8;
color:#3b1537;
}
.redO:hover {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ff1414), color-stop(1, #d1c6c6) );
background:-moz-linear-gradient( center top, #ff1414 5%, #d1c6c6 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff1414', endColorstr='#d1c6c6');
background-color:#ff1414;
}
.grayB {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ededed), color-stop(1, #dfdfdf) );
background:-moz-linear-gradient( center top, #ededed 5%, #dfdfdf 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed', endColorstr='#dfdfdf');
background-color:#ededed;
border:2px solid #a89ea8;
color:#2e54b3;
}
.grayO:hover {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #dfdfdf), color-stop(1, #ededed) );
background:-moz-linear-gradient( center top, #dfdfdf 5%, #ededed 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#dfdfdf', endColorstr='#ededed');
background-color:#dfdfdf;
}
.blueB {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #c3d1e3), color-stop(1, #3058db) );
background:-moz-linear-gradient( center top, #c3d1e3 5%, #3058db 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#c3d1e3', endColorstr='#3058db');
background-color:#c3d1e3;
border:2px solid #c4bec4;
color:#030408;
}
.blueO:hover {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #3058db), color-stop(1, #c3d1e3) );
background:-moz-linear-gradient( center top, #3058db 5%, #c3d1e3 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#3058db', endColorstr='#c3d1e3');
background-color:#3058db;
}
.yellowB {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #dfe3c3), color-stop(1, #c8d600) );
background:-moz-linear-gradient( center top, #dfe3c3 5%, #c8d600 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#dfe3c3', endColorstr='#c8d600');
background-color:#dfe3c3;
border:2px solid #c4bec4;
color:#20399e;
}
.yellowO:hover {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #c8d600), color-stop(1, #dfe3c3) );
background:-moz-linear-gradient( center top, #c8d600 5%, #dfe3c3 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#c8d600', endColorstr='#dfe3c3');
background-color:#c8d600;
}
body {
font-family: Verdana, Arial, sans-serif;
background: #ffffff;
margin: 0px auto;
padding: 0 0 20px 0;
}
#page {
width: 760px;
border: 1px solid #006699;
background: #fff;
border-top: 0;
padding: 20px;
font-size: 10pt;
margin: 0px auto;
}
#page td {
font-size: 10pt;
}
#title {
background: #222;
padding: 4px;
font-weight: bold;
color: #fff;
margin-bottom: 15px;
height: 16px;
}
#title .right {
float: right;
width: 300px;
text-align: right;
}
#menu {
float: left;
width: 150px;
padding-right: 20px;
position:fixed;
}
#menu a {
width: 140px;
display: block;
background: #222;
color: white;
padding: 8px;
font-weight: bold;
border-bottom: 1px solid #fff;
text-decoration: none;
}
#menu a:hover {
background: #006699;
}
.tcon {
border:1px solid #669CCC;
padding-bottom:15px;
width:100%;
margin-bottom:3px;
}
.tabf {
padding-bottom:0px;
margin-top:2px;
margin-bottom:0px;
display:table;
}
.tabf div {
padding-bottom: 5px;
padding-right: 8px;
padding-left: 8px;
font-weight: bold;
margin-left: 5px;
padding-top: 5px;
color: #000;
float: left;
}
.tabon, .taboff, .expand {
border-bottom-color: #669CCC;
border-right-color: #669CCC;
background-position: bottom;
border-left-color: #669CCC;
border-bottom-style: solid;
background-color: #EFEFEF;
border-right-style: solid;
border-top-color: #669CCC;
border-left-style: solid;
border-bottom-width: 0px;
border-right-width: 1px;
border-top-style: solid;
border-left-width: 1px;
border-top-width: 1px;
padding: 1px 1px 1px 1px;
cursor: pointer;
}
.tabon {
background-color: #BBB;
}
#content {
width: 550px;
min-height:330px;
float: right;
padding-right: 10px;
}
#content a {
color: #c00;
text-decoration: none;
}
#content a:hover {
color: #d33;
text-decoration: underline;
}
#content h1 {
margin-top: 0px;
}
.spacer {
clear: both;
}
#footer {
font-size: 0.8em;
color: #666;
text-align: center;
margin: 10px 50px 0 50px;
padding-top: 10px;
border-top: 1px dotted #666;
}
#status {
padding: 10px;
margin: 10px;
border: 1px dotted #666;
font-weight: bold;
}
#status p {
padding: 5px 0 5px 10px;
text-indent: -10px;
margin: 0;
}
#status .relays {
font-size: 14pt;
}
#status .relays a {
color: #ddd;
cursor: pointer;
}
#status .relays a:hover {
color: #ddd;
text-decoration: none;
}
#status .rele a {
background-color: #99FFFF;
cursor: pointer;
text-decoration: none;
border: 1px solid #000;
color: #000;
}
#status .rele a:hover {
background-color: #0066CC;
text-decoration: none;
border: 1px double #000;
color: #000;
}
.configbox {
margin:10px 40px 10px 40px;
padding: 8px;
border: 1px dotted #333;
text-align:center;
background:#ddd;
}
.code {
font-family: Courier New, Courier, fixed-width, fixed;
}
.exercise {
background: #fe9;
padding: 5px;
margin-left: 10px;
border-left: 2px solid #eb3;
}
.error {
margin-left: 10px;
padding: 10px;
background: #fdd;
border-left: 2px solid #900;
}
#content h6 {
border-top: 1px dashed #333;
margin: 15px;
padding: 0px;
height: 1px;
}
form fieldset {
margin:10px 40px 10px 40px;
padding: 8px;
border: 1px dotted #333;
background:#ddd;
}
form fieldset div {
padding: 2px 0px 2px 150px;
}
fieldset div label {
margin-left: -150px;
padding-top: 2px;
width: 145px;
font-weight: bold;
position: absolute;
}
fieldset input {
width: 250px;
}
fieldset input.num {
width: 125px;
}
fieldset input.sm {
width: auto;
}
fieldset textarea {
width: 250px;
}
.ress
{
padding: 12px;
border: 2px solid #3366ff;
text-align: center;
font-weight: bold;
background: #cceeff;
top:10px;
width: 128px;
}
.ok {
border-color: #6b6;
background: #efe;
}
.fail {
border-color: #b66;
background: #fee;
}
.unk {
border-color: #cc6;
background: #ffd;
}
.domoB {
-moz-border-radius:10px;
-webkit-border-radius:10px;
border-radius:10px;
display:inline-block;
font-family:arial;
font-size:15px;
font-weight:bold;
padding:7px 23px;
margin: 2px;
text-decoration:none;
}
.pressB:active {
position:relative;
top:3px;
left:1px;
}
.deactiveB {
background-color:#d9d5d9;
-moz-border-radius:10px;
-webkit-border-radius:10px;
border-radius:10px;
display:inline-block;
color:#adadad;
font-family:arial;
font-size:15px;
font-weight:bold;
padding:7px 23px;
text-decoration:none;
margin: 2px;
}
.greenB {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ced9d7), color-stop(1, #22ba1a) );
background:-moz-linear-gradient( center top, #ced9d7 5%, #22ba1a 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ced9d7', endColorstr='#22ba1a');
background-color:#ced9d7;
border:2px solid #a89ea8;
color:#232d57;
}
.greenO:hover {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #22ba1a), color-stop(1, #ced9d7) );
background:-moz-linear-gradient( center top, #22ba1a 5%, #ced9d7 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#22ba1a', endColorstr='#ced9d7');
background-color:#22ba1a;
}
.redB {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #d1c6c6), color-stop(1, #ff1414) );
background:-moz-linear-gradient( center top, #d1c6c6 5%, #ff1414 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#d1c6c6', endColorstr='#ff1414');
background-color:#d1c6c6;
border:2px solid #a89ea8;
color:#3b1537;
}
.redO:hover {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ff1414), color-stop(1, #d1c6c6) );
background:-moz-linear-gradient( center top, #ff1414 5%, #d1c6c6 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff1414', endColorstr='#d1c6c6');
background-color:#ff1414;
}
.grayB {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ededed), color-stop(1, #dfdfdf) );
background:-moz-linear-gradient( center top, #ededed 5%, #dfdfdf 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed', endColorstr='#dfdfdf');
background-color:#ededed;
border:2px solid #a89ea8;
color:#2e54b3;
}
.grayO:hover {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #dfdfdf), color-stop(1, #ededed) );
background:-moz-linear-gradient( center top, #dfdfdf 5%, #ededed 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#dfdfdf', endColorstr='#ededed');
background-color:#dfdfdf;
}
.blueB {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #c3d1e3), color-stop(1, #3058db) );
background:-moz-linear-gradient( center top, #c3d1e3 5%, #3058db 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#c3d1e3', endColorstr='#3058db');
background-color:#c3d1e3;
border:2px solid #c4bec4;
color:#030408;
}
.blueO:hover {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #3058db), color-stop(1, #c3d1e3) );
background:-moz-linear-gradient( center top, #3058db 5%, #c3d1e3 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#3058db', endColorstr='#c3d1e3');
background-color:#3058db;
}
.yellowB {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #dfe3c3), color-stop(1, #c8d600) );
background:-moz-linear-gradient( center top, #dfe3c3 5%, #c8d600 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#dfe3c3', endColorstr='#c8d600');
background-color:#dfe3c3;
border:2px solid #c4bec4;
color:#20399e;
}
.yellowO:hover {
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #c8d600), color-stop(1, #dfe3c3) );
background:-moz-linear-gradient( center top, #c8d600 5%, #dfe3c3 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#c8d600', endColorstr='#dfe3c3');
background-color:#c8d600;
}
K 25
svn:wc:ra_dav:version-url
V 59
/microchip/!svn/ver/341/trunk/Unixmedia/Web/CommonPages/img
END
domotika.gif
K 25
svn:wc:ra_dav:version-url
V 72
/microchip/!svn/ver/341/trunk/Unixmedia/Web/CommonPages/img/domotika.gif
END
10
dir
793
https://svn.unixmedia.net/microchip/trunk/Unixmedia/Web/CommonPages/img
https://svn.unixmedia.net/microchip
2012-05-01T01:11:26.259405Z
341
nextime
9872420c-b032-40af-96d2-e8d557942bcc
domotika.gif
file
2012-04-24T16:30:59.000000Z
7100c1b823a3a7cf822f4211cb02c492
2012-05-01T01:11:26.259405Z
341
nextime
has-props
516
K 14
svn:executable
V 1
*
K 13
svn:mime-type
V 24
application/octet-stream
END
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script src=/js/d.js></script>
<script>hdr();</script>
<div id=content >
<h1>I/O Config</h1>
<hr><h2>${{Digital Inputs}}$</h2>
<div id=c1init>${{LOADING}}$...</div>
<div class=configbox id=cbox1 style="display:none"></div>
<hr><h2>${{Analog Inputs}}$</h2>
<div id=c3init>${{LOADING}}$...</div>
<div class=configbox id=cbox3 style="display:none">
</div>
<hr><h2>${{Outputs}}$</h2>
<div id=c2init>${{LOADING}}$...</div>
<div class=configbox id=cbox2 style="display:none">
</div>
</div>
<script>
var ho="";
var hi="";
function chRelOpt(iz)
{
os=$('otype_'+iz);
osel=os.selectedIndex;
oselv=parseInt(os[osel].value);
nrel=0;
seq="none";
ctxdiv='block';
if(oselv>0)
nrel=1;
if(oselv>=0xf0)
nrel=2;
if(oselv==0xff)
{
nrel=255;
seq="block";
nrel=0;
ctxdiv='none';
}
if(oselv==244)
$('og'+iz).style.display="block";
else
$('og'+iz).style.display="none";
$('ctxd'+iz).style.display=ctxdiv;
for(nr=1;nr<=2;nr++)
{
nrz=zfill(nr,2);
rdiv="none";
if(nr<=nrel){rdiv='block';}
$('rdiv_'+iz+'_'+nrz).style.display=rdiv;
}
$('seq'+iz).style.display=seq;
}
function addROpt()
{
for(i=1;i<=12;i++)
{
ho=" ";
var iz=zfill(i,2);
ho+='<div id=ctxd'+iz+' style="display:none"><b> Ctx: <select name=o_01_'+iz+'_00_00></b>';
for(k in DmCtx)
{
ho+='<option value="'+DmCtx[k]+'">'+k+'</option>';
}
ho+='</select><br /><br />';
// Output per cancelli
ho+='<div id=og'+iz+' style="display:none"><b>${{startt}}$: </b><input type=text size=3 name=o_12_'+iz+'_00_00 value=0><b>${{opent}}$: </b><input type=text size=3 name=o_13_'+iz+'_00_00 value=0><b>${{pauset}}$: </b><input type=text size=3 name=o_14_'+iz+'_00_00 value=0><br/><b>${{Banging}}$:</b><select name=o_15_'+iz+'_00_00><option value=0>${{No}}$</option><option value=1>${{Yes}}$</option></select></div>';
// Fine output per cancelli
ho+='<br/></div>';
for(nr=1;nr<=2;nr++)
{
var nrz=zfill(nr,2);
ho+='<div id=rdiv_'+iz+'_'+nrz+' style="display:none"><hr><b> R'+nr+': </b><select name=o_05_'+iz+'_'+nrz+'_00><option value="0">${{None}}$</option>';
for(rn=1;rn<=12;rn++)
{
ho+='<option value='+rn+'>${{Relay}}$ '+rn+'</option>';
}
ho+='</select>'+
'<select name=o_07_'+iz+'_'+nrz+'_00><option value=0>NA (${{Open}}$)</option><option value=1>NC (${{Close}}$)</option><option value=2>${{Save}}$</option></select><br/>'+
'<b>${{runtime}}$: </b><input type=text size=3 name=o_09_'+iz+'_'+nrz+'_00 value=0>'+
'<b> ${{Retard}}$: <b><input type=text size=3 name=o_08_'+iz+'_'+nrz+'_00 value=0>'+
'<br/><b>${{break delay}}$: <b><input type=text size=3 name=o_06_'+iz+'_'+nrz+'_00 value=0>'+
'<b>${{rearm}}$: <b><input type=text size=3 name=o_11_'+iz+'_'+nrz+'_00 value=0>'+
'<b> ${{A Max}}$: <b><input type=text size=3 name=o_03_'+iz+'_'+nrz+'_00 value=160>'+
'<br/></div>';
}
ho+='<div id=seq'+iz+' style="display:none">${{SEQUENCE}}$</div>';
$("ropt_"+i).innerHTML=ho;
}
}
function chInOpt(iz,tz,sel,i)
{
osel=sel.selectedIndex;
oselv=parseInt(sel[osel].value);
maxact=0;
if(oselv)
{
if(oselv<160) // 0xa0
maxact=1;
else if(oselv<208) // 0xd0
maxact=2;
else
maxact=3;
}
if(i>12)
maxact=3;
for(a=1;a<=3;a++) {
actvis="none";
if(a<=maxact) {actvis="block";}
$('adiv'+iz+tz+'_'+a).style.display=actvis;
}
}
function addInputOpts(iz,tz,i,pulse)
{
var hi="";
for(a=1;a<=3;a++) {
hi+='<div id=adiv'+iz+tz+'_'+a+' style="display:none">';
if(a>1) { hi+='<br /><hr><br/>'; }
hi+='<b>${{action}}$ '+a+': </b><input type=text size=25 name=i_02_'+iz+'_'+tz+'_0'+a+' value="${{wait}}$..."><br/>';
hi+='<b> ${{msg}}$:</b><select name=i_07_'+iz+'_'+tz+'_0'+a+'>';
for(k in DmMsgType)
{
hi+='<option value="'+DmMsgType[k]+'">'+k+'</option>';
}
hi+='</select>';
hi+='<b> ${{ctx}}$:</b><select name=i_03_'+iz+'_'+tz+'_0'+a+'>';
for(k in DmCtx)
{
hi+='<option value="'+DmCtx[k]+'">'+k+'</option>';
}
hi+='</select><br/>';
hi+='<b> ${{act}}$:</b><select name=i_01_'+iz+'_'+tz+'_0'+a+'>';
for(k in DmAct)
{
hi+='<option value="'+DmAct[k]+'">'+k+'</option>';
}
hi+='</select>';
tval="${{Time}}$";
if(pulse)
{
tval="${{Time/Count}}$";
}
else if(i>12)
{
if(a==2)
tval="${{Low}}$";
if(a>2)
tval="${{Hi}}$";
}
hi+='<b> '+tval+': </b><input type=text size=3 name=i_10_'+iz+'_'+tz+'_0'+a+' value=0>';
hi+='<br/><b> ${{Opt}}$:</b><select name=i_14_'+iz+'_'+tz+'_0'+a+'>';
for(k in DmOpt)
{
hi+='<option value="'+DmOpt[k]+'">'+k+'</option>';
}
hi+='</select>';
hi+='<input type=text size=15 name=i_15_'+iz+'_'+tz+'_0'+a+' value="">';
hi+='<br/><b> ${{Dst}}$: </b><input type=text size=15 name=i_04_'+iz+'_'+tz+'_0'+a+' value="0.0.0.0">';
hi+='</div>';
}
return hi;
}
function addInp(i,seld,name)
{
pulse=0;
InpT=new Object();
for(k in seld){InpT[k]=seld[k];}
if($w.DmBoard=='DMRv1')
{
if(i<9 && i>4)
{
for(k in DmISR1){InpT[k]=DmISR1[k];}
pulse=1;
}
} else { // DMRv3
if(i<5)
{
for(k in DmISR1){InpT[k]=DmISR1[k];}
pulse=1;
}
}
var iz=zfill(i,2);
hi+='<form name=diginp_'+iz+'>'+
'<b>'+name+' ${{name}}$:</b><input type=text size=20 name=i_08_'+iz+'_00_00 value="${{wait}}$...">'+
'<span onClick="toggleMe(\'inp'+i+'\',this);" style="padding:1px 1px" class="domoB pressB grayO grayB">${{Expand}}$ &or;</span><br/>'+
'<div id=inp'+i+' style="background-color: #EFEFEF; display:none;">'+
'<div class="tabf" id=tabf-'+i+'>'+
'<div id=tab_1-'+i+' class="tabon" onclick="tabC.chTab(this,'+i+');">${{Status}}$ Default</div>'+
'<div id=tab_2-'+i+' class="taboff" onclick="tabC.chTab(this,'+i+');">${{Status}}$ 2</div>'+
'<div id=tab_3-'+i+' class="taboff" onclick="tabC.chTab(this,'+i+');">${{Status}}$ 3</div>'+
'<div id=tab_4-'+i+' class="taboff" onclick="tabC.chTab(this,'+i+');">${{Status}}$ 4</div>'+
"</div>";
for(t=1;t<=4;t++)
{
var tz=zfill(t,2);
hi+='<div id=tab_'+t+'-'+i+'_data class="tcon" style="background-color:#BBBBBB;display:';
if(t==1) {hi+='table;"><div>';} else {hi+='none;"><div>';}
hi+='<b>${{Status name}}$: </b><input type=text size=25 name=i_09_'+iz+'_'+tz+'_00 value="${{wait}}..."><br/>'+
'<b>${{Enabled}}$:</b><select name=i_05_'+iz+'_'+tz+'_00><option value=0>${{No}}$</option><option value=1>${{Yes}}$</option></select>'+
' <b> ${{type}}$: </b><select name=i_11_'+iz+'_'+tz+'_00 onChange="chInOpt(\''+iz+'\',\''+tz+'\',this,'+i+');">';
for(k in InpT)
{
hi+='<option value="'+InpT[k]+'">'+k+'</option>';
}
hi+='</select><br/>'+
'<b>${{Min time}}$: </b><input type=text size=3 name=i_06_'+iz+'_'+tz+'_00 value=0>';
if(i>12) {
hi+='<b>${{Min val}}$: </b><input type=text size=3 name=i_12_'+iz+'_'+tz+'_00 value=0>'+
'<b>${{Max val}}$: </b><input type=text size=3 name=i_13_'+iz+'_'+tz+'_00 value=0>';
}
hi+='<hr>'+
'<div id=iopt_'+iz+'_'+tz+'>';
hi+=addInputOpts(iz,tz,i,pulse);
hi+='</div></div></div>';
}
delete InpT;
var fna='diginp_'+iz;
hi+='<span class="domoB pressB grayO grayB" onclick="hOpt(\''+fna+'\');sForm(\''+fna+'\',\'/ioconf.xml\',null);sOpt(\''+fna+'\');">${{Save}}$</span></form></div>';
}
for(i=1;i<=12;i++)
{
var iz=zfill(i,2);
addInp(i,DmInputType,'${{Input}}$ '+i);
// FINE INPUT
ho+='<form name=relays_'+iz+'>'+
'<b>${{Device name}}$ '+i+':</b> <input type=text size=20 name=o_04_'+iz+'_00_00 value="${{wait}}$..."><span onClick="toggleMe(\'out'+i+'\',this);" style="padding:1px 1px" class="domoB pressB grayO grayB">${{Expand}}$ &or;</span><br />'+
'<div id=out'+i+' style="background-color:#BBBBBB;display:none;">'+
'<b>${{Enabled}}$:</b><select name=o_02_'+iz+'_00_00><option value=0>${{No}}$</option><option value=1>${{Yes}}$</option></select>'+
' <b>${{Output type}}$: </b><select id=otype_'+iz+' name=o_10_'+iz+'_00_00 onChange="chRelOpt(\''+iz+'\');">';
for(k in DmOutputType)
{
ho+='<option value="'+DmOutputType[k]+'">'+k+'</option>';
}
ho+='</select><br/>'+
'<div id=ropt_'+i+'></div>'+
// FINE DEVICE
'<span class="domoB pressB grayO grayB" onclick="sForm(\'relays_'+iz+'\',\'/ioconf.xml\',null);">${{Save}}$</span>'+
'</div></form>';
}
$("cbox1").innerHTML+=hi+"</div>";
$("cbox2").innerHTML+=ho+"</div>";
hi="";
for(i=1;i<3;i++)
{
addInp(i+12,DmAnType,'${{Analog}}$ '+i);
}
$("cbox3").innerHTML+=hi+"</div>";
for(i=1;i<15;i++)
{
tabC.addTabs("tabf-"+i,i);
}
addROpt();
function setC(el,val)
{
var nname=el.nodeName;
if(el.name!="save")
{
if(nname=='SELECT')
{
l=el.length;
while(l){
if(el[--l].value==parseInt(val)){
el.selectedIndex=l;
l=0;
}
}
} else {
el.value=val;
}
}
}
function ioCf(xDt)
{
if(xDt)
{
for(f=1;f<15;f++)
{
var iname=getX(xDt,'i'+f);
var fz=zfill(f,2);
ie=$d.forms['diginp_'+fz];
el=ie.elements;
el["i_08_"+fz+"_00_00"].value=iname;
for(t=1;t<=4;t++)
{
tz=zfill(t,2);
var ix=getX(xDt,'i'+f+'s'+t);
var ixv=ix.split(";");
setC(el["i_09_"+fz+"_"+tz+"_00"],ixv[0]);
setC(el["i_06_"+fz+"_"+tz+"_00"],ixv[1]);
setC(el["i_05_"+fz+"_"+tz+"_00"],ixv[2]);
setC(el["i_11_"+fz+"_"+tz+"_00"],ixv[3]);
co=4;
for(ac=1;ac<=3;ac++)
{
acz=zfill(ac,2);
setC(el["i_02_"+fz+"_"+tz+"_"+acz],ixv[co]);
setC(el["i_04_"+fz+"_"+tz+"_"+acz],ixv[co+1]);
setC(el["i_10_"+fz+"_"+tz+"_"+acz],ixv[co+2]);
setC(el["i_03_"+fz+"_"+tz+"_"+acz],ixv[co+3]);
setC(el["i_07_"+fz+"_"+tz+"_"+acz],ixv[co+4]);
setC(el["i_01_"+fz+"_"+tz+"_"+acz],ixv[co+5]);
setC(el["i_14_"+fz+"_"+tz+"_"+acz],ixv[co+6]);
setC(el["i_15_"+fz+"_"+tz+"_"+acz],ixv[co+7]);
//co+=6;
co+=8;
}
if(f>12) {
setC(el["i_12_"+fz+"_"+tz+"_00"],ixv[co]);
setC(el["i_13_"+fz+"_"+tz+"_00"],ixv[co+1]);
}
chInOpt(fz,tz,el['i_11_'+fz+'_'+tz+'_00'],f);
}
if(f<13)
{
var ox=getX(xDt,'o'+f);
de=$d.forms['relays_'+fz];
el=de.elements;
var oxv=ox.split(";");
el["o_04_"+fz+"_00_00"].value=oxv[0]; // Output Name
setC(el["o_01_"+fz+"_00_00"],oxv[1]);
setC(el["o_09_"+fz+"_01_00"],oxv[2]);
setC(el["o_09_"+fz+"_02_00"],oxv[3]);
setC(el["o_06_"+fz+"_01_00"],oxv[4]);
setC(el["o_11_"+fz+"_01_00"],oxv[5]);
setC(el["o_06_"+fz+"_02_00"],oxv[6]);
setC(el["o_11_"+fz+"_02_00"],oxv[7]);
setC(el["o_08_"+fz+"_01_00"],oxv[8]);
setC(el["o_08_"+fz+"_02_00"],oxv[9]);
setC(el["o_05_"+fz+"_01_00"],oxv[10]);
setC(el["o_05_"+fz+"_02_00"],oxv[11]);
setC(el["o_07_"+fz+"_01_00"],oxv[12]);
setC(el["o_07_"+fz+"_02_00"],oxv[13]);
setC(el["o_03_"+fz+"_01_00"],oxv[14]);
setC(el["o_03_"+fz+"_02_00"],oxv[15]);
setC(el["o_10_"+fz+"_00_00"],oxv[16]);
setC(el["o_02_"+fz+"_00_00"],oxv[17]);
setC(el["o_12_"+fz+"_00_00"],oxv[18]);
setC(el["o_13_"+fz+"_00_00"],oxv[19]);
setC(el["o_14_"+fz+"_00_00"],oxv[20]);
setC(el["o_15_"+fz+"_00_00"],oxv[21]);
chRelOpt(fz);
}
sOpt('diginp_'+fz);
}
$('c1init').style.display="none";
$('c2init').style.display="none";
$('c3init').style.display="none";
$('cbox1').style.display="block";
$('cbox2').style.display="block";
$('cbox3').style.display="block";
} else {
ACmd('ioconf.xml',ioCf);
}
}
ACmd('ioconf.xml',ioCf);
ftr();
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script src=/js/d.js></script>
<script>hdr();</script>
<div id=content >
<h1>I/O Config</h1>
<hr><h2>${{Digital Inputs}}$</h2>
<div id=c1init>${{LOADING}}$...</div>
<div class=configbox id=cbox1 style="display:none"></div>
<hr><h2>${{Analog Inputs}}$</h2>
<div id=c3init>${{LOADING}}$...</div>
<div class=configbox id=cbox3 style="display:none">
</div>
<hr><h2>${{Outputs}}$</h2>
<div id=c2init>${{LOADING}}$...</div>
<div class=configbox id=cbox2 style="display:none">
</div>
</div>
<script>
var ho="";
var hi="";
function chRelOpt(iz)
{
os=$('otype_'+iz);
osel=os.selectedIndex;
oselv=parseInt(os[osel].value);
nrel=0;
seq="none";
ctxdiv='block';
if(oselv>0)
nrel=1;
if(oselv>=0xf0)
nrel=2;
if(oselv==0xff)
{
nrel=255;
seq="block";
nrel=0;
ctxdiv='none';
}
if(oselv==244)
$('og'+iz).style.display="block";
else
$('og'+iz).style.display="none";
$('ctxd'+iz).style.display=ctxdiv;
for(nr=1;nr<=2;nr++)
{
nrz=zfill(nr,2);
rdiv="none";
if(nr<=nrel){rdiv='block';}
$('rdiv_'+iz+'_'+nrz).style.display=rdiv;
}
$('seq'+iz).style.display=seq;
}
function addROpt()
{
for(i=1;i<=12;i++)
{
ho=" ";
var iz=zfill(i,2);
ho+='<div id=ctxd'+iz+' style="display:none"><b> Ctx: <select name=o_01_'+iz+'_00_00></b>';
for(k in DmCtx)
{
ho+='<option value="'+DmCtx[k]+'">'+k+'</option>';
}
ho+='</select><br /><br />';
// Output per cancelli
ho+='<div id=og'+iz+' style="display:none"><b>${{startt}}$: </b><input type=text size=3 name=o_12_'+iz+'_00_00 value=0><b>${{opent}}$: </b><input type=text size=3 name=o_13_'+iz+'_00_00 value=0><b>${{pauset}}$: </b><input type=text size=3 name=o_14_'+iz+'_00_00 value=0><br/><b>${{Banging}}$:</b><select name=o_15_'+iz+'_00_00><option value=0>${{No}}$</option><option value=1>${{Yes}}$</option></select></div>';
// Fine output per cancelli
ho+='<br/></div>';
for(nr=1;nr<=2;nr++)
{
var nrz=zfill(nr,2);
ho+='<div id=rdiv_'+iz+'_'+nrz+' style="display:none"><hr><b> R'+nr+': </b><select name=o_05_'+iz+'_'+nrz+'_00><option value="0">${{None}}$</option>';
for(rn=1;rn<=12;rn++)
{
ho+='<option value='+rn+'>${{Relay}}$ '+rn+'</option>';
}
ho+='</select>'+
'<select name=o_07_'+iz+'_'+nrz+'_00><option value=0>NA (${{Open}}$)</option><option value=1>NC (${{Close}}$)</option><option value=2>${{Save}}$</option></select><br/>'+
'<b>${{runtime}}$: </b><input type=text size=3 name=o_09_'+iz+'_'+nrz+'_00 value=0>'+
'<b> ${{Retard}}$: <b><input type=text size=3 name=o_08_'+iz+'_'+nrz+'_00 value=0>'+
'<br/><b>${{break delay}}$: <b><input type=text size=3 name=o_06_'+iz+'_'+nrz+'_00 value=0>'+
'<b>${{rearm}}$: <b><input type=text size=3 name=o_11_'+iz+'_'+nrz+'_00 value=0>'+
'<b> ${{A Max}}$: <b><input type=text size=3 name=o_03_'+iz+'_'+nrz+'_00 value=160>'+
'<br/></div>';
}
ho+='<div id=seq'+iz+' style="display:none">${{SEQUENCE}}$</div>';
$("ropt_"+i).innerHTML=ho;
}
}
function chInOpt(iz,tz,sel,i)
{
osel=sel.selectedIndex;
oselv=parseInt(sel[osel].value);
maxact=0;
if(oselv)
{
if(oselv<160) // 0xa0
maxact=1;
else if(oselv<208) // 0xd0
maxact=2;
else
maxact=3;
}
if(i>12)
maxact=3;
for(a=1;a<=3;a++) {
actvis="none";
if(a<=maxact) {actvis="block";}
$('adiv'+iz+tz+'_'+a).style.display=actvis;
}
}
function addInputOpts(iz,tz,i,pulse)
{
var hi="";
for(a=1;a<=3;a++) {
hi+='<div id=adiv'+iz+tz+'_'+a+' style="display:none">';
if(a>1) { hi+='<br /><hr><br/>'; }
hi+='<b>${{action}}$ '+a+': </b><input type=text size=25 name=i_02_'+iz+'_'+tz+'_0'+a+' value="${{wait}}$..."><br/>';
hi+='<b> ${{msg}}$:</b><select name=i_07_'+iz+'_'+tz+'_0'+a+'>';
for(k in DmMsgType)
{
hi+='<option value="'+DmMsgType[k]+'">'+k+'</option>';
}
hi+='</select>';
hi+='<b> ${{ctx}}$:</b><select name=i_03_'+iz+'_'+tz+'_0'+a+'>';
for(k in DmCtx)
{
hi+='<option value="'+DmCtx[k]+'">'+k+'</option>';
}
hi+='</select><br/>';
hi+='<b> ${{act}}$:</b><select name=i_01_'+iz+'_'+tz+'_0'+a+'>';
for(k in DmAct)
{
hi+='<option value="'+DmAct[k]+'">'+k+'</option>';
}
hi+='</select>';
tval="${{Time}}$";
if(pulse)
{
tval="${{Time/Count}}$";
}
else if(i>12)
{
if(a==2)
tval="${{Low}}$";
if(a>2)
tval="${{Hi}}$";
}
hi+='<b> '+tval+': </b><input type=text size=3 name=i_10_'+iz+'_'+tz+'_0'+a+' value=0>';
hi+='<br/><b> ${{Opt}}$:</b><select name=i_14_'+iz+'_'+tz+'_0'+a+'>';
for(k in DmOpt)
{
hi+='<option value="'+DmOpt[k]+'">'+k+'</option>';
}
hi+='</select>';
hi+='<input type=text size=15 name=i_15_'+iz+'_'+tz+'_0'+a+' value="">';
hi+='<br/><b> ${{Dst}}$: </b><input type=text size=15 name=i_04_'+iz+'_'+tz+'_0'+a+' value="0.0.0.0">';
hi+='</div>';
}
return hi;
}
function addInp(i,seld,name)
{
pulse=0;
InpT=new Object();
for(k in seld){InpT[k]=seld[k];}
if($w.DmBoard=='DMRv1')
{
if(i<9 && i>4)
{
for(k in DmISR1){InpT[k]=DmISR1[k];}
pulse=1;
}
} else { // DMRv3
if(i<5)
{
for(k in DmISR1){InpT[k]=DmISR1[k];}
pulse=1;
}
}
var iz=zfill(i,2);
hi+='<form name=diginp_'+iz+'>'+
'<b>'+name+' ${{name}}$:</b><input type=text size=20 name=i_08_'+iz+'_00_00 value="${{wait}}$...">'+
'<span onClick="toggleMe(\'inp'+i+'\',this);" style="padding:1px 1px" class="domoB pressB grayO grayB">${{Expand}}$ &or;</span><br/>'+
'<div id=inp'+i+' style="background-color: #EFEFEF; display:none;">'+
'<div class="tabf" id=tabf-'+i+'>'+
'<div id=tab_1-'+i+' class="tabon" onclick="tabC.chTab(this,'+i+');">${{Status}}$ Default</div>'+
'<div id=tab_2-'+i+' class="taboff" onclick="tabC.chTab(this,'+i+');">${{Status}}$ 2</div>'+
'<div id=tab_3-'+i+' class="taboff" onclick="tabC.chTab(this,'+i+');">${{Status}}$ 3</div>'+
'<div id=tab_4-'+i+' class="taboff" onclick="tabC.chTab(this,'+i+');">${{Status}}$ 4</div>'+
"</div>";
for(t=1;t<=4;t++)
{
var tz=zfill(t,2);
hi+='<div id=tab_'+t+'-'+i+'_data class="tcon" style="background-color:#BBBBBB;display:';
if(t==1) {hi+='table;"><div>';} else {hi+='none;"><div>';}
hi+='<b>${{Status name}}$: </b><input type=text size=25 name=i_09_'+iz+'_'+tz+'_00 value="${{wait}}..."><br/>'+
'<b>${{Enabled}}$:</b><select name=i_05_'+iz+'_'+tz+'_00><option value=0>${{No}}$</option><option value=1>${{Yes}}$</option></select>'+
' <b> ${{type}}$: </b><select name=i_11_'+iz+'_'+tz+'_00 onChange="chInOpt(\''+iz+'\',\''+tz+'\',this,'+i+');">';
for(k in InpT)
{
hi+='<option value="'+InpT[k]+'">'+k+'</option>';
}
hi+='</select><br/>'+
'<b>${{Min time}}$: </b><input type=text size=3 name=i_06_'+iz+'_'+tz+'_00 value=0>';
if(i>12) {
hi+='<b>${{Min val}}$: </b><input type=text size=3 name=i_12_'+iz+'_'+tz+'_00 value=0>'+
'<b>${{Max val}}$: </b><input type=text size=3 name=i_13_'+iz+'_'+tz+'_00 value=0>';
}
hi+='<hr>'+
'<div id=iopt_'+iz+'_'+tz+'>';
hi+=addInputOpts(iz,tz,i,pulse);
hi+='</div></div></div>';
}
delete InpT;
var fna='diginp_'+iz;
hi+='<span class="domoB pressB grayO grayB" onclick="hOpt(\''+fna+'\');sForm(\''+fna+'\',\'/ioconf.xml\',null);sOpt(\''+fna+'\');">${{Save}}$</span></form></div>';
}
for(i=1;i<=12;i++)
{
var iz=zfill(i,2);
addInp(i,DmInputType,'${{Input}}$ '+i);
// FINE INPUT
ho+='<form name=relays_'+iz+'>'+
'<b>${{Device name}}$ '+i+':</b> <input type=text size=20 name=o_04_'+iz+'_00_00 value="${{wait}}$..."><span onClick="toggleMe(\'out'+i+'\',this);" style="padding:1px 1px" class="domoB pressB grayO grayB">${{Expand}}$ &or;</span><br />'+
'<div id=out'+i+' style="background-color:#BBBBBB;display:none;">'+
'<b>${{Enabled}}$:</b><select name=o_02_'+iz+'_00_00><option value=0>${{No}}$</option><option value=1>${{Yes}}$</option></select>'+
' <b>${{Output type}}$: </b><select id=otype_'+iz+' name=o_10_'+iz+'_00_00 onChange="chRelOpt(\''+iz+'\');">';
for(k in DmOutputType)
{
ho+='<option value="'+DmOutputType[k]+'">'+k+'</option>';
}
ho+='</select><br/>'+
'<div id=ropt_'+i+'></div>'+
// FINE DEVICE
'<span class="domoB pressB grayO grayB" onclick="sForm(\'relays_'+iz+'\',\'/ioconf.xml\',null);">${{Save}}$</span>'+
'</div></form>';
}
$("cbox1").innerHTML+=hi+"</div>";
$("cbox2").innerHTML+=ho+"</div>";
hi="";
for(i=1;i<3;i++)
{
addInp(i+12,DmAnType,'${{Analog}}$ '+i);
}
$("cbox3").innerHTML+=hi+"</div>";
for(i=1;i<15;i++)
{
tabC.addTabs("tabf-"+i,i);
}
addROpt();
function setC(el,val)
{
var nname=el.nodeName;
if(el.name!="save")
{
if(nname=='SELECT')
{
l=el.length;
while(l){
if(el[--l].value==parseInt(val)){
el.selectedIndex=l;
l=0;
}
}
} else {
el.value=val;
}
}
}
function ioCf(xDt)
{
if(xDt)
{
for(f=1;f<15;f++)
{
var iname=getX(xDt,'i'+f);
var fz=zfill(f,2);
ie=$d.forms['diginp_'+fz];
el=ie.elements;
el["i_08_"+fz+"_00_00"].value=iname;
for(t=1;t<=4;t++)
{
tz=zfill(t,2);
var ix=getX(xDt,'i'+f+'s'+t);
var ixv=ix.split(";");
setC(el["i_09_"+fz+"_"+tz+"_00"],ixv[0]);
setC(el["i_06_"+fz+"_"+tz+"_00"],ixv[1]);
setC(el["i_05_"+fz+"_"+tz+"_00"],ixv[2]);
setC(el["i_11_"+fz+"_"+tz+"_00"],ixv[3]);
co=4;
for(ac=1;ac<=3;ac++)
{
acz=zfill(ac,2);
setC(el["i_02_"+fz+"_"+tz+"_"+acz],ixv[co]);
setC(el["i_04_"+fz+"_"+tz+"_"+acz],ixv[co+1]);
setC(el["i_10_"+fz+"_"+tz+"_"+acz],ixv[co+2]);
setC(el["i_03_"+fz+"_"+tz+"_"+acz],ixv[co+3]);
setC(el["i_07_"+fz+"_"+tz+"_"+acz],ixv[co+4]);
setC(el["i_01_"+fz+"_"+tz+"_"+acz],ixv[co+5]);
setC(el["i_14_"+fz+"_"+tz+"_"+acz],ixv[co+6]);
setC(el["i_15_"+fz+"_"+tz+"_"+acz],ixv[co+7]);
//co+=6;
co+=8;
}
if(f>12) {
setC(el["i_12_"+fz+"_"+tz+"_00"],ixv[co]);
setC(el["i_13_"+fz+"_"+tz+"_00"],ixv[co+1]);
}
chInOpt(fz,tz,el['i_11_'+fz+'_'+tz+'_00'],f);
}
if(f<13)
{
var ox=getX(xDt,'o'+f);
de=$d.forms['relays_'+fz];
el=de.elements;
var oxv=ox.split(";");
el["o_04_"+fz+"_00_00"].value=oxv[0]; // Output Name
setC(el["o_01_"+fz+"_00_00"],oxv[1]);
setC(el["o_09_"+fz+"_01_00"],oxv[2]);
setC(el["o_09_"+fz+"_02_00"],oxv[3]);
setC(el["o_06_"+fz+"_01_00"],oxv[4]);
setC(el["o_11_"+fz+"_01_00"],oxv[5]);
setC(el["o_06_"+fz+"_02_00"],oxv[6]);
setC(el["o_11_"+fz+"_02_00"],oxv[7]);
setC(el["o_08_"+fz+"_01_00"],oxv[8]);
setC(el["o_08_"+fz+"_02_00"],oxv[9]);
setC(el["o_05_"+fz+"_01_00"],oxv[10]);
setC(el["o_05_"+fz+"_02_00"],oxv[11]);
setC(el["o_07_"+fz+"_01_00"],oxv[12]);
setC(el["o_07_"+fz+"_02_00"],oxv[13]);
setC(el["o_03_"+fz+"_01_00"],oxv[14]);
setC(el["o_03_"+fz+"_02_00"],oxv[15]);
setC(el["o_10_"+fz+"_00_00"],oxv[16]);
setC(el["o_02_"+fz+"_00_00"],oxv[17]);
setC(el["o_12_"+fz+"_00_00"],oxv[18]);
setC(el["o_13_"+fz+"_00_00"],oxv[19]);
setC(el["o_14_"+fz+"_00_00"],oxv[20]);
setC(el["o_15_"+fz+"_00_00"],oxv[21]);
chRelOpt(fz);
}
sOpt('diginp_'+fz);
}
$('c1init').style.display="none";
$('c2init').style.display="none";
$('c3init').style.display="none";
$('cbox1').style.display="block";
$('cbox2').style.display="block";
$('cbox3').style.display="block";
} else {
ACmd('ioconf.xml',ioCf);
}
}
ACmd('ioconf.xml',ioCf);
ftr();
</script>
<r>
<i1>~i(1,0)~</i1>
<i2>~i(2,0)~</i2>
<i3>~i(3,0)~</i3>
<i4>~i(4,0)~</i4>
<i5>~i(5,0)~</i5>
<i6>~i(6,0)~</i6>
<i7>~i(7,0)~</i7>
<i8>~i(8,0)~</i8>
<i9>~i(9,0)~</i9>
<i10>~i(10,0)~</i10>
<i11>~i(11,0)~</i11>
<i12>~i(12,0)~</i12>
<i13>~i(13,0)~</i13>
<i14>~i(14,0)~</i14>
<i1s1>~i(1,1)~</i1s1>
<i1s2>~i(1,2)~</i1s2>
<i1s3>~i(1,3)~</i1s3>
<i1s4>~i(1,4)~</i1s4>
<i2s1>~i(2,1)~</i2s1>
<i2s2>~i(2,2)~</i2s2>
<i2s3>~i(2,3)~</i2s3>
<i2s4>~i(2,4)~</i2s4>
<i3s1>~i(3,1)~</i3s1>
<i3s2>~i(3,2)~</i3s2>
<i3s3>~i(3,3)~</i3s3>
<i3s4>~i(3,4)~</i3s4>
<i4s1>~i(4,1)~</i4s1>
<i4s2>~i(4,2)~</i4s2>
<i4s3>~i(4,3)~</i4s3>
<i4s4>~i(4,4)~</i4s4>
<i5s1>~i(5,1)~</i5s1>
<i5s2>~i(5,2)~</i5s2>
<i5s3>~i(5,3)~</i5s3>
<i5s4>~i(5,4)~</i5s4>
<i6s1>~i(6,1)~</i6s1>
<i6s2>~i(6,2)~</i6s2>
<i6s3>~i(6,3)~</i6s3>
<i6s4>~i(6,4)~</i6s4>
<i7s1>~i(7,1)~</i7s1>
<i7s2>~i(7,2)~</i7s2>
<i7s3>~i(7,3)~</i7s3>
<i7s4>~i(7,4)~</i7s4>
<i8s1>~i(8,1)~</i8s1>
<i8s2>~i(8,2)~</i8s2>
<i8s3>~i(8,3)~</i8s3>
<i8s4>~i(8,4)~</i8s4>
<i9s1>~i(9,1)~</i9s1>
<i9s2>~i(9,2)~</i9s2>
<i9s3>~i(9,3)~</i9s3>
<i9s4>~i(9,4)~</i9s4>
<i10s1>~i(10,1)~</i10s1>
<i10s2>~i(10,2)~</i10s2>
<i10s3>~i(10,3)~</i10s3>
<i10s4>~i(10,4)~</i10s4>
<i11s1>~i(11,1)~</i11s1>
<i11s2>~i(11,2)~</i11s2>
<i11s3>~i(11,3)~</i11s3>
<i11s4>~i(11,4)~</i11s4>
<i12s1>~i(12,1)~</i12s1>
<i12s2>~i(12,2)~</i12s2>
<i12s3>~i(12,3)~</i12s3>
<i12s4>~i(12,4)~</i12s4>
<i13s1>~i(13,1)~</i13s1>
<i13s2>~i(13,2)~</i13s2>
<i13s3>~i(13,3)~</i13s3>
<i13s4>~i(13,4)~</i13s4>
<i14s1>~i(14,1)~</i14s1>
<i14s2>~i(14,2)~</i14s2>
<i14s3>~i(14,3)~</i14s3>
<i14s4>~i(14,4)~</i14s4>
<o1>~o(1)~</o1>
<o2>~o(2)~</o2>
<o3>~o(3)~</o3>
<o4>~o(4)~</o4>
<o5>~o(5)~</o5>
<o6>~o(6)~</o6>
<o7>~o(7)~</o7>
<o8>~o(8)~</o8>
<o9>~o(9)~</o9>
<o10>~o(10)~</o10>
<o11>~o(11)~</o11>
<o12>~o(12)~</o12>
</r>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script src=/js/d.js></script>
<script>hdr();</script>
<div id=content>
<div id=status>
<div id=load style="display:none">No data</div>
<div id=display>
<div>
<p>RELAYS:<br/><span class=relays id=rl>
</span></p>
<p>INPUTS:<br/>
<span id=ip></span>
</p>
<p>ANALOGS:<br/>
<span>AN1: </span><span id=an1></span></br>
<span>AN2: </span><span id=an2></span>
</p>
</div>
</div>
</div>
</div>
<script>
rl="|";
ip="";
for(i=1;i<=12;i++)
{
rl+='<a id=rel'+i+' onclick="ACmd(\'/cgi/relays.cgi?rel='+i+'\');">'+i+'</a>'+
'<span style="font-size:9px;" id="cs'+i+'">'+i+'</span>|';
ip+='<span id=inp'+i+'>'+i+'</span> &nbsp;';
}
$('rl').innerHTML=rl;
$('ip').innerHTML=ip;
function aLoopCB(xDt) {
if(!xDt)
{
$('display').style.display='none';
$('load').style.display='inline';
return;
}
$('load').style.display='none';
$('display').style.display='inline';
for(i=1;i<13;i++) {
if(getX(xDt,'r'+i)=='1')
{
$('rel'+i).style.color='#090';
$('cs'+i).innerHTML=parseInt(getX(xDt,'p'+i))/10;
}
else
{
$('rel'+i).style.color='#ddd';
$('cs'+i).innerHTML='0';
}
}
for(i=1;i<13;i++) {
if(getX(xDt,'i'+i)=='up')
{
$('inp'+i).style.color='#3366ff';
}
else
{
$('inp'+i).style.color='#e00000';
}
}
$('an1').innerHTML=getX(xDt,'a1');
$('an2').innerHTML=getX(xDt,'a2');
}
ftr();
</script>
K 25
svn:wc:ra_dav:version-url
V 58
/microchip/!svn/ver/636/trunk/Unixmedia/Web/CommonPages/js
END
hdr.html2js
K 25
svn:wc:ra_dav:version-url
V 70
/microchip/!svn/ver/581/trunk/Unixmedia/Web/CommonPages/js/hdr.html2js
END
constant.js.prepend
K 25
svn:wc:ra_dav:version-url
V 79
/microchip/!svn/ver/1060/trunk/Unixmedia/Web/CommonPages/js/constant.js.prepend
END
opt.js.postpend
K 25
svn:wc:ra_dav:version-url
V 74
/microchip/!svn/ver/594/trunk/Unixmedia/Web/CommonPages/js/opt.js.postpend
END
ftr.html2js
K 25
svn:wc:ra_dav:version-url
V 70
/microchip/!svn/ver/990/trunk/Unixmedia/Web/CommonPages/js/ftr.html2js
END
d.js
K 25
svn:wc:ra_dav:version-url
V 63
/microchip/!svn/ver/636/trunk/Unixmedia/Web/CommonPages/js/d.js
END
10
dir
793
https://svn.unixmedia.net/microchip/trunk/Unixmedia/Web/CommonPages/js
https://svn.unixmedia.net/microchip
2012-12-11T14:23:00.559274Z
636
nextime
9872420c-b032-40af-96d2-e8d557942bcc
hdr.html2js
file
2012-10-18T07:46:43.000000Z
64d1b37a9bff44ea827cba15613bc53c
2012-10-18T08:08:15.359631Z
581
nextime
1587
constant.js.prepend
file
1060
2013-09-20T08:47:10.000000Z
12f1b8e446ee12b210d0c66638afaab5
2013-09-20T19:36:58.918824Z
1060
nextime
has-props
3023
opt.js.postpend
file
2012-10-18T00:41:13.000000Z
e009fb90962125d27e1d661a46645f9c
2012-10-18T11:39:08.873494Z
594
nextime
1133
ftr.html2js
file
990
2013-07-23T15:10:26.000000Z
5a2259f265d073efcc5d69176dcebdd6
2013-08-13T00:59:55.756042Z
990
nextime
119
d.js
file
2012-11-23T15:20:53.000000Z
e37ff8df6932735f9a214a365a8d0640
2012-12-11T14:23:00.559274Z
636
nextime
has-props
8791
//DmAct=new Object();
//personObj.firstname="John";
DmAct={
${{None}}$:0,
${{On}}$:1,
${{Off}}$:2,
${{Change}}$:3,
${{Openit}}$:4,
${{Closeit}}$:5,
${{Up}}$:6,
${{Down}}$:7,
${{Stop}}$:8,
${{Start}}$:9,
//${{StopTimered}}$:0x0a,
${{StartTimered}}$:11,
${{BlockUnblock}}$:0x0c,
${{Block}}$:0x0d,
${{Unblock}}$:0x0e,
${{Hi}}$:15,
${{Low}}$:16,
//${{Equal}}$:0x11,
//${{Expired}}$:0x12,
//${{Timedout}}$:0x123,
//${{Changed}}$:0x14,
//${{SwitchedOn}}$:0x15,
//${{SwitchedOff}}$:0x16,
${{Call}}$:23,
//${{Answer}}$:0x18,
${{Ring}}$:25,
${{Play}}$:26,
${{Pause}}$:27,
${{PauseClosing}}$:28,
${{PauseOpening}}$:29,
${{Next}}$:30,
${{Board}}$:253,
${{Debug}}$:255
};
DmMsgType={
${{None}}$:0,
//${{Request}}$:1,
${{Action}}$:2,
${{Ack}}$:3,
${{Notify}}$:4,
//${{Notifyconf}}$:5,
${{Requestconf}}$:6,
//${{Setconf}}$:7,
${{Debug}}$:255
};
DmCtx={
${{None}}$:0,
${{Light}}$:1,
${{Socket}}$:2,
${{Blind}}$:3,
${{Sensor}}$:4,
${{Door}}$:5,
${{Window}}$:6,
${{Valvle}}$:7,
${{Status}}$:8,
${{Scenary}}$:9,
${{Alarm}}$:10,
${{Citophone}}$:11,
${{Generic_Switch}}$:12,
${{Thermostat}}$:13,
${{Gate}}$:14,
${{Audio}}$:15,
${{Video}}$:16,
${{Phone}}$:17,
${{Tv}}$:18,
${{Irrigation}}$:19,
${{Timer}}$:20,
${{Internet}}$:21,
${{Message}}$:22,
${{Rfid}}$:23,
${{Pump}}$:24,
${{Motor}}$:25,
${{Tent}}$:26,
${{Rtc}}$:32,
${{Sequence}}$:33,
${{System}}$:65534,
${{User}}$:65535
};
DmISR1={
${{PulseOpen}}$:144,
${{PulseOpenCount}}$:145,
${{PulseClose}}$:146,
${{PulseCloseCount}}$:147,
${{PulseOpenDouble}}$:192,
${{PulseCloseDouble}}$:193
};
/*
DmISR2={
${{PulseChange}}$:0x94,
${{PulseChangeCount}}$:0x95,
${{PulseChangeDouble}}$:0xc2
};
*/
DmInputType={
${{None}}$:0,
${{SingleClick}}$:1,
//${{LongClick}}$:0x02,
${{Change}}$:3,
${{ContinuosOpen}}$:4,
${{ContinuosClose}}$:5,
${{DoubleClick}}$:160,
${{SingleAndLong}}$:161,
//${{SingleAndContinuosClose}}$:0xa2,
${{OpenClose}}$:163,
${{ContinuosOpenClose}}$:164,
${{TripleClick}}$:208,
//${{Seq2}}$:176,
${{Seq2Step}}$:177,
//${{Seq3}}$:224,
${{Seq3Step}}$:225
};
DmAnType={
${{None}}$:0,
${{Generic}}$:1,
${{Temperature}}$:2,
${{Humidity}}$:3,
${{Current}}$:4,
${{Wind}}$:5,
${{Speed}}$:6,
${{Pressure}}$:7,
${{Flux}}$:8,
${{Lighting}}$:9,
${{Level}}$:10
};
DmOutputType={
${{None}}$:0,
${{OnOff}}$:1,
//${{Pulse}}$:0x02,
//${{Temporized}}$:0x03,
//${{Intermittent}}$:0x04,
//${{IntermittentTemporized}}$:0x05,
${{Signal}}$:6,
${{Dev2RelaysExclusive}}$:240,
${{Dev2RelaysInclusiveOn}}$:241,
${{Dev2RelaysInclusiveOff}}$:242,
//${{Dev2RelaysAlternateSeq}}$:0xf3,
${{OpenClose2Relays}}$:0xf4
//${{Sequenza}}$:0xff
};
DmOpt={
${{None}}$:0,
${{RGB}}$:1,
${{PRESET}}$:2,
${{DIMMER}}$:3,
${{HEX}}$:255
};
/**
* Determines when a request is considered "timed out"
*/
var timeOutMS = 6000; //ms
/**
* Stores a queue of AJAX events to process
*/
var aList = new Array();
$d=document;
$w=window;
function $(v){return $d.getElementById(v)}
function $e(v){return encodeURIComponent(v).replace("%5B", "[").replace("%5D","]").replace("%7C","|")}
/**
* Initiates a new AJAX command
*
* @param the url to access
* @param the document ID to fill, or a function to call with response XML (optional)
* @param true to repeat this call indefinitely (optional)
* @param a URL encoded string to be submitted as POST data (optional)
*/
function ACmd(url, cnt, repeat, data)
{
// Set up our object
var newA = new Object();
var ttime = new Date();
newA.url = url;
newA.cnt = cnt;
newA.repeat = repeat;
newA.aReq = null;
// Create and send the request
if($w.XMLHttpRequest) {
newA.aReq = new XMLHttpRequest();
newA.aReq.open((data==null)?"GET":"POST", newA.url, true);
newA.aReq.send(data);
// If we're using IE6 style (maybe 5.5 compatible too)
} else if($w.ActiveXObject) {
newA.aReq = new ActiveXObject("Microsoft.XMLHTTP");
if(newA.aReq) {
newA.aReq.open((data==null)?"GET":"POST", newA.url, true);
newA.aReq.send(data);
}
}
newA.lastCalled = ttime.getTime();
// Store in our array
aList.push(newA);
}
/**
* Loops over all pending AJAX events to determine
* if any action is required
*/
function pollAJAX() {
var curA = new Object();
var ttime = new Date();
var elapsed;
// Read off the aList objects one by one
for(i = aList.length; i > 0; i--)
{
curA = aList.shift();
if(!curA)
continue;
elapsed = ttime.getTime() - curA.lastCalled;
// If we suceeded
if(curA.aReq.readyState == 4 && curA.aReq.status == 200) {
// If it has a cnt, write the result
if(typeof(curA.cnt) == 'function'){
curA.cnt(curA.aReq.responseXML.documentElement);
} else if(typeof(curA.cnt) == 'string') {
$(curA.cnt).innerHTML = curA.aReq.responseText;
} // (otherwise do nothing for null values)
curA.aReq.abort();
curA.aReq = null;
// If it's a repeatable request, then do so
if(curA.repeat)
ACmd(curA.url, curA.cnt, curA.repeat);
continue;
}
// If we've waited over 1 second, then we timed out
if(elapsed > timeOutMS) {
// Invoke the user function with null input
if(typeof(curA.cnt) == 'function'){
curA.cnt(null);
}
curA.aReq.abort();
curA.aReq = null;
// If it's a repeatable request, then do so
if(curA.repeat)
ACmd(curA.url, curA.cnt, curA.repeat);
continue;
}
// Otherwise, just keep waiting
aList.push(curA);
}
// Call ourselves again in 250ms
setTimeout("pollAJAX()",250);
}// End pollA
/**
* Parses the xmlResponse returned by an XMLHTTPRequest object
*
* @param the xDt returned
* @param the fld to search for
*/
function getX(xDt, fld) {
try {
if(xDt.getElementsByTagName(fld)[0].firstChild.nodeValue)
return xDt.getElementsByTagName(fld)[0].firstChild.nodeValue;
else
return null;
} catch(err) { return null; }
}
var tabC = {
tabAr: new Array(),
classOn: "tabon",
classOff: "taboff",
addTabs: function (tabCont, tid) {
this.tabAr[tid] = new Array();
tabs = $(tabCont).getElementsByTagName("div");
for (x in tabs) {
if (typeof(tabs[x].id) != "undefined") {
this.tabAr[tid].push(tabs[x].id);
}
}
},
chTab: function (element, tid) {
for (x in this.tabAr[tid]) {
tabItem = this.tabAr[tid][x];
dataElement = $(tabItem + "_data");
if (dataElement) {
if (dataElement.style.display != "none") {
dataElement.style.display = "none";
}
}
tabEl = $(tabItem);
if (tabEl) {
if (tabEl.className != this.classOff) {
tabEl.className = this.classOff;
}
}
}
$(element.id + "_data").style.display = "block";
element.className = this.classOn;
}
};
function toggleMe(a, b){
var e=$(a);
if(!e)return true;
if(e.style.display=="none"){
e.style.display="block"
b.innerHTML="Collapse &and;";
} else {
e.style.display="none"
b.innerHTML="Expand &or;";
}
return true;
}
function dh(d,l)
{
   var d=d.split(',');
   var r='';
   var t;
   for(var i=0;i<l;i++)
   {
      if(i<d.length)
         t=d[i].replace(/\D/g,'');
      else
         t='0';
      t=parseInt(t);
      if(typeof(t)=='undefined')
t=0;
      r+=zfill(t.toString(16),2);
    
   }
   return r;
}
function hd(h,l)
{
   var r='';
   for(var i=0;i<l*2;i+=2)
   {
      r+=(parseInt(h[i]+h[i+1],16)+',').replace(NaN,'0');
   }    
   return r.slice(0,-1);
}
function zfill(str, width){
var result = String(str);
var num_z = width - result.length;
for(var i=num_z; i > 0; i--){
result = '0' + result;
}
return result;
}
var TimeToFade = 2500.0;
function animFad(lastTick, eid)
{
var curTick = new Date().getTime();
var elapsedTicks = curTick - lastTick;
var element = $(eid);
if(element.FadeTimeLeft <= elapsedTicks)
{
element.style.opacity = element.FadeState == 1 ? '1' : '0';
element.style.filter = 'alpha(opacity = '
+ (element.FadeState == 1 ? '100' : '0') + ')';
element.FadeState = element.FadeState == 1 ? 2 : -2;
if(typeof(fadeCBack) == 'function'){
fadeCBack(element);
}
return;
}
element.FadeTimeLeft -= elapsedTicks;
var newOpVal = element.FadeTimeLeft/TimeToFade;
if(element.FadeState == 1)
newOpVal = 1 - newOpVal;
element.style.opacity = newOpVal;
element.style.filter = 'alpha(opacity = ' + (newOpVal*100) + ')';
setTimeout("animFad(" + curTick + ",'" + eid + "')", 33);
}
function opaque(eid)
{
var element = $(eid);
element.FadeState=2;
element.style.opacity='1';
element.style.filter = 'alpha(opacity=100)';
}
function fade(eid)
{
var element = $(eid);
if(element == null)
return;
if(element.FadeState == null)
{
if(element.style.opacity == null
|| element.style.opacity == ''
|| element.style.opacity == '1')
{
element.FadeState = 2;
}
else
{
element.FadeState = -2;
}
}
if(element.FadeState == 1 || element.FadeState == -1)
{
element.FadeState = element.FadeState == 1 ? -1 : 1;
element.FadeTimeLeft = TimeToFade - element.FadeTimeLeft;
}
else
{
element.FadeState = element.FadeState == 2 ? -1 : 1;
element.FadeTimeLeft = TimeToFade;
setTimeout("animFad(" + new Date().getTime() + ",'" + eid + "')", 33);
}
}
function sForm(fn,act,cback)
{
var f=$d.forms[fn];
var el=f.elements;
var s="";
for(i=0;i<el.length;i++)
{
if('value' in el[i]) {
if((el[i].type=='checkbox' && el[i].checked) || el[i].type!='checkbox') {
if(s!=""){s+="&";};
s+=$e(el[i].name)+"="+$e(el[i].value.replace(" ",""));
}
}
}
ACmd(act,cback,false,s);
}
function showDiv(eid, st)
{
if(st!="none")
{
$("stan").style.display="none";
opaque(eid);
$(eid).style.display=st;
fade(eid);
return true;
}
return false;
}
function fadeCBack(el)
{
el.style.display="none";
$("stan").style.display="block";
}
function upDMVars(xDt)
{
conlo=false;
$w.DmBoard=getX(xDt, 'board');
$('fwn').innerHTML=getX(xDt, 'fwname');
$('fwv').innerHTML=getX(xDt, 'fwver')+' - '+getX(xDt, 'stv');
$('dm').innerHTML=getX(xDt, 'defmac');
$('bd').innerHTML=getX(xDt, 'bd');
$('dt').innerHTML=getX(xDt, 'dt');
$('bo').innerHTML=$w.DmBoard;
$w.epoch=getX(xDt, 'epoch');
if(typeof(aFirstCB) == 'function'){
aFirstCB(xDt);
}
}
function upDMAj(xDt)
{
if(xDt)
{
if(conlo){upDMVars(xDt);}
$w.epoch=getX(xDt, 'epoch');
$('dt').innerHTML=getX(xDt, 'dt');
$('stan').innerHTML=getX(xDt, 'stan');
var stok=getX(xDt, 'stok');
var stf=getX(xDt, 'stfail');
if(!showDiv('stfail', stf)) {showDiv('stok', stok);}
} else {
showDiv('connf', 'block');
conlo=true;
}
if(typeof(aLoopCB)=='function'){
aLoopCB(xDt);
}
}
function init() {
ACmd('ajax.xml', upDMVars);
setTimeout("ACmd('ajax.xml', upDMAj, true)",300);
var menuchilds=$('menu').getElementsByTagName('a');
for(i=0;i<menuchilds.length;i++)
{
if(location.href==menuchilds[i].href)
{
menuchilds[i].style.backgroundColor='#003399';
}
}
}
//kick off the AJAX Updater
setTimeout("pollAJAX()",750);
$w.onload = init;
<div class=spacer>&nbsp;</div>
<div id=footer>Copyright &copy; 2010-2013 Unixmedia S.r.l.</div>
</div>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Domotika board</title>
<link href=/domotika.css rel=stylesheet type="text/css" />
<link rel="shortcut icon" href=/favicon.ico />
</head>
<body>
<div id=page>
<div style="padding: 0pt 0pt 5px 5px;"><img alt="Domotika" src="/img/domotika.gif"><span style="font-size:34px">&nbsp;&nbsp;Ambient Intelligence</span><span style="float:right"><fieldset>
<div><span><b>Fw name:</b>&nbsp;</span><span id=fwn></span></div>
<div><span><b>Fw version:</b>&nbsp;</span><span id=fwv></span></div>
<div><span><b>Serial/def MAC:</b>&nbsp;</span><span id=dm></span></div>
<div><span><b>Build date:</b>&nbsp;</span><span id=bd></span></div>
<div><span><b>Board:</b>&nbsp;</span><span id=bo></span></div>
</fieldset></span></div>
<div id=title><div><span class=left id=dt></span><span class=right>Domotika system</span></div></div>
<div id=menu>
<div class="ress ok" id=stok style="display:none;">OK Saved.</div>
<div class="ress fail" id=stfail style="display:none;">KO Error saving.</div>
<div class="ress fail" id=connf style="display:none;">NO CONNECTION.</div>
<div class="ress" id=stan></div>
<div>
<br/>
<a href=/index.htm>Home</a>
<a href=/ioconf.htm>I/O cfg</a>
<a href=/users.htm>Auth cfg</a>
<a href=/config.htm>other cfgs</a>
<a href=/netcfg.htm>Network cfg</a>
<a href=/upload.htm>save/restore cfg</a>
<a href=/reboot.htm?r onClick="return confirm(\'Are you sure?\', \'Reset board cfg\');">Restore defaults</a>
<a href=/reboot.htm onClick="return confirm(\'Are you sure?\', \'Reboot\');">Reboot</a>
</div>
</div>
function hOpt(f)
{
var f=$d.forms[f];
var el=f.elements;
var n;
for(i=0;i<el.length;i++)
{
var n=el[i].name.substring(0,5);
if(n=='i_15_'){
var n2=el['i_14_'+el[i].name.substring(5)].value;
if(n2==0)
el[i].value=zfill("0",18);
else if(n2!=255)
el[i].value=dh(el[i].value,9);
else {
while(el[i].value.length<18)
{
el[i].value=el[i].value+'0';
}
}
}
}
}
function sOpt(f)
{
var f=$d.forms[f];
var el=f.elements;
for(i=0;i<el.length;i++)
{
n=el[i].name.substring(0,5);
if(n=='i_15_'){
switch(el['i_14_'+el[i].name.substring(5)].value)
{
case '1':
el[i].value=hd(el[i].value,4);
break;
case '2':
el[i].value=hd(el[i].value,1);
break;
case '3':
el[i].value=hd(el[i].value,2);
break;
case '255':
break;
default:
el[i].value='';
}
}
}
}
//DmAct=new Object();
//personObj.firstname="John";
DmAct={
${{None}}$:0,
${{On}}$:1,
${{Off}}$:2,
${{Change}}$:3,
${{Openit}}$:4,
${{Closeit}}$:5,
${{Up}}$:6,
${{Down}}$:7,
${{Stop}}$:8,
${{Start}}$:9,
//${{StopTimered}}$:0x0a,
${{StartTimered}}$:11,
${{BlockUnblock}}$:0x0c,
${{Block}}$:0x0d,
${{Unblock}}$:0x0e,
${{Hi}}$:15,
${{Low}}$:16,
//${{Equal}}$:0x11,
//${{Expired}}$:0x12,
//${{Timedout}}$:0x123,
//${{Changed}}$:0x14,
//${{SwitchedOn}}$:0x15,
//${{SwitchedOff}}$:0x16,
${{Call}}$:23,
//${{Answer}}$:0x18,
${{Ring}}$:25,
${{Play}}$:26,
${{Pause}}$:27,
${{PauseClosing}}$:28,
${{PauseOpening}}$:29,
${{Next}}$:30,
${{Board}}$:253,
${{Debug}}$:255
};
DmMsgType={
${{None}}$:0,
//${{Request}}$:1,
${{Action}}$:2,
${{Ack}}$:3,
${{Notify}}$:4,
//${{Notifyconf}}$:5,
${{Requestconf}}$:6,
//${{Setconf}}$:7,
${{Debug}}$:255
};
DmCtx={
${{None}}$:0,
${{Light}}$:1,
${{Socket}}$:2,
${{Blind}}$:3,
${{Sensor}}$:4,
${{Door}}$:5,
${{Window}}$:6,
${{Valvle}}$:7,
${{Status}}$:8,
${{Scenary}}$:9,
${{Alarm}}$:10,
${{Citophone}}$:11,
${{Generic_Switch}}$:12,
${{Thermostat}}$:13,
${{Gate}}$:14,
${{Audio}}$:15,
${{Video}}$:16,
${{Phone}}$:17,
${{Tv}}$:18,
${{Irrigation}}$:19,
${{Timer}}$:20,
${{Internet}}$:21,
${{Message}}$:22,
${{Rfid}}$:23,
${{Pump}}$:24,
${{Motor}}$:25,
${{Tent}}$:26,
${{Rtc}}$:32,
${{Sequence}}$:33,
${{System}}$:65534,
${{User}}$:65535
};
DmISR1={
${{PulseOpen}}$:144,
${{PulseOpenCount}}$:145,
${{PulseClose}}$:146,
${{PulseCloseCount}}$:147,
${{PulseOpenDouble}}$:192,
${{PulseCloseDouble}}$:193
};
/*
DmISR2={
${{PulseChange}}$:0x94,
${{PulseChangeCount}}$:0x95,
${{PulseChangeDouble}}$:0xc2
};
*/
DmInputType={
${{None}}$:0,
${{SingleClick}}$:1,
//${{LongClick}}$:0x02,
${{Change}}$:3,
${{ContinuosOpen}}$:4,
${{ContinuosClose}}$:5,
${{DoubleClick}}$:160,
${{SingleAndLong}}$:161,
//${{SingleAndContinuosClose}}$:0xa2,
${{OpenClose}}$:163,
${{ContinuosOpenClose}}$:164,
${{TripleClick}}$:208,
//${{Seq2}}$:176,
${{Seq2Step}}$:177,
//${{Seq3}}$:224,
${{Seq3Step}}$:225
};
DmAnType={
${{None}}$:0,
${{Generic}}$:1,
${{Temperature}}$:2,
${{Humidity}}$:3,
${{Current}}$:4,
${{Wind}}$:5,
${{Speed}}$:6,
${{Pressure}}$:7,
${{Flux}}$:8,
${{Lighting}}$:9,
${{Level}}$:10
};
DmOutputType={
${{None}}$:0,
${{OnOff}}$:1,
//${{Pulse}}$:0x02,
//${{Temporized}}$:0x03,
//${{Intermittent}}$:0x04,
//${{IntermittentTemporized}}$:0x05,
${{Signal}}$:6,
${{Dev2RelaysExclusive}}$:240,
${{Dev2RelaysInclusiveOn}}$:241,
${{Dev2RelaysInclusiveOff}}$:242,
//${{Dev2RelaysAlternateSeq}}$:0xf3,
${{OpenClose2Relays}}$:0xf4
//${{Sequenza}}$:0xff
};
DmOpt={
${{None}}$:0,
${{RGB}}$:1,
${{PRESET}}$:2,
${{DIMMER}}$:3,
${{HEX}}$:255
};
//DmAct=new Object();
//personObj.firstname="John";
DmAct={
${{None}}$:0,
${{On}}$:1,
${{Off}}$:2,
${{Change}}$:3,
${{Open}}$:4,
${{Close}}$:5,
${{Up}}$:6,
${{Down}}$:7,
${{Stop}}$:8,
${{Start}}$:9,
//${{StopTimered}}$:0x0a,
${{StartTimered}}$:11,
${{BlockUnblock}}$:0x0c,
${{Block}}$:0x0d,
${{Unblock}}$:0x0e,
${{Hi}}$:15,
${{Low}}$:16,
//${{Equal}}$:0x11,
//${{Expired}}$:0x12,
//${{Timedout}}$:0x123,
//${{Changed}}$:0x14,
//${{SwitchedOn}}$:0x15,
//${{SwitchedOff}}$:0x16,
${{Call}}$:23,
//${{Answer}}$:0x18,
${{Ring}}$:25,
${{Play}}$:26,
${{Pause}}$:27,
${{PauseClosing}}$:28,
${{PauseOpening}}$:29,
${{Next}}$:30,
${{Board}}$:253,
${{Debug}}$:255
};
DmMsgType={
${{None}}$:0,
//${{Request}}$:1,
${{Action}}$:2,
${{Ack}}$:3,
${{Notify}}$:4,
//${{Notifyconf}}$:5,
${{Requestconf}}$:6,
//${{Setconf}}$:7,
${{Debug}}$:255
};
DmCtx={
${{None}}$:0,
${{Light}}$:1,
${{Socket}}$:2,
${{Blind}}$:3,
${{Sensor}}$:4,
${{Door}}$:5,
${{Window}}$:6,
${{Valvle}}$:7,
${{Status}}$:8,
${{Scenary}}$:9,
${{Alarm}}$:10,
${{Citophone}}$:11,
${{Generic_Switch}}$:12,
${{Thermostat}}$:13,
${{Gate}}$:14,
${{Audio}}$:15,
${{Video}}$:16,
${{Phone}}$:17,
${{Tv}}$:18,
${{Irrigation}}$:19,
${{Timer}}$:20,
${{Internet}}$:21,
${{Message}}$:22,
${{Rfid}}$:23,
${{Pump}}$:24,
${{Motor}}$:25,
${{Tent}}$:26,
${{Rtc}}$:32,
${{Sequence}}$:33,
${{System}}$:65534,
${{User}}$:65535
};
DmISR1={
${{PulseOpen}}$:144,
${{PulseOpenCount}}$:145,
${{PulseClose}}$:146,
${{PulseCloseCount}}$:147,
${{PulseOpenDouble}}$:192,
${{PulseCloseDouble}}$:193
};
/*
DmISR2={
${{PulseChange}}$:0x94,
${{PulseChangeCount}}$:0x95,
${{PulseChangeDouble}}$:0xc2
};
*/
DmInputType={
${{None}}$:0,
${{SingleClick}}$:1,
//${{LongClick}}$:0x02,
${{Change}}$:3,
${{ContinuosOpen}}$:4,
${{ContinuosClose}}$:5,
${{DoubleClick}}$:160,
${{SingleAndLong}}$:161,
//${{SingleAndContinuosClose}}$:0xa2,
${{OpenClose}}$:163,
${{ContinuosOpenClose}}$:164,
${{TripleClick}}$:208,
${{Seq2}}$:176,
${{Seq2Step}}$:177,
${{Seq3}}$:224,
${{Seq3Step}}$:225
};
DmAnType={
${{None}}$:0,
${{Generic}}$:1,
${{Temperature}}$:2,
${{Humidity}}$:3,
${{Current}}$:4,
${{Wind}}$:5,
${{Speed}}$:6,
${{Pressure}}$:7,
${{Flux}}$:8,
${{Lighting}}$:9,
${{Level}}$:10
};
DmOutputType={
${{None}}$:0,
${{OnOff}}$:1,
//${{Pulse}}$:0x02,
//${{Temporized}}$:0x03,
//${{Intermittent}}$:0x04,
//${{IntermittentTemporized}}$:0x05,
${{Signal}}$:6,
${{Dev2RelaysExclusive}}$:240,
${{Dev2RelaysInclusiveOn}}$:241,
${{Dev2RelaysInclusiveOff}}$:242,
//${{Dev2RelaysAlternateSeq}}$:0xf3,
${{OpenClose2Relays}}$:0xf4
//${{Sequenza}}$:0xff
};
DmOpt={
${{None}}$:0,
${{RGB}}$:1,
${{PRESET}}$:2,
${{DIMMER}}$:3,
${{HEX}}$:255
};
/**
* Determines when a request is considered "timed out"
*/
var timeOutMS = 6000; //ms
/**
* Stores a queue of AJAX events to process
*/
var aList = new Array();
$d=document;
$w=window;
function $(v){return $d.getElementById(v)}
function $e(v){return encodeURIComponent(v).replace("%5B", "[").replace("%5D","]").replace("%7C","|")}
/**
* Initiates a new AJAX command
*
* @param the url to access
* @param the document ID to fill, or a function to call with response XML (optional)
* @param true to repeat this call indefinitely (optional)
* @param a URL encoded string to be submitted as POST data (optional)
*/
function ACmd(url, cnt, repeat, data)
{
// Set up our object
var newA = new Object();
var ttime = new Date();
newA.url = url;
newA.cnt = cnt;
newA.repeat = repeat;
newA.aReq = null;
// Create and send the request
if($w.XMLHttpRequest) {
newA.aReq = new XMLHttpRequest();
newA.aReq.open((data==null)?"GET":"POST", newA.url, true);
newA.aReq.send(data);
// If we're using IE6 style (maybe 5.5 compatible too)
} else if($w.ActiveXObject) {
newA.aReq = new ActiveXObject("Microsoft.XMLHTTP");
if(newA.aReq) {
newA.aReq.open((data==null)?"GET":"POST", newA.url, true);
newA.aReq.send(data);
}
}
newA.lastCalled = ttime.getTime();
// Store in our array
aList.push(newA);
}
/**
* Loops over all pending AJAX events to determine
* if any action is required
*/
function pollAJAX() {
var curA = new Object();
var ttime = new Date();
var elapsed;
// Read off the aList objects one by one
for(i = aList.length; i > 0; i--)
{
curA = aList.shift();
if(!curA)
continue;
elapsed = ttime.getTime() - curA.lastCalled;
// If we suceeded
if(curA.aReq.readyState == 4 && curA.aReq.status == 200) {
// If it has a cnt, write the result
if(typeof(curA.cnt) == 'function'){
curA.cnt(curA.aReq.responseXML.documentElement);
} else if(typeof(curA.cnt) == 'string') {
$(curA.cnt).innerHTML = curA.aReq.responseText;
} // (otherwise do nothing for null values)
curA.aReq.abort();
curA.aReq = null;
// If it's a repeatable request, then do so
if(curA.repeat)
ACmd(curA.url, curA.cnt, curA.repeat);
continue;
}
// If we've waited over 1 second, then we timed out
if(elapsed > timeOutMS) {
// Invoke the user function with null input
if(typeof(curA.cnt) == 'function'){
curA.cnt(null);
}
curA.aReq.abort();
curA.aReq = null;
// If it's a repeatable request, then do so
if(curA.repeat)
ACmd(curA.url, curA.cnt, curA.repeat);
continue;
}
// Otherwise, just keep waiting
aList.push(curA);
}
// Call ourselves again in 250ms
setTimeout("pollAJAX()",250);
}// End pollA
/**
* Parses the xmlResponse returned by an XMLHTTPRequest object
*
* @param the xDt returned
* @param the fld to search for
*/
function getX(xDt, fld) {
try {
if(xDt.getElementsByTagName(fld)[0].firstChild.nodeValue)
return xDt.getElementsByTagName(fld)[0].firstChild.nodeValue;
else
return null;
} catch(err) { return null; }
}
var tabC = {
tabAr: new Array(),
classOn: "tabon",
classOff: "taboff",
addTabs: function (tabCont, tid) {
this.tabAr[tid] = new Array();
tabs = $(tabCont).getElementsByTagName("div");
for (x in tabs) {
if (typeof(tabs[x].id) != "undefined") {
this.tabAr[tid].push(tabs[x].id);
}
}
},
chTab: function (element, tid) {
for (x in this.tabAr[tid]) {
tabItem = this.tabAr[tid][x];
dataElement = $(tabItem + "_data");
if (dataElement) {
if (dataElement.style.display != "none") {
dataElement.style.display = "none";
}
}
tabEl = $(tabItem);
if (tabEl) {
if (tabEl.className != this.classOff) {
tabEl.className = this.classOff;
}
}
}
$(element.id + "_data").style.display = "block";
element.className = this.classOn;
}
};
function toggleMe(a, b){
var e=$(a);
if(!e)return true;
if(e.style.display=="none"){
e.style.display="block"
b.innerHTML="Collapse &and;";
} else {
e.style.display="none"
b.innerHTML="Expand &or;";
}
return true;
}
function dh(d,l)
{
   var d=d.split(',');
   var r='';
   var t;
   for(var i=0;i<l;i++)
   {
      if(i<d.length)
         t=d[i].replace(/\D/g,'');
      else
         t='0';
      t=parseInt(t);
      if(typeof(t)=='undefined')
t=0;
      r+=zfill(t.toString(16),2);
    
   }
   return r;
}
function hd(h,l)
{
   var r='';
   for(var i=0;i<l*2;i+=2)
   {
      r+=(parseInt(h[i]+h[i+1],16)+',').replace(NaN,'0');
   }    
   return r.slice(0,-1);
}
function zfill(str, width){
var result = String(str);
var num_z = width - result.length;
for(var i=num_z; i > 0; i--){
result = '0' + result;
}
return result;
}
var TimeToFade = 2500.0;
function animFad(lastTick, eid)
{
var curTick = new Date().getTime();
var elapsedTicks = curTick - lastTick;
var element = $(eid);
if(element.FadeTimeLeft <= elapsedTicks)
{
element.style.opacity = element.FadeState == 1 ? '1' : '0';
element.style.filter = 'alpha(opacity = '
+ (element.FadeState == 1 ? '100' : '0') + ')';
element.FadeState = element.FadeState == 1 ? 2 : -2;
if(typeof(fadeCBack) == 'function'){
fadeCBack(element);
}
return;
}
element.FadeTimeLeft -= elapsedTicks;
var newOpVal = element.FadeTimeLeft/TimeToFade;
if(element.FadeState == 1)
newOpVal = 1 - newOpVal;
element.style.opacity = newOpVal;
element.style.filter = 'alpha(opacity = ' + (newOpVal*100) + ')';
setTimeout("animFad(" + curTick + ",'" + eid + "')", 33);
}
function opaque(eid)
{
var element = $(eid);
element.FadeState=2;
element.style.opacity='1';
element.style.filter = 'alpha(opacity=100)';
}
function fade(eid)
{
var element = $(eid);
if(element == null)
return;
if(element.FadeState == null)
{
if(element.style.opacity == null
|| element.style.opacity == ''
|| element.style.opacity == '1')
{
element.FadeState = 2;
}
else
{
element.FadeState = -2;
}
}
if(element.FadeState == 1 || element.FadeState == -1)
{
element.FadeState = element.FadeState == 1 ? -1 : 1;
element.FadeTimeLeft = TimeToFade - element.FadeTimeLeft;
}
else
{
element.FadeState = element.FadeState == 2 ? -1 : 1;
element.FadeTimeLeft = TimeToFade;
setTimeout("animFad(" + new Date().getTime() + ",'" + eid + "')", 33);
}
}
function sForm(fn,act,cback)
{
var f=$d.forms[fn];
var el=f.elements;
var s="";
for(i=0;i<el.length;i++)
{
if('value' in el[i]) {
if((el[i].type=='checkbox' && el[i].checked) || el[i].type!='checkbox') {
if(s!=""){s+="&";};
s+=$e(el[i].name)+"="+$e(el[i].value.replace(" ",""));
}
}
}
ACmd(act,cback,false,s);
}
function showDiv(eid, st)
{
if(st!="none")
{
$("stan").style.display="none";
opaque(eid);
$(eid).style.display=st;
fade(eid);
return true;
}
return false;
}
function fadeCBack(el)
{
el.style.display="none";
$("stan").style.display="block";
}
function upDMVars(xDt)
{
conlo=false;
$w.DmBoard=getX(xDt, 'board');
$('fwn').innerHTML=getX(xDt, 'fwname');
$('fwv').innerHTML=getX(xDt, 'fwver')+' - '+getX(xDt, 'stv');
$('dm').innerHTML=getX(xDt, 'defmac');
$('bd').innerHTML=getX(xDt, 'bd');
$('dt').innerHTML=getX(xDt, 'dt');
$('bo').innerHTML=$w.DmBoard;
$w.epoch=getX(xDt, 'epoch');
if(typeof(aFirstCB) == 'function'){
aFirstCB(xDt);
}
}
function upDMAj(xDt)
{
if(xDt)
{
if(conlo){upDMVars(xDt);}
$w.epoch=getX(xDt, 'epoch');
$('dt').innerHTML=getX(xDt, 'dt');
$('stan').innerHTML=getX(xDt, 'stan');
var stok=getX(xDt, 'stok');
var stf=getX(xDt, 'stfail');
if(!showDiv('stfail', stf)) {showDiv('stok', stok);}
} else {
showDiv('connf', 'block');
conlo=true;
}
if(typeof(aLoopCB)=='function'){
aLoopCB(xDt);
}
}
function init() {
ACmd('ajax.xml', upDMVars);
setTimeout("ACmd('ajax.xml', upDMAj, true)",300);
var menuchilds=$('menu').getElementsByTagName('a');
for(i=0;i<menuchilds.length;i++)
{
if(location.href==menuchilds[i].href)
{
menuchilds[i].style.backgroundColor='#003399';
}
}
}
//kick off the AJAX Updater
setTimeout("pollAJAX()",750);
$w.onload = init;
/**
* Determines when a request is considered "timed out"
*/
var timeOutMS = 5000; //ms
/**
* Stores a queue of AJAX events to process
*/
var aList = new Array();
$d=document;
$w=window;
function $(v){return $d.getElementById(v)}
function $e(v){return encodeURIComponent(v).replace("%5B", "[").replace("%5D","]").replace("%7C","|")}
/**
* Initiates a new AJAX command
*
* @param the url to access
* @param the document ID to fill, or a function to call with response XML (optional)
* @param true to repeat this call indefinitely (optional)
* @param a URL encoded string to be submitted as POST data (optional)
*/
function ACmd(url, cnt, repeat, data)
{
// Set up our object
var newA = new Object();
var ttime = new Date();
newA.url = url;
newA.cnt = cnt;
newA.repeat = repeat;
newA.aReq = null;
// Create and send the request
if($w.XMLHttpRequest) {
newA.aReq = new XMLHttpRequest();
newA.aReq.open((data==null)?"GET":"POST", newA.url, true);
newA.aReq.send(data);
// If we're using IE6 style (maybe 5.5 compatible too)
} else if($w.ActiveXObject) {
newA.aReq = new ActiveXObject("Microsoft.XMLHTTP");
if(newA.aReq) {
newA.aReq.open((data==null)?"GET":"POST", newA.url, true);
newA.aReq.send(data);
}
}
newA.lastCalled = ttime.getTime();
// Store in our array
aList.push(newA);
}
/**
* Loops over all pending AJAX events to determine
* if any action is required
*/
function pollAJAX() {
var curA = new Object();
var ttime = new Date();
var elapsed;
// Read off the aList objects one by one
for(i = aList.length; i > 0; i--)
{
curA = aList.shift();
if(!curA)
continue;
elapsed = ttime.getTime() - curA.lastCalled;
// If we suceeded
if(curA.aReq.readyState == 4 && curA.aReq.status == 200) {
// If it has a cnt, write the result
if(typeof(curA.cnt) == 'function'){
curA.cnt(curA.aReq.responseXML.documentElement);
} else if(typeof(curA.cnt) == 'string') {
$(curA.cnt).innerHTML = curA.aReq.responseText;
} // (otherwise do nothing for null values)
curA.aReq.abort();
curA.aReq = null;
// If it's a repeatable request, then do so
if(curA.repeat)
ACmd(curA.url, curA.cnt, curA.repeat);
continue;
}
// If we've waited over 1 second, then we timed out
if(elapsed > timeOutMS) {
// Invoke the user function with null input
if(typeof(curA.cnt) == 'function'){
curA.cnt(null);
}
curA.aReq.abort();
curA.aReq = null;
// If it's a repeatable request, then do so
if(curA.repeat)
ACmd(curA.url, curA.cnt, curA.repeat);
continue;
}
// Otherwise, just keep waiting
aList.push(curA);
}
// Call ourselves again in 250ms
setTimeout("pollAJAX()",250);
}// End pollA
/**
* Parses the xmlResponse returned by an XMLHTTPRequest object
*
* @param the xDt returned
* @param the fld to search for
*/
function getX(xDt, fld) {
try {
if(xDt.getElementsByTagName(fld)[0].firstChild.nodeValue)
return xDt.getElementsByTagName(fld)[0].firstChild.nodeValue;
else
return null;
} catch(err) { return null; }
}
var tabC = {
tabAr: new Array(),
classOn: "tabon",
classOff: "taboff",
addTabs: function (tabCont, tid) {
this.tabAr[tid] = new Array();
tabs = $(tabCont).getElementsByTagName("div");
for (x in tabs) {
if (typeof(tabs[x].id) != "undefined") {
this.tabAr[tid].push(tabs[x].id);
}
}
},
chTab: function (element, tid) {
for (x in this.tabAr[tid]) {
tabItem = this.tabAr[tid][x];
dataElement = $(tabItem + "_data");
if (dataElement) {
if (dataElement.style.display != "none") {
dataElement.style.display = "none";
}
}
tabEl = $(tabItem);
if (tabEl) {
if (tabEl.className != this.classOff) {
tabEl.className = this.classOff;
}
}
}
$(element.id + "_data").style.display = "block";
element.className = this.classOn;
}
};
function toggleMe(a, b){
var e=$(a);
if(!e)return true;
if(e.style.display=="none"){
e.style.display="block"
b.innerHTML="Collapse &and;";
} else {
e.style.display="none"
b.innerHTML="Expand &or;";
}
return true;
}
function dh(d,l)
{
   var d=d.split(',');
   var r='';
   var t;
   for(var i=0;i<l;i++)
   {
      if(i<d.length)
         t=d[i].replace(/\D/g,'');
      else
         t='0';
      t=parseInt(t);
      if(typeof(t)=='undefined')
t=0;
      r+=zfill(t.toString(16),2);
    
   }
   return r;
}
function hd(h,l)
{
   var r='';
   for(var i=0;i<l*2;i+=2)
   {
      r+=(parseInt(h[i]+h[i+1],16)+',').replace(NaN,'0');
   }    
   return r.slice(0,-1);
}
function zfill(str, width){
var result = String(str);
var num_z = width - result.length;
for(var i=num_z; i > 0; i--){
result = '0' + result;
}
return result;
}
var TimeToFade = 2500.0;
function animFad(lastTick, eid)
{
var curTick = new Date().getTime();
var elapsedTicks = curTick - lastTick;
var element = $(eid);
if(element.FadeTimeLeft <= elapsedTicks)
{
element.style.opacity = element.FadeState == 1 ? '1' : '0';
element.style.filter = 'alpha(opacity = '
+ (element.FadeState == 1 ? '100' : '0') + ')';
element.FadeState = element.FadeState == 1 ? 2 : -2;
if(typeof(fadeCBack) == 'function'){
fadeCBack(element);
}
return;
}
element.FadeTimeLeft -= elapsedTicks;
var newOpVal = element.FadeTimeLeft/TimeToFade;
if(element.FadeState == 1)
newOpVal = 1 - newOpVal;
element.style.opacity = newOpVal;
element.style.filter = 'alpha(opacity = ' + (newOpVal*100) + ')';
setTimeout("animFad(" + curTick + ",'" + eid + "')", 33);
}
function opaque(eid)
{
var element = $(eid);
element.FadeState=2;
element.style.opacity='1';
element.style.filter = 'alpha(opacity=100)';
}
function fade(eid)
{
var element = $(eid);
if(element == null)
return;
if(element.FadeState == null)
{
if(element.style.opacity == null
|| element.style.opacity == ''
|| element.style.opacity == '1')
{
element.FadeState = 2;
}
else
{
element.FadeState = -2;
}
}
if(element.FadeState == 1 || element.FadeState == -1)
{
element.FadeState = element.FadeState == 1 ? -1 : 1;
element.FadeTimeLeft = TimeToFade - element.FadeTimeLeft;
}
else
{
element.FadeState = element.FadeState == 2 ? -1 : 1;
element.FadeTimeLeft = TimeToFade;
setTimeout("animFad(" + new Date().getTime() + ",'" + eid + "')", 33);
}
}
function sForm(fn,act,cback)
{
var f=$d.forms[fn];
var el=f.elements;
var s="";
for(i=0;i<el.length;i++)
{
if('value' in el[i]) {
if((el[i].type=='checkbox' && el[i].checked) || el[i].type!='checkbox') {
if(s!=""){s+="&";};
s+=$e(el[i].name)+"="+$e(el[i].value.replace(" ",""));
}
}
}
ACmd(act,cback,false,s);
}
function showDiv(eid, st)
{
if(st!="none")
{
$("stan").style.display="none";
opaque(eid);
$(eid).style.display=st;
fade(eid);
return true;
}
return false;
}
function fadeCBack(el)
{
el.style.display="none";
$("stan").style.display="block";
}
function upDMVars(xDt)
{
conlo=false;
$w.DmBoard=getX(xDt, 'board');
$('fwn').innerHTML=getX(xDt, 'fwname');
$('fwv').innerHTML=getX(xDt, 'fwver')+' - '+getX(xDt, 'stv');
$('dm').innerHTML=getX(xDt, 'defmac');
$('bd').innerHTML=getX(xDt, 'bd');
$('dt').innerHTML=getX(xDt, 'dt');
$('bo').innerHTML=$w.DmBoard;
$w.epoch=getX(xDt, 'epoch');
if(typeof(aFirstCB) == 'function'){
aFirstCB(xDt);
}
}
function upDMAj(xDt)
{
if(xDt)
{
if(conlo){upDMVars(xDt);}
$w.epoch=getX(xDt, 'epoch');
$('dt').innerHTML=getX(xDt, 'dt');
$('stan').innerHTML=getX(xDt, 'stan');
var stok=getX(xDt, 'stok');
var stf=getX(xDt, 'stfail');
if(!showDiv('stfail', stf)) {showDiv('stok', stok);}
} else {
showDiv('connf', 'block');
conlo=true;
}
if(typeof(aLoopCB)=='function'){
aLoopCB(xDt);
}
}
function init() {
ACmd('ajax.xml', upDMVars);
setTimeout("ACmd('ajax.xml', upDMAj, true)",300);
var menuchilds=$('menu').getElementsByTagName('a');
for(i=0;i<menuchilds.length;i++)
{
if(location.href==menuchilds[i].href)
{
menuchilds[i].style.backgroundColor='#003399';
}
}
}
//kick off the AJAX Updater
setTimeout("pollAJAX()",750);
$w.onload = init;
<div class=spacer>&nbsp;</div>
<div id=footer>Copyright &copy; 2010-2013 Unixmedia S.r.l.</div>
</div>
</body>
</html>
<div class=spacer>&nbsp;</div>
<div id=footer>Copyright &copy; 2010-2012 Unixmedia S.r.l.</div>
</div>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Domotika board</title>
<link href=/domotika.css rel=stylesheet type="text/css" />
<link rel="shortcut icon" href=/favicon.ico />
</head>
<body>
<div id=page>
<div style="padding: 0pt 0pt 5px 5px;"><img alt="Domotika" src="/img/domotika.gif"><span style="font-size:34px">&nbsp;&nbsp;Ambient Intelligence</span><span style="float:right"><fieldset>
<div><span><b>Fw name:</b>&nbsp;</span><span id=fwn></span></div>
<div><span><b>Fw version:</b>&nbsp;</span><span id=fwv></span></div>
<div><span><b>Serial/def MAC:</b>&nbsp;</span><span id=dm></span></div>
<div><span><b>Build date:</b>&nbsp;</span><span id=bd></span></div>
<div><span><b>Board:</b>&nbsp;</span><span id=bo></span></div>
</fieldset></span></div>
<div id=title><div><span class=left id=dt></span><span class=right>Domotika system</span></div></div>
<div id=menu>
<div class="ress ok" id=stok style="display:none;">OK Saved.</div>
<div class="ress fail" id=stfail style="display:none;">KO Error saving.</div>
<div class="ress fail" id=connf style="display:none;">NO CONNECTION.</div>
<div class="ress" id=stan></div>
<div>
<br/>
<a href=/index.htm>Home</a>
<a href=/ioconf.htm>I/O cfg</a>
<a href=/users.htm>Auth cfg</a>
<a href=/config.htm>other cfgs</a>
<a href=/netcfg.htm>Network cfg</a>
<a href=/upload.htm>save/restore cfg</a>
<a href=/reboot.htm?r onClick="return confirm(\'Are you sure?\', \'Reset board cfg\');">Restore defaults</a>
<a href=/reboot.htm onClick="return confirm(\'Are you sure?\', \'Reboot\');">Reboot</a>
</div>
</div>
function hOpt(f)
{
var f=$d.forms[f];
var el=f.elements;
var n;
for(i=0;i<el.length;i++)
{
var n=el[i].name.substring(0,5);
if(n=='i_15_'){
var n2=el['i_14_'+el[i].name.substring(5)].value;
if(n2==0)
el[i].value=zfill("0",18);
else if(n2!=255)
el[i].value=dh(el[i].value,9);
else {
while(el[i].value.length<18)
{
el[i].value=el[i].value+'0';
}
}
}
}
}
function sOpt(f)
{
var f=$d.forms[f];
var el=f.elements;
for(i=0;i<el.length;i++)
{
n=el[i].name.substring(0,5);
if(n=='i_15_'){
switch(el['i_14_'+el[i].name.substring(5)].value)
{
case '1':
el[i].value=hd(el[i].value,4);
break;
case '2':
el[i].value=hd(el[i].value,1);
break;
case '3':
el[i].value=hd(el[i].value,2);
break;
case '255':
break;
default:
el[i].value='';
}
}
}
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script src=/js/d.js></script>
<script>hdr();</script>
<div id=content>
<h1>Network Conf</h1>
<form method=post action=/netcfg.htm name=config>
<fieldset>
<div><label>HW addr:</label>
<input type=text name=mac disabled /></div>
<div><label>Hostname:</label>
<input type=text name=host disabled /></div>
<div>&nbsp;</div>
<div>
<input type=checkbox class=sm name=dhcp value=1 onclick="cBox()" disabled /> Use DHCP</div>
<div>
<input type=checkbox class=sm name=ntpe value=1 disabled /> Use SNTP</div>
<div><label>IP addr:</label>
<td><input type=text name=ip disabled /></div>
<div><label>Gateway:</label>
<td><input type=text name=gw disabled /></div>
<div><label>Subnet Mask:</label>
<td><input type=text name=sub disabled /></div>
<div><label>DNS1:</label>
<td><input type=text name=dns1 disabled /></div>
<div><label>DNS2:</label>
<input type=text name=dns2 disabled/></div>
<div><label>SNTP:</label>
<input type=text name=sntp disabled/></div>
<div><label>Web Port:</label>
<input type=text name=port disabled/></div>
<div><input type=submit class=sm value=Save name=save disabled /></div>
</fieldset>
</form>
</div>
<script>
function cBox() {
e=$d.forms.config;
st1=e.dhcp.checked;
st=0;
if(st1){st=st1;}
e.ip.disabled=st;
e.gw.disabled=st;
e.sub.disabled=st;
e.dns1.disabled=st;
e.dns2.disabled=st;
}
function aFirstCB(xDt)
{
if(xDt)
{
e=$d.forms.config;
if(getX(xDt,'cfg_dhcpchecked')){e.dhcp.checked=1;}
if(getX(xDt,'cfg_ntpe')){e.ntpe.checked=1;}
e.mac.value=getX(xDt,'cfg_mac');
e.host.value=getX(xDt,'cfg_hostname');
e.ip.value=getX(xDt,'cfg_ip');
e.gw.value=getX(xDt,'cfg_gw');
e.sub.value=getX(xDt,'cfg_subnet');
e.dns1.value=getX(xDt,'cfg_dns1');
e.dns2.value=getX(xDt,'cfg_dns2');
e.sntp.value=getX(xDt,'cfg_sntp');
e.port.value=getX(xDt,'wport');
cBox();
e.mac.disabled=0;
e.host.disabled=0;
e.dhcp.disabled=0;
e.sntp.disabled=0;
e.save.disabled=0;
e.ntpe.disabled=0;
e.port.disabled=0;
}
}
ftr();
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script src=/js/d.js></script>
<script>hdr();</script>
<div id=content>
<h1>Network Conf</h1>
<form method=post action=/netcfg.htm name=config>
<fieldset>
<div><label>HW addr:</label>
<input type=text name=mac disabled /></div>
<div><label>Hostname:</label>
<input type=text name=host disabled /></div>
<div>&nbsp;</div>
<div>
<input type=checkbox class=sm name=dhcp value=1 onclick="cBox()" disabled /> Use DHCP</div>
<div>
<input type=checkbox class=sm name=ntpe value=1 disabled /> Use SNTP</div>
<div><label>IP addr:</label>
<td><input type=text name=ip disabled /></div>
<div><label>Gateway:</label>
<td><input type=text name=gw disabled /></div>
<div><label>Subnet Mask:</label>
<td><input type=text name=sub disabled /></div>
<div><label>DNS1:</label>
<td><input type=text name=dns1 disabled /></div>
<div><label>DNS2:</label>
<input type=text name=dns2 disabled/></div>
<div><label>SNTP:</label>
<input type=text name=sntp disabled/></div>
<div><label>Web Port:</label>
<input type=text name=port disabled/></div>
<div><input type=submit class=sm value=Save name=save disabled /></div>
</fieldset>
</form>
</div>
<script>
function cBox() {
e=$d.forms.config;
st1=e.dhcp.checked;
st=0;
if(st1){st=st1;}
e.ip.disabled=st;
e.gw.disabled=st;
e.sub.disabled=st;
e.dns1.disabled=st;
e.dns2.disabled=st;
}
function aFirstCB(xDt)
{
if(xDt)
{
e=$d.forms.config;
if(getX(xDt,'cfg_dhcpchecked')){e.dhcp.checked=1;}
if(getX(xDt,'cfg_ntpe')){e.ntpe.checked=1;}
e.mac.value=getX(xDt,'cfg_mac');
e.host.value=getX(xDt,'cfg_hostname');
e.ip.value=getX(xDt,'cfg_ip');
e.gw.value=getX(xDt,'cfg_gw');
e.sub.value=getX(xDt,'cfg_subnet');
e.dns1.value=getX(xDt,'cfg_dns1');
e.dns2.value=getX(xDt,'cfg_dns2');
e.sntp.value=getX(xDt,'cfg_sntp');
e.port.value=getX(xDt,'wport');
cBox();
e.mac.disabled=0;
e.host.disabled=0;
e.dhcp.disabled=0;
e.sntp.disabled=0;
e.save.disabled=0;
e.ntpe.disabled=0;
e.port.disabled=0;
}
}
ftr();
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script src=/js/d.js></script>
<script>hdr();</script>
<div id=content>
<h1>Rebooting...</h1>
</div>
<script>
function rD(x){}
if(location.search=='?r')
setTimeout("ACmd('/cgi/reset.cgi',rD,false);",500);
else
setTimeout("ACmd('/cgi/reboot.cgi',rD,false);",500);
setTimeout("$w.location='/';",5000);
ftr();
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script src=/js/d.js></script>
<script>hdr();</script>
<div id=content>
<h1>Rebooting...</h1>
</div>
<script>
function rD(x){}
setTimeout("ACmd('/cgi/reset.cgi',rD,false);",500);
setTimeout("$w.location='/';",5000);
ftr();
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script src=/js/d.js></script>
<script>hdr();</script>
<div id=content>
<h1>Backup conf</h1>
<div class=configbox>
<a href=/config.bin>Download Complete Config</a><br/>
<a href=/devconf.bin>Download I/O Config</a><br/>
</div>
</p>
<h1>Conf file Upload</h1>
<form action=upload.htm target=upt method=post enctype="multipart/form-data">
<div class=configbox>
<div id=up></div>
<p style="margin-bottom: 2px"><b>File: </b>&nbsp;
<input type=file name=cf size=30 /> &nbsp;
<input type=submit value="Upload Config" />
</p>
</div>
</form>
<iframe name=upt src="" style="width:0;height:0;border:0px solid #fff;"></iframe>
</div>
<script>
function aLoopCB(xDt)
{
$('up').innerHTML=getX(xDt,'upConf');
}
ftr();
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script src=/js/d.js></script>
<script>hdr();</script>
<div id=content>
<h1>Auth Configuration</h1>
<form action=users.htm method=post>
<fieldset id=f>
</fieldset>
</form>
</div>
<script>
c='';
n={adm:"Admin pwd",usr:"User pwd",net:"Net key",mst:"Sys key"};
for(k in n)
{
r='';
for(i=1;i<3;i++){
if(i==2) r='rep. ';
c+='<div><label>'+r+n[k]+':</label><input type=password name='+k+i+' /></div>';
}
}
c+='<div><input type=submit class=sm value=Save /></div>';
$('f').innerHTML=c;
f=$d.forms[0];
function v()
{
for(k in n)
{
if(f[k+'1'].value!=f[k+'2'].value){
alert(n[k]+" doesn't match");
return false;
}
}
}
f.onsubmit=v;
ftr();
</script>
#!/bin/bash
if [ -d DomotikaWeb ] ; then
rm -rf DomotikaWeb
fi
pages=$1
if [ x"$2" != x"" ] ; then
language=$2
else
language="en"
fi
mypath=`dirname $0`
if [ x"$1" = x"" ] ; then
echo "Specify pages to be created"
exit 1
fi
mypages=$mypath/$pages/Pages
myproj=$mypath/$pages
if [ \! -d $myproj ] ; then
echo "$myproj doesn't exists"
exit 1
fi
if [ \! -d $mypages ] ; then
echo "$mypages doesn't exists"
exit 1
fi
cd $myproj
if [ -d DomotikaWeb ] ; then
rm -rf DomotikaWeb
fi
rsync Pages/ DomotikaWeb -a --copy-links -v
find ./DomotikaWeb -name '.svn' -type d -exec rm -rf {} \; 2>/dev/null
#if [ -x /usr/bin/yui-compressor ] ; then
if [ -f ../compiler.jar ] ; then
echo "Convert html2js files..."
for i in `find ./DomotikaWeb -name "*.html2js" -type f`
do
html2js $i.converted $i
cat $i.converted >> ./DomotikaWeb/js/d.js
rm $i.converted
done
echo "Add prepend js files..."
for i in `find ./DomotikaWeb -name "*.js.prepend" -type f`
do
mv ./DomotikaWeb/js/d.js ./DomotikaWeb/js/d.js.orig
mv "$i" ./DomotikaWeb/js/d.js
cat ./DomotikaWeb/js/d.js.orig >> ./DomotikaWeb/js/d.js
rm ./DomotikaWeb/js/d.js.orig
done
echo "Add postpend js files..."
for i in `find ./DomotikaWeb -name "*.js.postpend" -type f`
do
cat "$i" >> ./DomotikaWeb/js/d.js
rm "$i"
done
echo "Translate files..."
for i in `find ./DomotikaWeb -iname "*.htm" -or -iname "*.xml" -or -iname "*.js" -or \
-iname "*.css" -or -iname '*.html' -or -iname '*.cgi'`
do
../translate.py "${i}" "${i}" $language
done
echo "Compress css and js files with yui-compressor"
for i in `find ./DomotikaWeb -name "*.js" -type f`
do
java -jar ../compiler.jar --js $i --js_output_file $i.compressed
mv $i.compressed $i
done
for i in `find ./DomotikaWeb -name "*.css" -type f`
do
yui-compressor -o $i.compressed $i
mv $i.compressed $i
done
echo "Compress xml/html files with python-slimmer"
for i in `find ./DomotikaWeb -name "*.htm" -type f`
do
../tools/htmcompress $i $i.compressed
mv $i.compressed $i
done
for i in `find ./DomotikaWeb -name "*.html" -type f`
do
../tools/htmcompress $i $i.compressed
mv $i.compressed $i
done
for i in `find ./DomotikaWeb -name "*.xml" -type f`
do
../tools/htmcompress $i $i.compressed
mv $i.compressed $i
done
for i in `find ./DomotikaWeb -name "*.inc" -type f`
do
../tools/htmcompress $i $i.compressed
mv $i.compressed $i
done
else
echo "You don't seem to have yui-compressor installed"
fi
mpfs2 --mpfs2 -h "*.htm,*.html,*.xml,*.cgi,*.bin" "DomotikaWeb" "." "MPFSImg2-$language.bin"
mpfs2 --mpfs2 -h "*.htm,*.html,*.xml,*.cgi,*.bin" --C18 "DomotikaWeb" "." "MPFSImg2.c"
mpfs2 --mpfs2 -h "*.htm,*.html,*.xml,*.cgi,*.bin" --ASM30 "DomotikaWeb" "." "MPFSImg2.s"
File added
LANGS={
'en': {
'None': 'None',
'On': 'On',
'Off': 'Off',
'Change': 'Change',
'Open': 'Open',
'Openit':'Open',
'Closeit':'Close',
'Close': 'Close',
'Up':'Up',
'Down': 'Down',
'Stop': 'Stop',
'Start': 'Start',
'StartTimered': 'StartTimered',
'Hi':'Hi',
'Low':'Low',
'Block':'Block',
'Unblock':'Unblock',
'BlockUnblock':'BlockUnblock',
'Call':'Call',
'Ring':'Ring',
'Play':'Play',
'Pause':'Pause',
'PauseClosing':'PauseClosing',
'PauseOpening':'PauseOpening',
'Next':'Next',
'Board':'Board',
'Debug':'Debug',
'Action':'Action',
'Ack':'Ack',
'Notify':'Notify',
'Requestconf':'RequestConf',
'Light':'Light',
'Socket':'Socket',
'Blind':'Blind',
'Sensor':'Sensor',
'Door':'Door',
'Window':'Window',
'Valvle':'Valvle',
'Status':'Status',
'Scenary':'Scenary',
'Alarm':'Alarm',
'Citophone':'Citophone',
'Generic_Switch':'Generic_Switch',
'Thermostat':'Thermostat',
'Gate':'Gate',
'Audio':'Audio',
'Video':'Video',
'Phone':'Phone',
'Tv':'Tv',
'Irrigation':'Irrigation',
'Timer':'Timer',
'Internet':'Internet',
'Message':'Message',
'Rfid':'Rfid',
'Pump':'Pump',
'Motor':'Motor',
'Tent':'Tent',
'Rtc':'Rtc',
'Sequence':'Sequence',
'System':'System',
'User':'User',
'PulseOpen':'PulseOpen',
'PulseOpenCount':'PulseOpenCount',
'PulseClose':'PulseClose',
'PulseCloseCount':'PulseCloseCount',
'PulseOpenDouble':'PulseOpenDouble',
'PulseCloseDouble':'PulseCloseDouble',
'PulseChange':'PulseChange',
'PulseChangeCount':'PulseChangeCount',
'PulseChangeDouble':'PulseChangeDouble',
'SingleClick':'SingleClick',
'ContinuosOpen':'ContinuosOpen',
'ContinuosClose':'ContinuosClose',
'DoubleClick':'DoubleClick',
'SingleAndLong':'SingleAndLong',
'OpenClose':'OpenClose',
'ContinuosOpenClose':'ContinuosOpenClose',
'TripleClick':'TripleClick',
'Seq2':'Seq2',
'Seq2Step':'Seq2Step',
'Seq3':'Seq3',
'Seq3Step':'Seq3Step',
'Generic':'Generic',
'Temperature':'Temperature',
'Humidity':'Humidity',
'Current':'Current',
'Wind':'Wind',
'Speed':'Speed',
'Pressure':'Pressure',
'Flux':'Flux',
'Lighting':'Lighting',
'Level':'Level',
'OnOff':'OnOff',
'Signal':'Signaling',
'Dev2RelaysExclusive':'Dev2RelaysExclusive',
'Dev2RelaysInclusiveOn':'Dev2RelaysInclusive',
'Dev2RelaysInclusiveOff':'Dev2RelaysInclusiveOff',
'OpenClose2Relays':'OpenClose2Relays',
'Digital Inputs':'Digital Inputs',
'Analog Inputs':'Analog Inputs',
'LOADING':'LOADING',
'Outputs':'Outputs',
'Relay':'Relay',
'SEQUENCE':'SEQUENCE',
'Time':'Time',
'Time/Count':'Time/Count',
'Hi':'Hi',
'Low':'Low',
'Status':'Status',
'Status name':'Status name',
'Enabled':'Enabled',
'Yes':'Yes',
'No':'No',
'Min time':'Min time',
'Min val':'Min val',
'Save':'Save',
'startt':'StartTime',
'pauset':'PauseTime',
'Banging':'Banging',
'opent':'OpenTime',
'runtime':'runtime',
'Retard':'Retard',
'break delay':'break delay',
'rearm':'rearm',
'A Max':'A Max',
'wait':'wait',
'action':'action',
'msg':'msg',
'ctx':'ctx',
'act':'act',
'Expand':'Expand',
'Input':'Input',
'Device name':'Device name',
'Output type':'Output type',
'Analog':'Analog',
'name':'name',
'Dst':'Dst',
'type':'type',
'Opt':'Opt',
'RGB':'RGB',
'PRESET':'PRESET',
'DIMMER':'DIMMER',
'HEX':'HEX'
},
'it': {
'None': 'Nulla',
'On': 'On',
'Off': 'Off',
'Change': 'Cambia',
'Open': 'Aperto',
'Close': 'Chiuso',
'Openit':'Apri',
'Closeit':'Chiudi',
'Up':'Su',
'Down': 'Giu',
'Stop': 'Ferma',
'Start': 'Parti',
'StartTimered': 'PartiTemporizzato',
'Hi':'Alto',
'Low':'Basso',
'Block':'Blocca',
'Unblock':'Sblocca',
'BlockUnblock':'BloccaSblocca',
'Call':'Chiama',
'Ring':'Suona',
'Play':'Play',
'Pause':'Pausa',
'PauseClosing':'PausaChiudendo',
'PauseOpening':'PausaAprendo',
'Next':'Prossimo',
'Board':'Scheda',
'Debug':'Debug',
'Action':'Azione',
'Ack':'Ack',
'Notify':'Notifica',
'Requestconf':'RichiediConf',
'Light':'Luce',
'Socket':'Presa',
'Blind':'Tapparella',
'Sensor':'Sensore',
'Door':'Porta',
'Window':'Finestra',
'Valvle':'Valvola',
'Status':'Stato',
'Scenary':'Scenari',
'Alarm':'Allarme',
'Citophone':'Citofono',
'Generic_Switch':'Generico',
'Thermostat':'Termostato',
'Gate':'Cancelli',
'Audio':'Audio',
'Video':'Video',
'Phone':'Tel',
'Tv':'Tv',
'Irrigation':'Irrigazione',
'Timer':'Timer',
'Internet':'Internet',
'Message':'Messaggio',
'Rfid':'Rfid',
'Pump':'Pompe',
'Motor':'Motori',
'Tent':'Tende',
'Rtc':'Rtc',
'Sequence':'Sequenze',
'System':'Sistema',
'User':'Utente',
'PulseOpen':'ImpulsoAperto',
'PulseOpenCount':'ImpulsoContaAperto',
'PulseClose':'ImpulsoChiuso',
'PulseCloseCount':'ImpulsoContaChiuso',
'PulseOpenDouble':'ImpulsoDoppioAperto',
'PulseCloseDouble':'ImpulsoDoppioChiuso',
'PulseChange':'ImpulsoCambio',
'PulseChangeCount':'ImpulsoCambioConta',
'PulseChangeDouble':'ImpulsoCambioDoppio',
'SingleClick':'Pulsante',
'ContinuosOpen':'ApertoSempre',
'ContinuosClose':'ChiusoSempre',
'DoubleClick':'DoppioClick',
'SingleAndLong':'PulsanteELungo',
'OpenClose':'ApertoChiuso',
'ContinuosOpenClose':'ApertoChiusoSempre',
'TripleClick':'TriploClick',
'Seq2':'Seq2',
'Seq2Step':'Seq2Step',
'Seq3':'Seq3',
'Seq3Step':'Seq3Step',
'Generic':'Generico',
'Temperature':'Temperatura',
'Humidity':'umidita',
'Current':'Corrente',
'Wind':'Vento',
'Speed':'Velocita',
'Pressure':'Pressione',
'Flux':'Flusso',
'Lighting':'Luminosita',
'Level':'Livello',
'OnOff':'AccesoSpento',
'Signal':'Segnalazione',
'Dev2RelaysExclusive':'Attivazione2vie',
'Dev2RelaysInclusiveOn':'DueReleChiusi',
'Dev2RelaysInclusiveOff':'DueReleAperti',
'OpenClose2Relays':'ApriChiudi2Rele',
'Digital Inputs':'Ingressi Digitali',
'Analog Inputs':'Ingressi Analogici',
'LOADING':'Caricando',
'Outputs':'Uscite',
'Relay':'Rele',
'SEQUENCE':'Sequenza',
'Time':'Tempo',
'Time/Count':'Tempo/Conta',
'Hi':'Alto',
'Low':'Basso',
'Status':'Stato',
'Status name':'Nome stato',
'Enabled':'Abilitato',
'Yes':'Si',
'No':'No',
'Min time':'Tempo min',
'Min val':'Minimo',
'Save':'Salva',
'startt':'TempoAvvio',
'pauset':'TempoPausa',
'opent':'TempoAperto',
'Banging':'Colpo d\\\'ariete',
'runtime':'durata',
'Retard':'ritardo',
'break delay':'ritardo sgancio',
'rearm':'riarmo',
'A Max':'Max A',
'wait':'attendi',
'action':'azione',
'msg':'msg',
'ctx':'ctx',
'act':'act',
'Expand':'Espandi',
'Input':'Ingresso',
'Device name':'Dispositivo',
'Output type':'tipo uscita',
'Analog':'Analogica',
'name':'nome',
'Dst':'Dst',
'type':'tipo',
'Opt':'Opt',
'RGB':'RGB',
'PRESET':'PRESET',
'DIMMER':'DIMMER',
'HEX':'HEX'
},
}
K 25
svn:wc:ra_dav:version-url
V 57
/microchip/!svn/ver/794/trunk/Unixmedia/Web/relaymaster84
END
10
dir
794
https://svn.unixmedia.net/microchip/trunk/Unixmedia/Web/relaymaster84
https://svn.unixmedia.net/microchip
2013-06-04T13:32:55.053652Z
794
nextime
9872420c-b032-40af-96d2-e8d557942bcc
Pages
dir
K 25
svn:wc:ra_dav:version-url
V 63
/microchip/!svn/ver/794/trunk/Unixmedia/Web/relaymaster84/Pages
END
reboot.htm
K 25
svn:wc:ra_dav:version-url
V 74
/microchip/!svn/ver/795/trunk/Unixmedia/Web/relaymaster84/Pages/reboot.htm
END
ajax.xml
K 25
svn:wc:ra_dav:version-url
V 72
/microchip/!svn/ver/990/trunk/Unixmedia/Web/relaymaster84/Pages/ajax.xml
END
ioconf.htm
K 25
svn:wc:ra_dav:version-url
V 74
/microchip/!svn/ver/990/trunk/Unixmedia/Web/relaymaster84/Pages/ioconf.htm
END
users.htm
K 25
svn:wc:ra_dav:version-url
V 73
/microchip/!svn/ver/795/trunk/Unixmedia/Web/relaymaster84/Pages/users.htm
END
upload.htm
K 25
svn:wc:ra_dav:version-url
V 74
/microchip/!svn/ver/794/trunk/Unixmedia/Web/relaymaster84/Pages/upload.htm
END
devconf.bin
K 25
svn:wc:ra_dav:version-url
V 75
/microchip/!svn/ver/795/trunk/Unixmedia/Web/relaymaster84/Pages/devconf.bin
END
config.htm
K 25
svn:wc:ra_dav:version-url
V 74
/microchip/!svn/ver/794/trunk/Unixmedia/Web/relaymaster84/Pages/config.htm
END
ioconf.xml
K 25
svn:wc:ra_dav:version-url
V 74
/microchip/!svn/ver/794/trunk/Unixmedia/Web/relaymaster84/Pages/ioconf.xml
END
config.bin
K 25
svn:wc:ra_dav:version-url
V 74
/microchip/!svn/ver/795/trunk/Unixmedia/Web/relaymaster84/Pages/config.bin
END
netcfg.htm
K 25
svn:wc:ra_dav:version-url
V 75
/microchip/!svn/ver/1060/trunk/Unixmedia/Web/relaymaster84/Pages/netcfg.htm
END
domotika.css
K 25
svn:wc:ra_dav:version-url
V 76
/microchip/!svn/ver/794/trunk/Unixmedia/Web/relaymaster84/Pages/domotika.css
END
favicon.ico
K 25
svn:wc:ra_dav:version-url
V 75
/microchip/!svn/ver/794/trunk/Unixmedia/Web/relaymaster84/Pages/favicon.ico
END
index.htm
K 25
svn:wc:ra_dav:version-url
V 73
/microchip/!svn/ver/795/trunk/Unixmedia/Web/relaymaster84/Pages/index.htm
END
10
dir
794
https://svn.unixmedia.net/microchip/trunk/Unixmedia/Web/relaymaster84/Pages
https://svn.unixmedia.net/microchip
2013-06-04T13:32:55.053652Z
794
nextime
9872420c-b032-40af-96d2-e8d557942bcc
reboot.htm
file
795
2011-09-18T23:31:19.000000Z
3c0e435ff1007f2b7b02d737a80ddfc3
2013-06-04T13:42:52.287275Z
795
nextime
has-props
svn:special
28
ajax.xml
file
990
2013-07-23T11:52:29.000000Z
f326e1d41d69b2463f8695fd7a56c360
2013-08-13T00:59:55.756042Z
990
nextime
900
users.htm
file
795
2011-11-24T16:31:04.000000Z
ae861bc8f8c7c275583f69a12b240047
2013-06-04T13:42:52.287275Z
795
nextime
has-props
svn:special
27
devconf.bin
file
795
2011-12-05T13:49:17.000000Z
fcee7b741f119560c36a48c4a32bcba5
2013-06-04T13:42:52.287275Z
795
nextime
has-props
svn:special
29
config.htm
file
2013-06-04T12:53:17.000000Z
065c7287cb9518f06e9201fb808902fa
2013-06-04T13:32:55.053652Z
794
nextime
has-props
1488
netcfg.htm
file
1060
2013-09-20T09:53:17.000000Z
e62ac76f6558c366c9025b83bc56adee
2013-09-20T19:36:58.918824Z
1060
nextime
has-props
1419
favicon.ico
file
2011-09-18T23:31:19.000000Z
ff3b51a6ae163afe31d4a0ca7b01dff1
2013-06-04T13:32:55.053652Z
794
nextime
has-props
svn:special
29
domotika.css
file
2011-09-18T23:31:19.000000Z
33ff18c4a13dfd0977b8fb5f318b099e
2013-06-04T13:32:55.053652Z
794
nextime
has-props
svn:special
30
index.htm
file
795
2013-06-04T13:14:26.000000Z
15f02409494eee4f02f82dbd650560fc
2013-06-04T13:42:52.287275Z
795
nextime
has-props
1286
cgi
dir
ioconf.htm
file
990
2013-06-04T13:58:21.000000Z
b250e0276839f5220ecdd82d5d3362a8
2013-08-13T00:59:55.756042Z
990
nextime
has-props
11704
upload.htm
file
2011-09-18T23:31:19.000000Z
883434ad4d2d86f0e86d0508d24f496f
2013-06-04T13:32:55.053652Z
794
nextime
has-props
svn:special
28
ioconf.xml
file
2013-06-04T12:54:59.000000Z
4b23b0183b8875dff403c511f2375ba7
2013-06-04T13:32:55.053652Z
794
nextime
985
img
dir
js
dir
config.bin
file
795
2011-10-29T23:37:53.000000Z
c3d5847d51e3cad874b2f4e1938d13f5
2013-06-04T13:42:52.287275Z
795
nextime
has-props
svn:special
28
<r>
<stfail>~stfail~</stfail>
<stok>~stok~</stok>
<bst>~stan(2)~</bst>
<stan>~stan(1)~</stan>
<need_reboot>~need_reboot~</need_reboot>
<cfg_mac>~cfg_mac~</cfg_mac>
<cfg_hostname>~cfg_hostname~</cfg_hostname>
<cfg_ip>~cfg_ip~</cfg_ip>
<cfg_gw>~cfg_gw~</cfg_gw>
<cfg_subnet>~cfg_subnet~</cfg_subnet>
<cfg_tchkp>~cfg_tchkp~</cfg_tchkp>
<wport>~wp~</wport>
<upConf>~uplConf~</upConf>
<board>~board~</board>
<fwname>~fwname~</fwname>
<fwver>~fwver~</fwver>
<defmac>~defmac~</defmac>
<stv>~sver~</stv>
<bd>~bd~</bd>
<dt>~dt~</dt>
<nb>~nb~</nb>
<ap>~ap~</ap>
<np>~np~</np>
<epoch>~epoch~</epoch>
<r1>~rel(1)~</r1>
<r2>~rel(2)~</r2>
<r3>~rel(3)~</r3>
<r4>~rel(4)~</r4>
<r5>~rel(5)~</r5>
<r6>~rel(6)~</r6>
<r7>~rel(7)~</r7>
<r8>~rel(8)~</r8>
<i1>~inp(1)~</i1>
<i2>~inp(2)~</i2>
<i3>~inp(3)~</i3>
<i4>~inp(4)~</i4>
<i5>~inp(5)~</i5>
<i6>~inp(6)~</i6>
<i7>~inp(7)~</i7>
<i8>~inp(8)~</i8>
<b1>~btn(1)~</b1>
</r>
link ../../CommonPages/config.bin
\ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script src=/js/d.js></script>
<script>hdr();</script>
<div id=content>
<h1>General Config</h1>
<form name=cff>
<h2>Generic Configurations</h2>
<fieldset>
<!-- <div><label>Debug:</label><input type=checkbox class=sm name=debug value=1 disabled /></div> -->
<div><label>TimeCheck:</label><input type=checkbox class=sm name=tchkp value=1 disabled /></div>
<div id=cs7><label>NET Buf Size:</label><input type=text class=num name=netbu disabled>1 to 99</div>
<div id=cs8><label>Act Port:</label><input type=text class=num name=aport disabled>1 to 65535</div>
<div id=cs9><label>Notify Port:</label><input type=text class=num name=nport disabled>1 to 65535</div>
<div id=btn></div>
<div><span class="domoB pressB grayO grayB" OnClick="sForm('cff','/config.htm',null)">Save</span></div>
</fieldset>
</form>
</div>
<script>
function cBox() {
e = $d.forms.cff;
}
function aLoopCB(xDt) {
e = $d.forms.cff;
}
function aFirstCB(xDt) {
if(xDt)
{
e = $d.forms.cff;
e.tchkp.disabled=false;
e.netbu.disabled=false;
e.aport.disabled=false;
e.nport.disabled=false;
if(getX(xDt,'cfg_tchkp')=='checked')
{
e.tchkp.checked=true;
} else {
e.tchkp.checked=false;
}
cBox();
e.netbu.value=getX(xDt,'nb');
e.aport.value=getX(xDt,'ap');
e.nport.value=getX(xDt,'np');
}
}
ftr();
</script>
link ../../CommonPages/devconf.bin
\ No newline at end of file
link ../../CommonPages/domotika.css
\ No newline at end of file
link ../../CommonPages/favicon.ico
\ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script src=/js/d.js></script>
<script>hdr();</script>
<div id=content>
<div id=status>
<div id=load style="display:none">No data</div>
<div id=display>
<div>
<p>RELAYS:<br/><span class=relays id=rl>
</span></p>
<p>INPUTS:<br/>
<span id=ip></span>
</p>
</div>
</div>
</div>
</div>
<script>
rl="|";
ip="";
for(i=1;i<=8;i++)
{
rl+='<a id=rel'+i+' onclick="ACmd(\'/cgi/relays.cgi?rel='+i+'\');">'+i+'</a>|';
ip+='<span id=inp'+i+'>'+i+'</span> &nbsp;';
}
$('rl').innerHTML=rl;
$('ip').innerHTML=ip;
function aLoopCB(xDt) {
if(!xDt)
{
$('display').style.display='none';
$('load').style.display='inline';
return;
}
$('load').style.display='none';
$('display').style.display='inline';
for(i=1;i<9;i++) {
if(getX(xDt,'r'+i)=='1')
{
$('rel'+i).style.color='#090';
}
else
{
$('rel'+i).style.color='#ddd';
}
}
for(i=1;i<9;i++) {
if(getX(xDt,'i'+i)=='up')
{
$('inp'+i).style.color='#3366ff';
}
else
{
$('inp'+i).style.color='#e00000';
}
}
}
ftr();
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script src=/js/d.js></script>
<script>hdr();</script>
<div id=content >
<h1>I/O Config</h1>
<hr><h2>${{Digital Inputs}}$</h2>
<div id=c1init>${{LOADING}}$...</div>
<div class=configbox id=cbox1 style="display:none"></div>
<hr><h2>${{Outputs}}$</h2>
<div id=c2init>${{LOADING}}$...</div>
<div class=configbox id=cbox2 style="display:none">
</div>
</div>
<script>
var ho="";
var hi="";
function chRelOpt(iz)
{
os=$('otype_'+iz);
osel=os.selectedIndex;
oselv=parseInt(os[osel].value);
nrel=0;
seq="none";
ctxdiv='block';
if(oselv>0)
nrel=1;
if(oselv>=0xf0)
nrel=2;
if(oselv==0xff)
{
nrel=255;
seq="block";
nrel=0;
ctxdiv='none';
}
if(oselv==244)
$('og'+iz).style.display="block";
else
$('og'+iz).style.display="none";
$('ctxd'+iz).style.display=ctxdiv;
for(nr=1;nr<=2;nr++)
{
nrz=zfill(nr,2);
rdiv="none";
if(nr<=nrel){rdiv='block';}
$('rdiv_'+iz+'_'+nrz).style.display=rdiv;
}
$('seq'+iz).style.display=seq;
}
function addROpt()
{
for(i=1;i<=8;i++)
{
ho=" ";
var iz=zfill(i,2);
ho+='<div id=ctxd'+iz+' style="display:none"><b> Ctx: <select name=o_01_'+iz+'_00_00></b>';
for(k in DmCtx)
{
ho+='<option value="'+DmCtx[k]+'">'+k+'</option>';
}
ho+='</select><br /><br />';
// Output per cancelli
ho+='<div id=og'+iz+' style="display:none"><b>${{startt}}$: </b><input type=text size=3 name=o_12_'+iz+'_00_00 value=0><b>${{opent}}$: </b><input type=text size=3 name=o_13_'+iz+'_00_00 value=0><b>${{pauset}}$: </b><input type=text size=3 name=o_14_'+iz+'_00_00 value=0><br/><b>${{Banging}}$:</b><select name=o_15_'+iz+'_00_00><option value=0>${{No}}$</option><option value=1>${{Yes}}$</option></select></div>';
// Fine output per cancelli
ho+='<br/></div>';
for(nr=1;nr<=2;nr++)
{
var nrz=zfill(nr,2);
ho+='<div id=rdiv_'+iz+'_'+nrz+' style="display:none"><hr><b> R'+nr+': </b><select name=o_05_'+iz+'_'+nrz+'_00><option value="0">${{None}}$</option>';
for(rn=1;rn<=8;rn++)
{
ho+='<option value='+rn+'>${{Relay}}$ '+rn+'</option>';
}
ho+='</select>'+
'<select name=o_07_'+iz+'_'+nrz+'_00><option value=0>NA (${{Open}}$)</option><option value=1>NC (${{Close}}$)</option><option value=2>${{Save}}$</option></select><br/>'+
'<b>${{runtime}}$: </b><input type=text size=3 name=o_09_'+iz+'_'+nrz+'_00 value=0>'+
'<b> ${{Retard}}$: <b><input type=text size=3 name=o_08_'+iz+'_'+nrz+'_00 value=0>'+
'<br/></div>';
}
ho+='<div id=seq'+iz+' style="display:none">${{SEQUENCE}}$</div>';
$("ropt_"+i).innerHTML=ho;
}
}
function chInOpt(iz,tz,sel,i)
{
osel=sel.selectedIndex;
oselv=parseInt(sel[osel].value);
maxact=0;
if(oselv)
{
if(oselv<160) // 0xa0
maxact=1;
else if(oselv<208) // 0xd0
maxact=2;
else
maxact=3;
}
for(a=1;a<=3;a++) {
actvis="none";
if(a<=maxact) {actvis="block";}
$('adiv'+iz+tz+'_'+a).style.display=actvis;
}
}
function addInputOpts(iz,tz,i,pulse)
{
var hi="";
for(a=1;a<=3;a++) {
hi+='<div id=adiv'+iz+tz+'_'+a+' style="display:none">';
if(a>1) { hi+='<br /><hr><br/>'; }
hi+='<b>${{action}}$ '+a+': </b><input type=text size=25 name=i_02_'+iz+'_'+tz+'_0'+a+' value="${{wait}}$..."><br/>';
hi+='<b> ${{msg}}$:</b><select name=i_07_'+iz+'_'+tz+'_0'+a+'>';
for(k in DmMsgType)
{
hi+='<option value="'+DmMsgType[k]+'">'+k+'</option>';
}
hi+='</select>';
hi+='<b> ${{ctx}}$:</b><select name=i_03_'+iz+'_'+tz+'_0'+a+'>';
for(k in DmCtx)
{
hi+='<option value="'+DmCtx[k]+'">'+k+'</option>';
}
hi+='</select><br/>';
hi+='<b> ${{act}}$:</b><select name=i_01_'+iz+'_'+tz+'_0'+a+'>';
for(k in DmAct)
{
hi+='<option value="'+DmAct[k]+'">'+k+'</option>';
}
hi+='</select>';
tval="${{Time}}$";
if(pulse)
{
tval="${{Time/Count}}$";
}
hi+='<b> '+tval+': </b><input type=text size=3 name=i_10_'+iz+'_'+tz+'_0'+a+' value=0>';
hi+='<br/><b> ${{Opt}}$:</b><select name=i_14_'+iz+'_'+tz+'_0'+a+'>';
for(k in DmOpt)
{
hi+='<option value="'+DmOpt[k]+'">'+k+'</option>';
}
hi+='</select>';
hi+='<input type=text size=15 name=i_15_'+iz+'_'+tz+'_0'+a+' value="">';
hi+='<br/><b> ${{Dst}}$: </b><input type=text size=15 name=i_04_'+iz+'_'+tz+'_0'+a+' value="0.0.0.0">';
hi+='</div>';
}
return hi;
}
function addInp(i,seld,name)
{
pulse=0;
InpT=new Object();
for(k in seld){InpT[k]=seld[k];}
if(i<4)
{
for(k in DmISR1){InpT[k]=DmISR1[k];}
pulse=1;
}
var iz=zfill(i,2);
hi+='<form name=diginp_'+iz+'>'+
'<b>'+name+' ${{name}}$:</b><input type=text size=20 name=i_08_'+iz+'_00_00 value="${{wait}}$...">'+
'<span onClick="toggleMe(\'inp'+i+'\',this);" style="padding:1px 1px" class="domoB pressB grayO grayB">${{Expand}}$ &or;</span><br/>'+
'<div id=inp'+i+' style="background-color: #EFEFEF; display:none;">'+
'<div class="tabf" id=tabf-'+i+'>'+
'<div id=tab_1-'+i+' class="tabon" onclick="tabC.chTab(this,'+i+');">${{Status}}$ Default</div>'+
'<div id=tab_2-'+i+' class="taboff" onclick="tabC.chTab(this,'+i+');">${{Status}}$ 2</div>'+
'<div id=tab_3-'+i+' class="taboff" onclick="tabC.chTab(this,'+i+');">${{Status}}$ 3</div>'+
'<div id=tab_4-'+i+' class="taboff" onclick="tabC.chTab(this,'+i+');">${{Status}}$ 4</div>'+
"</div>";
for(t=1;t<=4;t++)
{
var tz=zfill(t,2);
hi+='<div id=tab_'+t+'-'+i+'_data class="tcon" style="background-color:#BBBBBB;display:';
if(t==1) {hi+='table;"><div>';} else {hi+='none;"><div>';}
hi+='<b>${{Status name}}$: </b><input type=text size=25 name=i_09_'+iz+'_'+tz+'_00 value="${{wait}}..."><br/>'+
'<b>${{Enabled}}$:</b><select name=i_05_'+iz+'_'+tz+'_00><option value=0>${{No}}$</option><option value=1>${{Yes}}$</option></select>'+
' <b> ${{type}}$: </b><select name=i_11_'+iz+'_'+tz+'_00 onChange="chInOpt(\''+iz+'\',\''+tz+'\',this,'+i+');">';
for(k in InpT)
{
hi+='<option value="'+InpT[k]+'">'+k+'</option>';
}
hi+='</select><br/>'+
'<b>${{Min time}}$: </b><input type=text size=3 name=i_06_'+iz+'_'+tz+'_00 value=0>';
hi+='<hr>'+
'<div id=iopt_'+iz+'_'+tz+'>';
hi+=addInputOpts(iz,tz,i,pulse);
hi+='</div></div></div>';
}
delete InpT;
var fna='diginp_'+iz;
hi+='<span class="domoB pressB grayO grayB" onclick="hOpt(\''+fna+'\');sForm(\''+fna+'\',\'/ioconf.xml\',null);sOpt(\''+fna+'\');">${{Save}}$</span></form></div>';
}
for(i=1;i<=8;i++)
{
var iz=zfill(i,2);
addInp(i,DmInputType,'${{Input}}$ '+i);
// FINE INPUT
ho+='<form name=relays_'+iz+'>'+
'<b>${{Device name}}$ '+i+':</b> <input type=text size=20 name=o_04_'+iz+'_00_00 value="${{wait}}$..."><span onClick="toggleMe(\'out'+i+'\',this);" style="padding:1px 1px" class="domoB pressB grayO grayB">${{Expand}}$ &or;</span><br />'+
'<div id=out'+i+' style="background-color:#BBBBBB;display:none;">'+
'<b>${{Enabled}}$:</b><select name=o_02_'+iz+'_00_00><option value=0>${{No}}$</option><option value=1>${{Yes}}$</option></select>'+
' <b>${{Output type}}$: </b><select id=otype_'+iz+' name=o_10_'+iz+'_00_00 onChange="chRelOpt(\''+iz+'\');">';
for(k in DmOutputType)
{
ho+='<option value="'+DmOutputType[k]+'">'+k+'</option>';
}
ho+='</select><br/>'+
'<div id=ropt_'+i+'></div>'+
// FINE DEVICE
'<span class="domoB pressB grayO grayB" onclick="sForm(\'relays_'+iz+'\',\'/ioconf.xml\',null);">${{Save}}$</span>'+
'</div></form>';
}
$("cbox1").innerHTML+=hi+"</div>";
$("cbox2").innerHTML+=ho+"</div>";
hi="";
for(i=1;i<9;i++)
{
tabC.addTabs("tabf-"+i,i);
}
addROpt();
function setC(el,val)
{
if(typeof(el)!="undefined") {
var nname=el.nodeName;
if(el.name!="save")
{
if(nname=='SELECT')
{
l=el.length;
while(l){
if(el[--l].value==parseInt(val)){
el.selectedIndex=l;
l=0;
}
}
} else {
el.value=val;
}
}
}
}
function ioCf(xDt)
{
if(xDt)
{
for(f=1;f<9;f++)
{
var iname=getX(xDt,'i'+f);
var fz=zfill(f,2);
ie=$d.forms['diginp_'+fz];
el=ie.elements;
el["i_08_"+fz+"_00_00"].value=iname;
for(t=1;t<=4;t++)
{
tz=zfill(t,2);
var ix=getX(xDt,'i'+f+'s'+t);
var ixv=ix.split(";");
setC(el["i_09_"+fz+"_"+tz+"_00"],ixv[0]);
setC(el["i_06_"+fz+"_"+tz+"_00"],ixv[1]);
setC(el["i_05_"+fz+"_"+tz+"_00"],ixv[2]);
setC(el["i_11_"+fz+"_"+tz+"_00"],ixv[3]);
co=4;
for(ac=1;ac<=3;ac++)
{
acz=zfill(ac,2);
setC(el["i_02_"+fz+"_"+tz+"_"+acz],ixv[co]);
setC(el["i_04_"+fz+"_"+tz+"_"+acz],ixv[co+1]);
setC(el["i_10_"+fz+"_"+tz+"_"+acz],ixv[co+2]);
setC(el["i_03_"+fz+"_"+tz+"_"+acz],ixv[co+3]);
setC(el["i_07_"+fz+"_"+tz+"_"+acz],ixv[co+4]);
setC(el["i_01_"+fz+"_"+tz+"_"+acz],ixv[co+5]);
setC(el["i_14_"+fz+"_"+tz+"_"+acz],ixv[co+6]);
setC(el["i_15_"+fz+"_"+tz+"_"+acz],ixv[co+7]);
//co+=6;
co+=8;
}
chInOpt(fz,tz,el['i_11_'+fz+'_'+tz+'_00'],f);
}
if(f<9)
{
var ox=getX(xDt,'o'+f);
de=$d.forms['relays_'+fz];
el=de.elements;
var oxv=ox.split(";");
el["o_04_"+fz+"_00_00"].value=oxv[0]; // Output Name
setC(el["o_01_"+fz+"_00_00"],oxv[1]);
setC(el["o_09_"+fz+"_01_00"],oxv[2]);
setC(el["o_09_"+fz+"_02_00"],oxv[3]);
setC(el["o_06_"+fz+"_01_00"],oxv[4]);
setC(el["o_11_"+fz+"_01_00"],oxv[5]);
setC(el["o_06_"+fz+"_02_00"],oxv[6]);
setC(el["o_11_"+fz+"_02_00"],oxv[7]);
setC(el["o_08_"+fz+"_01_00"],oxv[8]);
setC(el["o_08_"+fz+"_02_00"],oxv[9]);
setC(el["o_05_"+fz+"_01_00"],oxv[10]);
setC(el["o_05_"+fz+"_02_00"],oxv[11]);
setC(el["o_07_"+fz+"_01_00"],oxv[12]);
setC(el["o_07_"+fz+"_02_00"],oxv[13]);
setC(el["o_03_"+fz+"_01_00"],oxv[14]);
setC(el["o_03_"+fz+"_02_00"],oxv[15]);
setC(el["o_10_"+fz+"_00_00"],oxv[16]);
setC(el["o_02_"+fz+"_00_00"],oxv[17]);
setC(el["o_12_"+fz+"_00_00"],oxv[18]);
setC(el["o_13_"+fz+"_00_00"],oxv[19]);
setC(el["o_14_"+fz+"_00_00"],oxv[20]);
setC(el["o_15_"+fz+"_00_00"],oxv[21]);
chRelOpt(fz);
}
sOpt('diginp_'+fz);
}
$('c1init').style.display="none";
$('c2init').style.display="none";
$('cbox1').style.display="block";
$('cbox2').style.display="block";
} else {
ACmd('ioconf.xml',ioCf);
}
}
ACmd('ioconf.xml',ioCf);
ftr();
</script>
<r>
<i1>~i(1,0)~</i1>
<i2>~i(2,0)~</i2>
<i3>~i(3,0)~</i3>
<i4>~i(4,0)~</i4>
<i5>~i(5,0)~</i5>
<i6>~i(6,0)~</i6>
<i7>~i(7,0)~</i7>
<i8>~i(8,0)~</i8>
<i1s1>~i(1,1)~</i1s1>
<i1s2>~i(1,2)~</i1s2>
<i1s3>~i(1,3)~</i1s3>
<i1s4>~i(1,4)~</i1s4>
<i2s1>~i(2,1)~</i2s1>
<i2s2>~i(2,2)~</i2s2>
<i2s3>~i(2,3)~</i2s3>
<i2s4>~i(2,4)~</i2s4>
<i3s1>~i(3,1)~</i3s1>
<i3s2>~i(3,2)~</i3s2>
<i3s3>~i(3,3)~</i3s3>
<i3s4>~i(3,4)~</i3s4>
<i4s1>~i(4,1)~</i4s1>
<i4s2>~i(4,2)~</i4s2>
<i4s3>~i(4,3)~</i4s3>
<i4s4>~i(4,4)~</i4s4>
<i5s1>~i(5,1)~</i5s1>
<i5s2>~i(5,2)~</i5s2>
<i5s3>~i(5,3)~</i5s3>
<i5s4>~i(5,4)~</i5s4>
<i6s1>~i(6,1)~</i6s1>
<i6s2>~i(6,2)~</i6s2>
<i6s3>~i(6,3)~</i6s3>
<i6s4>~i(6,4)~</i6s4>
<i7s1>~i(7,1)~</i7s1>
<i7s2>~i(7,2)~</i7s2>
<i7s3>~i(7,3)~</i7s3>
<i7s4>~i(7,4)~</i7s4>
<i8s1>~i(8,1)~</i8s1>
<i8s2>~i(8,2)~</i8s2>
<i8s3>~i(8,3)~</i8s3>
<i8s4>~i(8,4)~</i8s4>
<o1>~o(1)~</o1>
<o2>~o(2)~</o2>
<o3>~o(3)~</o3>
<o4>~o(4)~</o4>
<o5>~o(5)~</o5>
<o6>~o(6)~</o6>
<o7>~o(7)~</o7>
<o8>~o(8)~</o8>
</r>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script src=/js/d.js></script>
<script>hdr();</script>
<div id=content>
<h1>Network Conf</h1>
<form method=post action=/netcfg.htm name=config>
<fieldset>
<div><label>HW addr:</label>
<input type=text name=mac disabled /></div>
<div><label>Hostname:</label>
<input type=text name=host disabled /></div>
<div>&nbsp;</div>
<div><label>IP addr:</label>
<td><input type=text name=ip disabled /></div>
<div><label>Gateway:</label>
<td><input type=text name=gw disabled /></div>
<div><label>Subnet Mask:</label>
<td><input type=text name=sub disabled /></div>
<div><label>Web Port:</label>
<td><input type=text name=port disabled /></div>
<div><input type=submit class=sm value=Save name=save disabled /></div>
</fieldset>
</form>
</div>
<script>
function cBox() {
e=$d.forms.config;
e.ip.disabled=false;
e.gw.disabled=false;
e.sub.disabled=false;
}
function aFirstCB(xDt)
{
if(xDt)
{
e=$d.forms.config;
e.mac.value=getX(xDt,'cfg_mac');
e.host.value=getX(xDt,'cfg_hostname');
e.ip.value=getX(xDt,'cfg_ip');
e.gw.value=getX(xDt,'cfg_gw');
e.sub.value=getX(xDt,'cfg_subnet');
e.port.value=getX(xDt, 'wport');
cBox();
e.mac.disabled=false;
e.host.disabled=false;
e.port.disabled=false;
e.save.disabled=false;
}
}
ftr();
</script>
link ../../CommonPages/reboot.htm
\ No newline at end of file
link ../../CommonPages/upload.htm
\ No newline at end of file
link ../../CommonPages/users.htm
\ No newline at end of file
<r>
<stfail>~stfail~</stfail>
<stok>~stok~</stok>
<bst>~stan(2)~</bst>
<stan>~stan(1)~</stan>
<need_reboot>~need_reboot~</need_reboot>
<cfg_mac>~cfg_mac~</cfg_mac>
<cfg_hostname>~cfg_hostname~</cfg_hostname>
<cfg_ip>~cfg_ip~</cfg_ip>
<cfg_gw>~cfg_gw~</cfg_gw>
<cfg_subnet>~cfg_subnet~</cfg_subnet>
<cfg_tchkp>~cfg_tchkp~</cfg_tchkp>
<wport>~wp~</wport>
<upConf>~uplConf~</upConf>
<board>~board~</board>
<fwname>~fwname~</fwname>
<fwver>~fwver~</fwver>
<defmac>~defmac~</defmac>
<stv>~sver~</stv>
<bd>~bd~</bd>
<dt>~dt~</dt>
<nb>~nb~</nb>
<ap>~ap~</ap>
<np>~np~</np>
<epoch>~epoch~</epoch>
<r1>~rel(1)~</r1>
<r2>~rel(2)~</r2>
<r3>~rel(3)~</r3>
<r4>~rel(4)~</r4>
<r5>~rel(5)~</r5>
<r6>~rel(6)~</r6>
<r7>~rel(7)~</r7>
<r8>~rel(8)~</r8>
<i1>~inp(1)~</i1>
<i2>~inp(2)~</i2>
<i3>~inp(3)~</i3>
<i4>~inp(4)~</i4>
<i5>~inp(5)~</i5>
<i6>~inp(6)~</i6>
<i7>~inp(7)~</i7>
<i8>~inp(8)~</i8>
<b1>~btn(1)~</b1>
</r>
K 25
svn:wc:ra_dav:version-url
V 67
/microchip/!svn/ver/794/trunk/Unixmedia/Web/relaymaster84/Pages/cgi
END
relays.cgi
K 25
svn:wc:ra_dav:version-url
V 78
/microchip/!svn/ver/794/trunk/Unixmedia/Web/relaymaster84/Pages/cgi/relays.cgi
END
reset.cgi
K 25
svn:wc:ra_dav:version-url
V 77
/microchip/!svn/ver/794/trunk/Unixmedia/Web/relaymaster84/Pages/cgi/reset.cgi
END
bootload.cgi
K 25
svn:wc:ra_dav:version-url
V 80
/microchip/!svn/ver/794/trunk/Unixmedia/Web/relaymaster84/Pages/cgi/bootload.cgi
END
reboot.cgi
K 25
svn:wc:ra_dav:version-url
V 78
/microchip/!svn/ver/794/trunk/Unixmedia/Web/relaymaster84/Pages/cgi/reboot.cgi
END
10
dir
794
https://svn.unixmedia.net/microchip/trunk/Unixmedia/Web/relaymaster84/Pages/cgi
https://svn.unixmedia.net/microchip
2013-06-04T13:32:55.053652Z
794
nextime
9872420c-b032-40af-96d2-e8d557942bcc
relays.cgi
file
2011-09-18T23:33:01.000000Z
0c445946ce45970b4873c7dc1db100de
2013-06-04T13:32:55.053652Z
794
nextime
has-props
svn:special
35
reset.cgi
file
2011-09-18T23:33:01.000000Z
825afee21b5743ce9318c4516ddf3675
2013-06-04T13:32:55.053652Z
794
nextime
has-props
svn:special
34
bootload.cgi
file
2013-06-04T13:29:19.000000Z
d41d8cd98f00b204e9800998ecf8427e
2013-06-04T13:32:55.053652Z
794
nextime
0
reboot.cgi
file
2011-09-18T23:33:01.000000Z
24e74a695d4d8aca735d78511e8b3345
2013-06-04T13:32:55.053652Z
794
nextime
has-props
svn:special
35
link ../../../CommonPages/cgi/reboot.cgi
\ No newline at end of file
link ../../../CommonPages/cgi/relays.cgi
\ No newline at end of file
link ../../../CommonPages/cgi/reset.cgi
\ No newline at end of file
../../../CommonPages/cgi/reboot.cgi
\ No newline at end of file
../../../CommonPages/cgi/relays.cgi
\ No newline at end of file
../../../CommonPages/cgi/reset.cgi
\ No newline at end of file
../../CommonPages/config.bin
\ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script src=/js/d.js></script>
<script>hdr();</script>
<div id=content>
<h1>General Config</h1>
<form name=cff>
<h2>Generic Configurations</h2>
<fieldset>
<!-- <div><label>Debug:</label><input type=checkbox class=sm name=debug value=1 disabled /></div> -->
<div><label>TimeCheck:</label><input type=checkbox class=sm name=tchkp value=1 disabled /></div>
<div id=cs7><label>NET Buf Size:</label><input type=text class=num name=netbu disabled>1 to 99</div>
<div id=cs8><label>Act Port:</label><input type=text class=num name=aport disabled>1 to 65535</div>
<div id=cs9><label>Notify Port:</label><input type=text class=num name=nport disabled>1 to 65535</div>
<div id=btn></div>
<div><span class="domoB pressB grayO grayB" OnClick="sForm('cff','/config.htm',null)">Save</span></div>
</fieldset>
</form>
</div>
<script>
function cBox() {
e = $d.forms.cff;
}
function aLoopCB(xDt) {
e = $d.forms.cff;
}
function aFirstCB(xDt) {
if(xDt)
{
e = $d.forms.cff;
e.tchkp.disabled=false;
e.netbu.disabled=false;
e.aport.disabled=false;
e.nport.disabled=false;
if(getX(xDt,'cfg_tchkp')=='checked')
{
e.tchkp.checked=true;
} else {
e.tchkp.checked=false;
}
cBox();
e.netbu.value=getX(xDt,'nb');
e.aport.value=getX(xDt,'ap');
e.nport.value=getX(xDt,'np');
}
}
ftr();
</script>
../../CommonPages/devconf.bin
\ No newline at end of file
../../CommonPages/domotika.css
\ No newline at end of file
../../CommonPages/favicon.ico
\ No newline at end of file
K 25
svn:wc:ra_dav:version-url
V 67
/microchip/!svn/ver/795/trunk/Unixmedia/Web/relaymaster84/Pages/img
END
domotika.gif
K 25
svn:wc:ra_dav:version-url
V 80
/microchip/!svn/ver/795/trunk/Unixmedia/Web/relaymaster84/Pages/img/domotika.gif
END
10
dir
795
https://svn.unixmedia.net/microchip/trunk/Unixmedia/Web/relaymaster84/Pages/img
https://svn.unixmedia.net/microchip
2013-06-04T13:42:52.287275Z
795
nextime
9872420c-b032-40af-96d2-e8d557942bcc
domotika.gif
file
2011-09-18T23:33:11.000000Z
d3d78a71393c469d4c96d2ccff57db36
2013-06-04T13:42:52.287275Z
795
nextime
has-props
svn:special
37
link ../../../CommonPages/img/domotika.gif
\ No newline at end of file
../../../CommonPages/img/domotika.gif
\ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script src=/js/d.js></script>
<script>hdr();</script>
<div id=content>
<div id=status>
<div id=load style="display:none">No data</div>
<div id=display>
<div>
<p>RELAYS:<br/><span class=relays id=rl>
</span></p>
<p>INPUTS:<br/>
<span id=ip></span>
</p>
</div>
</div>
</div>
</div>
<script>
rl="|";
ip="";
for(i=1;i<=8;i++)
{
rl+='<a id=rel'+i+' onclick="ACmd(\'/cgi/relays.cgi?rel='+i+'\');">'+i+'</a>|';
ip+='<span id=inp'+i+'>'+i+'</span> &nbsp;';
}
$('rl').innerHTML=rl;
$('ip').innerHTML=ip;
function aLoopCB(xDt) {
if(!xDt)
{
$('display').style.display='none';
$('load').style.display='inline';
return;
}
$('load').style.display='none';
$('display').style.display='inline';
for(i=1;i<9;i++) {
if(getX(xDt,'r'+i)=='1')
{
$('rel'+i).style.color='#090';
}
else
{
$('rel'+i).style.color='#ddd';
}
}
for(i=1;i<9;i++) {
if(getX(xDt,'i'+i)=='up')
{
$('inp'+i).style.color='#3366ff';
}
else
{
$('inp'+i).style.color='#e00000';
}
}
}
ftr();
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script src=/js/d.js></script>
<script>hdr();</script>
<div id=content >
<h1>I/O Config</h1>
<hr><h2>${{Digital Inputs}}$</h2>
<div id=c1init>${{LOADING}}$...</div>
<div class=configbox id=cbox1 style="display:none"></div>
<hr><h2>${{Outputs}}$</h2>
<div id=c2init>${{LOADING}}$...</div>
<div class=configbox id=cbox2 style="display:none">
</div>
</div>
<script>
var ho="";
var hi="";
function chRelOpt(iz)
{
os=$('otype_'+iz);
osel=os.selectedIndex;
oselv=parseInt(os[osel].value);
nrel=0;
seq="none";
ctxdiv='block';
if(oselv>0)
nrel=1;
if(oselv>=0xf0)
nrel=2;
if(oselv==0xff)
{
nrel=255;
seq="block";
nrel=0;
ctxdiv='none';
}
if(oselv==244)
$('og'+iz).style.display="block";
else
$('og'+iz).style.display="none";
$('ctxd'+iz).style.display=ctxdiv;
for(nr=1;nr<=2;nr++)
{
nrz=zfill(nr,2);
rdiv="none";
if(nr<=nrel){rdiv='block';}
$('rdiv_'+iz+'_'+nrz).style.display=rdiv;
}
$('seq'+iz).style.display=seq;
}
function addROpt()
{
for(i=1;i<=8;i++)
{
ho=" ";
var iz=zfill(i,2);
ho+='<div id=ctxd'+iz+' style="display:none"><b> Ctx: <select name=o_01_'+iz+'_00_00></b>';
for(k in DmCtx)
{
ho+='<option value="'+DmCtx[k]+'">'+k+'</option>';
}
ho+='</select><br /><br />';
// Output per cancelli
ho+='<div id=og'+iz+' style="display:none"><b>${{startt}}$: </b><input type=text size=3 name=o_12_'+iz+'_00_00 value=0><b>${{opent}}$: </b><input type=text size=3 name=o_13_'+iz+'_00_00 value=0><b>${{pauset}}$: </b><input type=text size=3 name=o_14_'+iz+'_00_00 value=0><br/><b>${{Banging}}$:</b><select name=o_15_'+iz+'_00_00><option value=0>${{No}}$</option><option value=1>${{Yes}}$</option></select></div>';
// Fine output per cancelli
ho+='<br/></div>';
for(nr=1;nr<=2;nr++)
{
var nrz=zfill(nr,2);
ho+='<div id=rdiv_'+iz+'_'+nrz+' style="display:none"><hr><b> R'+nr+': </b><select name=o_05_'+iz+'_'+nrz+'_00><option value="0">${{None}}$</option>';
for(rn=1;rn<=8;rn++)
{
ho+='<option value='+rn+'>${{Relay}}$ '+rn+'</option>';
}
ho+='</select>'+
'<select name=o_07_'+iz+'_'+nrz+'_00><option value=0>NA (${{Open}}$)</option><option value=1>NC (${{Close}}$)</option><option value=2>${{Save}}$</option></select><br/>'+
'<b>${{runtime}}$: </b><input type=text size=3 name=o_09_'+iz+'_'+nrz+'_00 value=0>'+
'<b> ${{Retard}}$: <b><input type=text size=3 name=o_08_'+iz+'_'+nrz+'_00 value=0>'+
'<br/></div>';
}
ho+='<div id=seq'+iz+' style="display:none">${{SEQUENCE}}$</div>';
$("ropt_"+i).innerHTML=ho;
}
}
function chInOpt(iz,tz,sel,i)
{
osel=sel.selectedIndex;
oselv=parseInt(sel[osel].value);
maxact=0;
if(oselv)
{
if(oselv<160) // 0xa0
maxact=1;
else if(oselv<208) // 0xd0
maxact=2;
else
maxact=3;
}
for(a=1;a<=3;a++) {
actvis="none";
if(a<=maxact) {actvis="block";}
$('adiv'+iz+tz+'_'+a).style.display=actvis;
}
}
function addInputOpts(iz,tz,i,pulse)
{
var hi="";
for(a=1;a<=3;a++) {
hi+='<div id=adiv'+iz+tz+'_'+a+' style="display:none">';
if(a>1) { hi+='<br /><hr><br/>'; }
hi+='<b>${{action}}$ '+a+': </b><input type=text size=25 name=i_02_'+iz+'_'+tz+'_0'+a+' value="${{wait}}$..."><br/>';
hi+='<b> ${{msg}}$:</b><select name=i_07_'+iz+'_'+tz+'_0'+a+'>';
for(k in DmMsgType)
{
hi+='<option value="'+DmMsgType[k]+'">'+k+'</option>';
}
hi+='</select>';
hi+='<b> ${{ctx}}$:</b><select name=i_03_'+iz+'_'+tz+'_0'+a+'>';
for(k in DmCtx)
{
hi+='<option value="'+DmCtx[k]+'">'+k+'</option>';
}
hi+='</select><br/>';
hi+='<b> ${{act}}$:</b><select name=i_01_'+iz+'_'+tz+'_0'+a+'>';
for(k in DmAct)
{
hi+='<option value="'+DmAct[k]+'">'+k+'</option>';
}
hi+='</select>';
tval="${{Time}}$";
if(pulse)
{
tval="${{Time/Count}}$";
}
hi+='<b> '+tval+': </b><input type=text size=3 name=i_10_'+iz+'_'+tz+'_0'+a+' value=0>';
hi+='<br/><b> ${{Opt}}$:</b><select name=i_14_'+iz+'_'+tz+'_0'+a+'>';
for(k in DmOpt)
{
hi+='<option value="'+DmOpt[k]+'">'+k+'</option>';
}
hi+='</select>';
hi+='<input type=text size=15 name=i_15_'+iz+'_'+tz+'_0'+a+' value="">';
hi+='<br/><b> ${{Dst}}$: </b><input type=text size=15 name=i_04_'+iz+'_'+tz+'_0'+a+' value="0.0.0.0">';
hi+='</div>';
}
return hi;
}
function addInp(i,seld,name)
{
pulse=0;
InpT=new Object();
for(k in seld){InpT[k]=seld[k];}
if(i<4)
{
for(k in DmISR1){InpT[k]=DmISR1[k];}
pulse=1;
}
var iz=zfill(i,2);
hi+='<form name=diginp_'+iz+'>'+
'<b>'+name+' ${{name}}$:</b><input type=text size=20 name=i_08_'+iz+'_00_00 value="${{wait}}$...">'+
'<span onClick="toggleMe(\'inp'+i+'\',this);" style="padding:1px 1px" class="domoB pressB grayO grayB">${{Expand}}$ &or;</span><br/>'+
'<div id=inp'+i+' style="background-color: #EFEFEF; display:none;">'+
'<div class="tabf" id=tabf-'+i+'>'+
'<div id=tab_1-'+i+' class="tabon" onclick="tabC.chTab(this,'+i+');">${{Status}}$ Default</div>'+
'<div id=tab_2-'+i+' class="taboff" onclick="tabC.chTab(this,'+i+');">${{Status}}$ 2</div>'+
'<div id=tab_3-'+i+' class="taboff" onclick="tabC.chTab(this,'+i+');">${{Status}}$ 3</div>'+
'<div id=tab_4-'+i+' class="taboff" onclick="tabC.chTab(this,'+i+');">${{Status}}$ 4</div>'+
"</div>";
for(t=1;t<=4;t++)
{
var tz=zfill(t,2);
hi+='<div id=tab_'+t+'-'+i+'_data class="tcon" style="background-color:#BBBBBB;display:';
if(t==1) {hi+='table;"><div>';} else {hi+='none;"><div>';}
hi+='<b>${{Status name}}$: </b><input type=text size=25 name=i_09_'+iz+'_'+tz+'_00 value="${{wait}}..."><br/>'+
'<b>${{Enabled}}$:</b><select name=i_05_'+iz+'_'+tz+'_00><option value=0>${{No}}$</option><option value=1>${{Yes}}$</option></select>'+
' <b> ${{type}}$: </b><select name=i_11_'+iz+'_'+tz+'_00 onChange="chInOpt(\''+iz+'\',\''+tz+'\',this,'+i+');">';
for(k in InpT)
{
hi+='<option value="'+InpT[k]+'">'+k+'</option>';
}
hi+='</select><br/>'+
'<b>${{Min time}}$: </b><input type=text size=3 name=i_06_'+iz+'_'+tz+'_00 value=0>';
hi+='<hr>'+
'<div id=iopt_'+iz+'_'+tz+'>';
hi+=addInputOpts(iz,tz,i,pulse);
hi+='</div></div></div>';
}
delete InpT;
var fna='diginp_'+iz;
hi+='<span class="domoB pressB grayO grayB" onclick="hOpt(\''+fna+'\');sForm(\''+fna+'\',\'/ioconf.xml\',null);sOpt(\''+fna+'\');">${{Save}}$</span></form></div>';
}
for(i=1;i<=8;i++)
{
var iz=zfill(i,2);
addInp(i,DmInputType,'${{Input}}$ '+i);
// FINE INPUT
ho+='<form name=relays_'+iz+'>'+
'<b>${{Device name}}$ '+i+':</b> <input type=text size=20 name=o_04_'+iz+'_00_00 value="${{wait}}$..."><span onClick="toggleMe(\'out'+i+'\',this);" style="padding:1px 1px" class="domoB pressB grayO grayB">${{Expand}}$ &or;</span><br />'+
'<div id=out'+i+' style="background-color:#BBBBBB;display:none;">'+
'<b>${{Enabled}}$:</b><select name=o_02_'+iz+'_00_00><option value=0>${{No}}$</option><option value=1>${{Yes}}$</option></select>'+
' <b>${{Output type}}$: </b><select id=otype_'+iz+' name=o_10_'+iz+'_00_00 onChange="chRelOpt(\''+iz+'\');">';
for(k in DmOutputType)
{
ho+='<option value="'+DmOutputType[k]+'">'+k+'</option>';
}
ho+='</select><br/>'+
'<div id=ropt_'+i+'></div>'+
// FINE DEVICE
'<span class="domoB pressB grayO grayB" onclick="sForm(\'relays_'+iz+'\',\'/ioconf.xml\',null);">${{Save}}$</span>'+
'</div></form>';
}
$("cbox1").innerHTML+=hi+"</div>";
$("cbox2").innerHTML+=ho+"</div>";
hi="";
for(i=1;i<9;i++)
{
tabC.addTabs("tabf-"+i,i);
}
addROpt();
function setC(el,val)
{
if(typeof(el)!="undefined") {
var nname=el.nodeName;
if(el.name!="save")
{
if(nname=='SELECT')
{
l=el.length;
while(l){
if(el[--l].value==parseInt(val)){
el.selectedIndex=l;
l=0;
}
}
} else {
el.value=val;
}
}
}
}
function ioCf(xDt)
{
if(xDt)
{
for(f=1;f<9;f++)
{
var iname=getX(xDt,'i'+f);
var fz=zfill(f,2);
ie=$d.forms['diginp_'+fz];
el=ie.elements;
el["i_08_"+fz+"_00_00"].value=iname;
for(t=1;t<=4;t++)
{
tz=zfill(t,2);
var ix=getX(xDt,'i'+f+'s'+t);
var ixv=ix.split(";");
setC(el["i_09_"+fz+"_"+tz+"_00"],ixv[0]);
setC(el["i_06_"+fz+"_"+tz+"_00"],ixv[1]);
setC(el["i_05_"+fz+"_"+tz+"_00"],ixv[2]);
setC(el["i_11_"+fz+"_"+tz+"_00"],ixv[3]);
co=4;
for(ac=1;ac<=3;ac++)
{
acz=zfill(ac,2);
setC(el["i_02_"+fz+"_"+tz+"_"+acz],ixv[co]);
setC(el["i_04_"+fz+"_"+tz+"_"+acz],ixv[co+1]);
setC(el["i_10_"+fz+"_"+tz+"_"+acz],ixv[co+2]);
setC(el["i_03_"+fz+"_"+tz+"_"+acz],ixv[co+3]);
setC(el["i_07_"+fz+"_"+tz+"_"+acz],ixv[co+4]);
setC(el["i_01_"+fz+"_"+tz+"_"+acz],ixv[co+5]);
setC(el["i_14_"+fz+"_"+tz+"_"+acz],ixv[co+6]);
setC(el["i_15_"+fz+"_"+tz+"_"+acz],ixv[co+7]);
//co+=6;
co+=8;
}
chInOpt(fz,tz,el['i_11_'+fz+'_'+tz+'_00'],f);
}
if(f<9)
{
var ox=getX(xDt,'o'+f);
de=$d.forms['relays_'+fz];
el=de.elements;
var oxv=ox.split(";");
el["o_04_"+fz+"_00_00"].value=oxv[0]; // Output Name
setC(el["o_01_"+fz+"_00_00"],oxv[1]);
setC(el["o_09_"+fz+"_01_00"],oxv[2]);
setC(el["o_09_"+fz+"_02_00"],oxv[3]);
setC(el["o_06_"+fz+"_01_00"],oxv[4]);
setC(el["o_11_"+fz+"_01_00"],oxv[5]);
setC(el["o_06_"+fz+"_02_00"],oxv[6]);
setC(el["o_11_"+fz+"_02_00"],oxv[7]);
setC(el["o_08_"+fz+"_01_00"],oxv[8]);
setC(el["o_08_"+fz+"_02_00"],oxv[9]);
setC(el["o_05_"+fz+"_01_00"],oxv[10]);
setC(el["o_05_"+fz+"_02_00"],oxv[11]);
setC(el["o_07_"+fz+"_01_00"],oxv[12]);
setC(el["o_07_"+fz+"_02_00"],oxv[13]);
setC(el["o_03_"+fz+"_01_00"],oxv[14]);
setC(el["o_03_"+fz+"_02_00"],oxv[15]);
setC(el["o_10_"+fz+"_00_00"],oxv[16]);
setC(el["o_02_"+fz+"_00_00"],oxv[17]);
setC(el["o_12_"+fz+"_00_00"],oxv[18]);
setC(el["o_13_"+fz+"_00_00"],oxv[19]);
setC(el["o_14_"+fz+"_00_00"],oxv[20]);
setC(el["o_15_"+fz+"_00_00"],oxv[21]);
chRelOpt(fz);
}
sOpt('diginp_'+fz);
}
$('c1init').style.display="none";
$('c2init').style.display="none";
$('cbox1').style.display="block";
$('cbox2').style.display="block";
} else {
ACmd('ioconf.xml',ioCf);
}
}
ACmd('ioconf.xml',ioCf);
ftr();
</script>
<r>
<i1>~i(1,0)~</i1>
<i2>~i(2,0)~</i2>
<i3>~i(3,0)~</i3>
<i4>~i(4,0)~</i4>
<i5>~i(5,0)~</i5>
<i6>~i(6,0)~</i6>
<i7>~i(7,0)~</i7>
<i8>~i(8,0)~</i8>
<i1s1>~i(1,1)~</i1s1>
<i1s2>~i(1,2)~</i1s2>
<i1s3>~i(1,3)~</i1s3>
<i1s4>~i(1,4)~</i1s4>
<i2s1>~i(2,1)~</i2s1>
<i2s2>~i(2,2)~</i2s2>
<i2s3>~i(2,3)~</i2s3>
<i2s4>~i(2,4)~</i2s4>
<i3s1>~i(3,1)~</i3s1>
<i3s2>~i(3,2)~</i3s2>
<i3s3>~i(3,3)~</i3s3>
<i3s4>~i(3,4)~</i3s4>
<i4s1>~i(4,1)~</i4s1>
<i4s2>~i(4,2)~</i4s2>
<i4s3>~i(4,3)~</i4s3>
<i4s4>~i(4,4)~</i4s4>
<i5s1>~i(5,1)~</i5s1>
<i5s2>~i(5,2)~</i5s2>
<i5s3>~i(5,3)~</i5s3>
<i5s4>~i(5,4)~</i5s4>
<i6s1>~i(6,1)~</i6s1>
<i6s2>~i(6,2)~</i6s2>
<i6s3>~i(6,3)~</i6s3>
<i6s4>~i(6,4)~</i6s4>
<i7s1>~i(7,1)~</i7s1>
<i7s2>~i(7,2)~</i7s2>
<i7s3>~i(7,3)~</i7s3>
<i7s4>~i(7,4)~</i7s4>
<i8s1>~i(8,1)~</i8s1>
<i8s2>~i(8,2)~</i8s2>
<i8s3>~i(8,3)~</i8s3>
<i8s4>~i(8,4)~</i8s4>
<o1>~o(1)~</o1>
<o2>~o(2)~</o2>
<o3>~o(3)~</o3>
<o4>~o(4)~</o4>
<o5>~o(5)~</o5>
<o6>~o(6)~</o6>
<o7>~o(7)~</o7>
<o8>~o(8)~</o8>
</r>
K 25
svn:wc:ra_dav:version-url
V 66
/microchip/!svn/ver/795/trunk/Unixmedia/Web/relaymaster84/Pages/js
END
hdr.html2js
K 25
svn:wc:ra_dav:version-url
V 78
/microchip/!svn/ver/795/trunk/Unixmedia/Web/relaymaster84/Pages/js/hdr.html2js
END
constant.js.prepend
K 25
svn:wc:ra_dav:version-url
V 86
/microchip/!svn/ver/795/trunk/Unixmedia/Web/relaymaster84/Pages/js/constant.js.prepend
END
opt.js.postpend
K 25
svn:wc:ra_dav:version-url
V 82
/microchip/!svn/ver/795/trunk/Unixmedia/Web/relaymaster84/Pages/js/opt.js.postpend
END
ftr.html2js
K 25
svn:wc:ra_dav:version-url
V 78
/microchip/!svn/ver/795/trunk/Unixmedia/Web/relaymaster84/Pages/js/ftr.html2js
END
d.js
K 25
svn:wc:ra_dav:version-url
V 71
/microchip/!svn/ver/795/trunk/Unixmedia/Web/relaymaster84/Pages/js/d.js
END
10
dir
795
https://svn.unixmedia.net/microchip/trunk/Unixmedia/Web/relaymaster84/Pages/js
https://svn.unixmedia.net/microchip
2013-06-04T13:42:52.287275Z
795
nextime
9872420c-b032-40af-96d2-e8d557942bcc
hdr.html2js
file
2013-06-04T13:42:21.000000Z
4e72b442d27b4ee3bdaf6bb954383738
2013-06-04T13:42:52.287275Z
795
nextime
1594
constant.js.prepend
file
2013-06-04T13:28:43.000000Z
758978b423536d2b41f27c8af7dfe069
2013-06-04T13:42:52.287275Z
795
nextime
has-props
2810
opt.js.postpend
file
2012-10-17T20:04:33.000000Z
f10ec1a2771330a5fd4180b38695b409
2013-06-04T13:42:52.287275Z
795
nextime
has-props
svn:special
39
ftr.html2js
file
2011-09-18T23:33:23.000000Z
5aa0b6ac42ab0d9b684d8eb505e4246b
2013-06-04T13:42:52.287275Z
795
nextime
has-props
svn:special
35
d.js
file
2011-09-18T23:33:23.000000Z
42a9ff8bdf954a828cfca7c0a05a89f8
2013-06-04T13:42:52.287275Z
795
nextime
has-props
svn:special
28
//DmAct=new Object();
//personObj.firstname="John";
DmAct={
${{None}}$:0,
${{On}}$:1,
${{Off}}$:2,
${{Change}}$:3,
${{Openit}}$:4,
${{Closeit}}$:5,
${{Up}}$:6,
${{Down}}$:7,
${{Stop}}$:8,
${{Start}}$:9,
//${{StopTimered}}$:0x0a,
${{StartTimered}}$:11,
${{BlockUnblock}}$:0x0c,
${{Block}}$:0x0d,
${{Unblock}}$:0x0e,
${{Hi}}$:15,
${{Low}}$:16,
//${{Equal}}$:0x11,
//${{Expired}}$:0x12,
//${{Timedout}}$:0x123,
//${{Changed}}$:0x14,
//${{SwitchedOn}}$:0x15,
//${{SwitchedOff}}$:0x16,
${{Call}}$:23,
//${{Answer}}$:0x18,
${{Ring}}$:25,
${{Play}}$:26,
${{Pause}}$:27,
${{PauseClosing}}$:28,
${{PauseOpening}}$:29,
${{Next}}$:30,
${{Board}}$:253,
${{Debug}}$:255
};
DmMsgType={
${{None}}$:0,
//${{Request}}$:1,
${{Action}}$:2,
${{Ack}}$:3,
${{Notify}}$:4,
//${{Notifyconf}}$:5,
${{Requestconf}}$:6,
//${{Setconf}}$:7,
${{Debug}}$:255
};
DmCtx={
${{None}}$:0,
${{Light}}$:1,
${{Socket}}$:2,
${{Blind}}$:3,
${{Sensor}}$:4,
${{Door}}$:5,
${{Window}}$:6,
${{Valvle}}$:7,
${{Status}}$:8,
${{Scenary}}$:9,
${{Alarm}}$:10,
${{Citophone}}$:11,
${{Generic_Switch}}$:12,
${{Thermostat}}$:13,
${{Gate}}$:14,
${{Audio}}$:15,
${{Video}}$:16,
${{Phone}}$:17,
${{Tv}}$:18,
${{Irrigation}}$:19,
${{Timer}}$:20,
${{Internet}}$:21,
${{Message}}$:22,
${{Rfid}}$:23,
${{Pump}}$:24,
${{Motor}}$:25,
${{Tent}}$:26,
${{Rtc}}$:32,
${{Sequence}}$:33,
${{System}}$:65534,
${{User}}$:65535
};
DmISR1={
${{PulseOpen}}$:144,
${{PulseOpenCount}}$:145,
${{PulseClose}}$:146,
${{PulseCloseCount}}$:147,
${{PulseOpenDouble}}$:192,
${{PulseCloseDouble}}$:193
};
/*
DmISR2={
${{PulseChange}}$:0x94,
${{PulseChangeCount}}$:0x95,
${{PulseChangeDouble}}$:0xc2
};
*/
DmInputType={
${{None}}$:0,
${{SingleClick}}$:1,
//${{LongClick}}$:0x02,
//${{Change}}$:3,
//${{ContinuosOpen}}$:4,
//${{ContinuosClose}}$:5,
${{DoubleClick}}$:160,
${{SingleAndLong}}$:161,
//${{SingleAndContinuosClose}}$:0xa2,
${{OpenClose}}$:163,
${{ContinuosOpenClose}}$:164,
${{TripleClick}}$:208
//${{Seq2}}$:176,
//${{Seq2Step}}$:177,
//${{Seq3}}$:224,
//${{Seq3Step}}$:225
};
DmOutputType={
${{None}}$:0,
${{OnOff}}$:1,
//${{Pulse}}$:0x02,
//${{Temporized}}$:0x03,
//${{Intermittent}}$:0x04,
//${{IntermittentTemporized}}$:0x05,
//${{Signal}}$:6,
${{Dev2RelaysExclusive}}$:240
//${{Dev2RelaysInclusiveOn}}$:241,
//${{Dev2RelaysInclusiveOff}}$:242,
//${{Dev2RelaysAlternateSeq}}$:0xf3,
//${{OpenClose2Relays}}$:0xf4
//${{Sequenza}}$:0xff
};
DmOpt={
${{None}}$:0,
${{RGB}}$:1,
${{PRESET}}$:2,
${{DIMMER}}$:3,
${{HEX}}$:255
};
link ../../../CommonPages/js/d.js
\ No newline at end of file
link ../../../CommonPages/js/ftr.html2js
\ No newline at end of file
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Domotika board</title>
<link href=/domotika.css rel=stylesheet type="text/css" />
<link rel="shortcut icon" href=/favicon.ico />
</head>
<body>
<div id=page>
<div style="padding: 0pt 0pt 5px 5px;"><img alt="Domotika" src="/img/domotika.gif"><span style="font-size:34px">&nbsp;&nbsp;Ambient Intelligence</span><span style="float:right"><fieldset>
<div><span><b>Fw name:</b>&nbsp;</span><span id=fwn></span></div>
<div><span><b>Fw version:</b>&nbsp;</span><span id=fwv></span></div>
<div><span><b>Serial/def MAC:</b>&nbsp;</span><span id=dm></span></div>
<div><span><b>Build date:</b>&nbsp;</span><span id=bd></span></div>
<div><span><b>Board:</b>&nbsp;</span><span id=bo></span></div>
</fieldset></span></div>
<div id=title><div><span class=left id=dt hidden></span><span class=right>Domotika system</span></div></div>
<div id=menu>
<div class="ress ok" id=stok style="display:none;">OK Saved.</div>
<div class="ress fail" id=stfail style="display:none;">KO Error saving.</div>
<div class="ress fail" id=connf style="display:none;">NO CONNECTION.</div>
<div class="ress" id=stan></div>
<div>
<br/>
<a href=/index.htm>Home</a>
<a href=/ioconf.htm>I/O cfg</a>
<a href=/users.htm>Auth cfg</a>
<a href=/config.htm>other cfgs</a>
<a href=/netcfg.htm>Network cfg</a>
<a href=/upload.htm>save/restore cfg</a>
<a href=/reboot.htm?r onClick="return confirm(\'Are you sure?\', \'Reset board cfg\');">Restore defaults</a>
<a href=/reboot.htm onClick="return confirm(\'Are you sure?\', \'Reboot\');">Reboot</a>
</div>
</div>
link ../../../CommonPages/js/opt.js.postpend
\ No newline at end of file
//DmAct=new Object();
//personObj.firstname="John";
DmAct={
${{None}}$:0,
${{On}}$:1,
${{Off}}$:2,
${{Change}}$:3,
${{Openit}}$:4,
${{Closeit}}$:5,
${{Up}}$:6,
${{Down}}$:7,
${{Stop}}$:8,
${{Start}}$:9,
//${{StopTimered}}$:0x0a,
${{StartTimered}}$:11,
${{BlockUnblock}}$:0x0c,
${{Block}}$:0x0d,
${{Unblock}}$:0x0e,
${{Hi}}$:15,
${{Low}}$:16,
//${{Equal}}$:0x11,
//${{Expired}}$:0x12,
//${{Timedout}}$:0x123,
//${{Changed}}$:0x14,
//${{SwitchedOn}}$:0x15,
//${{SwitchedOff}}$:0x16,
${{Call}}$:23,
//${{Answer}}$:0x18,
${{Ring}}$:25,
${{Play}}$:26,
${{Pause}}$:27,
${{PauseClosing}}$:28,
${{PauseOpening}}$:29,
${{Next}}$:30,
${{Board}}$:253,
${{Debug}}$:255
};
DmMsgType={
${{None}}$:0,
//${{Request}}$:1,
${{Action}}$:2,
${{Ack}}$:3,
${{Notify}}$:4,
//${{Notifyconf}}$:5,
${{Requestconf}}$:6,
//${{Setconf}}$:7,
${{Debug}}$:255
};
DmCtx={
${{None}}$:0,
${{Light}}$:1,
${{Socket}}$:2,
${{Blind}}$:3,
${{Sensor}}$:4,
${{Door}}$:5,
${{Window}}$:6,
${{Valvle}}$:7,
${{Status}}$:8,
${{Scenary}}$:9,
${{Alarm}}$:10,
${{Citophone}}$:11,
${{Generic_Switch}}$:12,
${{Thermostat}}$:13,
${{Gate}}$:14,
${{Audio}}$:15,
${{Video}}$:16,
${{Phone}}$:17,
${{Tv}}$:18,
${{Irrigation}}$:19,
${{Timer}}$:20,
${{Internet}}$:21,
${{Message}}$:22,
${{Rfid}}$:23,
${{Pump}}$:24,
${{Motor}}$:25,
${{Tent}}$:26,
${{Rtc}}$:32,
${{Sequence}}$:33,
${{System}}$:65534,
${{User}}$:65535
};
DmISR1={
${{PulseOpen}}$:144,
${{PulseOpenCount}}$:145,
${{PulseClose}}$:146,
${{PulseCloseCount}}$:147,
${{PulseOpenDouble}}$:192,
${{PulseCloseDouble}}$:193
};
/*
DmISR2={
${{PulseChange}}$:0x94,
${{PulseChangeCount}}$:0x95,
${{PulseChangeDouble}}$:0xc2
};
*/
DmInputType={
${{None}}$:0,
${{SingleClick}}$:1,
//${{LongClick}}$:0x02,
//${{Change}}$:3,
//${{ContinuosOpen}}$:4,
//${{ContinuosClose}}$:5,
${{DoubleClick}}$:160,
${{SingleAndLong}}$:161,
//${{SingleAndContinuosClose}}$:0xa2,
${{OpenClose}}$:163,
${{ContinuosOpenClose}}$:164,
${{TripleClick}}$:208
//${{Seq2}}$:176,
//${{Seq2Step}}$:177,
//${{Seq3}}$:224,
//${{Seq3Step}}$:225
};
DmOutputType={
${{None}}$:0,
${{OnOff}}$:1,
//${{Pulse}}$:0x02,
//${{Temporized}}$:0x03,
//${{Intermittent}}$:0x04,
//${{IntermittentTemporized}}$:0x05,
//${{Signal}}$:6,
${{Dev2RelaysExclusive}}$:240
//${{Dev2RelaysInclusiveOn}}$:241,
//${{Dev2RelaysInclusiveOff}}$:242,
//${{Dev2RelaysAlternateSeq}}$:0xf3,
//${{OpenClose2Relays}}$:0xf4
//${{Sequenza}}$:0xff
};
DmOpt={
${{None}}$:0,
${{RGB}}$:1,
${{PRESET}}$:2,
${{DIMMER}}$:3,
${{HEX}}$:255
};
../../../CommonPages/js/d.js
\ No newline at end of file
../../../CommonPages/js/ftr.html2js
\ No newline at end of file
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Domotika board</title>
<link href=/domotika.css rel=stylesheet type="text/css" />
<link rel="shortcut icon" href=/favicon.ico />
</head>
<body>
<div id=page>
<div style="padding: 0pt 0pt 5px 5px;"><img alt="Domotika" src="/img/domotika.gif"><span style="font-size:34px">&nbsp;&nbsp;Ambient Intelligence</span><span style="float:right"><fieldset>
<div><span><b>Fw name:</b>&nbsp;</span><span id=fwn></span></div>
<div><span><b>Fw version:</b>&nbsp;</span><span id=fwv></span></div>
<div><span><b>Serial/def MAC:</b>&nbsp;</span><span id=dm></span></div>
<div><span><b>Build date:</b>&nbsp;</span><span id=bd></span></div>
<div><span><b>Board:</b>&nbsp;</span><span id=bo></span></div>
</fieldset></span></div>
<div id=title><div><span class=left id=dt hidden></span><span class=right>Domotika system</span></div></div>
<div id=menu>
<div class="ress ok" id=stok style="display:none;">OK Saved.</div>
<div class="ress fail" id=stfail style="display:none;">KO Error saving.</div>
<div class="ress fail" id=connf style="display:none;">NO CONNECTION.</div>
<div class="ress" id=stan></div>
<div>
<br/>
<a href=/index.htm>Home</a>
<a href=/ioconf.htm>I/O cfg</a>
<a href=/users.htm>Auth cfg</a>
<a href=/config.htm>other cfgs</a>
<a href=/netcfg.htm>Network cfg</a>
<a href=/upload.htm>save/restore cfg</a>
<a href=/reboot.htm?r onClick="return confirm(\'Are you sure?\', \'Reset board cfg\');">Restore defaults</a>
<a href=/reboot.htm onClick="return confirm(\'Are you sure?\', \'Reboot\');">Reboot</a>
</div>
</div>
../../../CommonPages/js/opt.js.postpend
\ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script src=/js/d.js></script>
<script>hdr();</script>
<div id=content>
<h1>Network Conf</h1>
<form method=post action=/netcfg.htm name=config>
<fieldset>
<div><label>HW addr:</label>
<input type=text name=mac disabled /></div>
<div><label>Hostname:</label>
<input type=text name=host disabled /></div>
<div>&nbsp;</div>
<div><label>IP addr:</label>
<td><input type=text name=ip disabled /></div>
<div><label>Gateway:</label>
<td><input type=text name=gw disabled /></div>
<div><label>Subnet Mask:</label>
<td><input type=text name=sub disabled /></div>
<div><label>Web Port:</label>
<td><input type=text name=port disabled /></div>
<div><input type=submit class=sm value=Save name=save disabled /></div>
</fieldset>
</form>
</div>
<script>
function cBox() {
e=$d.forms.config;
e.ip.disabled=false;
e.gw.disabled=false;
e.sub.disabled=false;
}
function aFirstCB(xDt)
{
if(xDt)
{
e=$d.forms.config;
e.mac.value=getX(xDt,'cfg_mac');
e.host.value=getX(xDt,'cfg_hostname');
e.ip.value=getX(xDt,'cfg_ip');
e.gw.value=getX(xDt,'cfg_gw');
e.sub.value=getX(xDt,'cfg_subnet');
e.port.value=getX(xDt, 'wport');
cBox();
e.mac.disabled=false;
e.host.disabled=false;
e.port.disabled=false;
e.save.disabled=false;
}
}
ftr();
</script>
../../CommonPages/reboot.htm
\ No newline at end of file
../../CommonPages/upload.htm
\ No newline at end of file
../../CommonPages/users.htm
\ No newline at end of file
#!/usr/bin/env python
import slimmer
import sys, os
if len(sys.argv) == 3:
if os.path.isfile(sys.argv[1]) and not os.path.isfile(sys.argv[2]):
print 'Compressing file', sys.argv[1]
f=open(sys.argv[1], 'r')
content=f.read()
f.close()
compressed=slimmer.slimmer(content)
f=open(sys.argv[2], 'w')
f.write(compressed)
f.close()
print 'done.'
#!/usr/bin/env python
import slimmer
import sys, os
def convertFile(html2jsname):
print 'Converting file',html2jsname
f=open(html2jsname+".html2js", 'r')
content=f.read()
f.close()
compressed=slimmer.slimmer(content)
compressed.replace("\r\n", "\\n")
compressed.replace("\r", "\\n")
compressed.replace("\\","\\\\")
compressed.replace("'", "\\'")
compressed.replace("\n", "\\n'")
return "document.write('"+compressed+"');"
if __name__ == "__main__" and len(sys.argv) > 1:
if len(sys.argv)==2 or sys.argv[2]=='nofunc':
jsname=sys.argv[1].replace('.html2js', '.js')
html2jsname=sys.argv[1].replace('.html2js', '')
if os.path.isfile(sys.argv[1]) and not os.path.isfile(jsname):
cont=convertFile(html2jsname)
f=open(jsname, 'w')
f.write(cont)
f.close()
os.unlink(sys.argv[1])
print 'done'
else:
jsname=sys.argv[1]
if not os.path.isfile(jsname):
f=open(jsname, 'w')
for fn in sys.argv[2:]:
if os.path.isfile(fn):
html2jsname=fn.replace('.html2js', '')
funcname=os.path.basename(html2jsname)
cont=convertFile(html2jsname)
f.write('function '+funcname+'() {'+cont+"}\n")
os.unlink(fn)
f.close()
print 'done'
#!/usr/bin/env python
#
# Microchip MCC C18 Compiler Wrapper
# Copyright (C) John Dong, Adams Robotics Team
# Licensed under the terms of the General Public License
import os
import sys
import subprocess
import re
DEBUG=False
VERSION="0.1"
def do_headers():
print "\tVersion "+VERSION
def dbgprint(msg):
if DEBUG:
sys.stderr.write("DEBUG:"+msg)
def list2list(list):
tmp=""
for t in list:
tmp+=t+" "
return tmp
## Simple wrapper for the mp2cod executable
do_headers()
compile_success=True
WINE_EXEC_PATH="mono"
mp2cod_EXEC_COMMAND=WINE_EXEC_PATH+" "+os.path.dirname(sys.argv[0])+"/MPFS2.exe"
dbgprint("Using "+mp2cod_EXEC_COMMAND+" "+list2list(sys.argv[1:])+" to launch mpfs2\n")
pipes=subprocess.Popen([mp2cod_EXEC_COMMAND+" "+list2list(sys.argv[1:])], shell=True, stdout=subprocess.PIPE, close_fds=True)
error_regex=re.compile('.*\\:Error.*')
while True:
t=pipes.stdout.readline()
print t
if error_regex.match(t)!=None:
compile_success=False
if t=="":
break
if not compile_success:
raise Exception,"Launch FAILED"
#!/usr/bin/python
import sys, os
sys.path.append(os.path.abspath(os.path.dirname(sys.argv[0])))
import dmtranslations as l
ln='en'
if(len(sys.argv) > 3):
if sys.argv[3] in l.LANGS.keys():
ln=sys.argv[3]
if os.path.isfile(sys.argv[1]):
print 'Translate '+sys.argv[1]+' to '+sys.argv[2]+' in '+ln+' lang'
f=open(sys.argv[1], "r")
text=f.read()
f.close()
for w in l.LANGS[ln].keys():
text=text.replace("${{"+w+"}}$", l.LANGS[ln][w])
text=text.replace("${{", "")
text=text.replace("}}$", "")
f=open(sys.argv[2], "w")
f.write(text)
f.close()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment