SQLite format 3@ O+<@-$ [tableКаналыВходаВыходаУзлаДереваШаблоновКаналыВходаВыходаУзлаДереваШаблоновCREATE TABLE [КаналыВходаВыходаУзлаДереваШаблонов] ( [Код] INTEGER NOT NULL PRIMARY KEY, [КодУзла] INTEGER NULL , [ТипВходовВыходов] INTEGER NULL , [Последовательность] VARCHAR(2048) NULL , [ТипВнешнихДанных] INTEGER NULL , [Имя] VARCHAR(150) NULL)^YYtableДеревоУзловШаблоновДеревоУзловШаблоновCREATE TABLE [ДеревоУзловШаблонов] ( [Код] INTEGER NOT NULL PRIMARY KE  @N}wqke_YSMGA;5/)#~vnf^VNqponmlkjihgfedcba`_^]\[ZYX&'%'$'#'"'!' ''''''''''''''''''' ' ' ' ' '''''''')bM8#{fQ<'jU@+jQ ! Host Input' !&Host Input&!% Host Input%!$ Host Input$!# Host Input#!" Host Input"!! Host Input!! Host Input ! Host Input! Host Input! Host Input! Host Input! Host Input! Host Input! Host Input! Host Input! Host Input! Host Input! Host Input! Host Input! Host Input! Host Input! Host Input! Host Input! Host Input! Host Input! Host Input ! Host Input ! Host Input ! Host Input ! Host Input ! Host Input! Host Input! Host Input! Host Input! Host Input! Host InputOe?'/cgi-bin/do?cmd=ir_code&ircode=00BF10EF',13Хостовый Вход Virtual# ? Хостовый В(Q>s]B'yeJ5 uaL8#k(  URI'  Type&  URI%  Type$  URI#  Type"  URI!  Type  URI  Type  URI  Type  URI  Type  URI  Type  URI  Type  URI  Type ! Parameters  Port  Host ! User Agent  SSL  Password  Login ! Parameters Port8080( 7HostEnter IP adress here. !#ParametersDo not use. #PortDo not use.#HostDo not use.! User AgentSSL0 Password Login!#ParametersDo not use.Port80#7HostEnter IP adress = ) )tableКаналыВходаВыходаУзлаДереваШаблоновКаналыВходаВыходаУзлаДереваШаблоновCREATE TABLE [КаналыВходаВыходаУзлаДереваШаблонов] ( [Код] INTEGER NOT NULL PRIMARY KEY, [КодУзла] INTEGER NULL , [ТипВходовВыходов] INTEGER NULL , [Последовательность] VARCHAR(2048) NULL , [ТипВнешнихДанных] INTEGER NULL , [Имя] VARCHAR(150) NULL, [Описание] VARCHAR(2048) NULL)^YYtableДеревоУзловШаблоновДеревоУзловШаблоновCREATE TABLE [ДеревоУзловШаблонов] ( [Код] INTEGER NOT NULL PRIMARY KEY, [КодПредка] INTEGER NULL ) ok&99gtableТипыКаналовТипыКаналовCREATE TABLE [ТипыКаналов] ( [Код] INTEGER NOT NULL PRMMwtableПараметрыКаналовПараметрыКаналовCREATE TABLE [ПараметрыКаналов] ( [Код] INTEGER NOT NULL PRIMARY KEY, [КодКанала] INTEGER NULL , [КодТипаПараметра] INTEGER NULL , [ПорядковыйНомер] INTEGER NULL , [Имя] VARCHAR(50) NULL , [ЗначениеПоУмолчанию] VARCHAR(2048) NULL , [Видимость] INTEGER NULL, [Используемость] INTEGER NULL, [Описание] VARCHAR(2048) NULL)QQytableТипыВходовВыходовТипыВходовВыходовCREATE TABLE [ТипыВходовВыходов] ( [Код] INTEGER NOT NULL PRIMARY KEY, [КодНаправления] INTEGER NULL , [КодТипКанала] INTEGER NULL ) xph`XPH@80(                    GC SmartBus Relay Virtual Command Sensor Infra RedRS422RS485RS232UDPTCP %Input/Output OutputInput   c&99gtableТипыКаналовТипыКаналовCREATE TABLE [ТипыКаналов] ( [Код] INTEGER NOT NULL PRIMARY KEY, [Имя] VARCHAR(50) NULL )=IIutableТипыНаправленийТипыНаправлений CREATE TABLE [ТипыНаправлений] ( [Код] INTEGER NOT NULL PRIMARY KEY, [Имя] VARCHAR(50) NULL )WEE1tableТипыПараметровТипыПараметров CREATE TABLE [ТипыПараметров] ( [Код] INTEGER NOT NULL PRIMARY KEY, [Имя] VARCHAR(50) NULL , [Размер] INTEGER NULL )11_tableТипыУзловТипыУзлов CREATE TABLE [ТипыУзлов] ( [Код] INTEGER NOT NULL PRIMARY KEY, [Имя] VARCHAR(50) NULL )  fixed string int32 int24 int16 int8  3MultifunctionDevice Network%FolderDeviceTag Command Device Gateway CategoryHost<q^QD7*zeSC2$iY!MainScreenyX+ 1DuneHDipControlIt is a DuneHD driver that controls via ip protocol. For volume, speed and frame comamnds you must use a feedback InputAction. You must write text in this feedback (up,down,next,prev), and then drop the command&&Play%%Top menu$#$Pop up menu##Info""Return!!Enter  RightLeftDown UpSetupZoomSearchPage DownPage Up#Volume DownVolume upSelectClear 0 9 8 7 6 5  4  3  2  1  Blue(D)Yellow(C)Green(B)Red(A)PowerModeMuteEject;g8X --^W UUtableУзлыДереваШаблоновУзлыДереваШаблонов CREATE TABLE [УзлыДереваШаблонов] ( [Код] INTEGER NOT NULL PRIMARY KEY, [КодДереваУзлов] INTEGER NULL , [КодТипаУзла] INTEGER NULL , [Имя] VARCHAR(50) NULL , [КодТипаКонтроллера] INTEGER NULL, [НаправлениеДанных] INTEGER NULL, [Создатель] VARCHAR(256) NULL, [Описание] VARCHAR(2048) NULL, [ДатаВремя] REAL NULL, [КодОписания] INTEGER NULL, [Версия] INTEGER NULL, [ФункциональныйТип] INTEGER NULL, [Производитель] INTEGER NULL, [ИмяТолькоДляЧтения] INTEGER NULL)v MM_tableШаблоныЗамещенияШаблоныЗамещенияCREATE TABLE [ШаблоныЗамещения] ( [Код] INTEGER NOT NULL PRIMARY KEY, [КодКанала] INTEGER NULL , [КодЗамещения] INTEGER NULL )  xtk\M<0x DuoTecno Bticino%Clipsal Gate Clipsal Lutron%BAOS 771/772 Crestron BAOS 7703Helvar Net Internal!Helvar NetXBMC#Custom HTTP  EPSNET # HDL-BUS Pro  Helvar AV  Domintell  X10 -Shturman D12SS20)Shturman XXV07'Custom DriverEIB!MODBUS RTU%MODBUS ASCII!MODBUS TCP AXICOAMX zz4v! qqmt7 MMatableТипыКонтроллеровТипыКонтроллеровCREATE TABLE [ТипыКонтроллеров] ( [Код] INTEGER NOT NULL, [Имя] VARCHAR(50) NULL ); --)tableОписаниеОписаниеCREATE TABLE [Описание] ( [Код] INTEGER NOT NULL PRIMARY KEY, [Имя] VARCHAR(256) NULL , [Значение] VARCHAR(256) NULL)! qqmtableСвязьУстройствСоСкриптамиСвязьУстройствСоСкриптамиCREATE TABLE [СвязьУстройствСоСкриптами] ( [Код] INTEGER NOT NULL PRIMARY KEY, [КодУзла] INTEGER NULL , [КодСкрипта] INTEGER NULL)g)) tableСкриптыСкриптыCREATE TABLE [Скрипты] ( [Код] INTEGER NOT NULL PRIMARY KEY, [Имя] VARCHAR(255), [Версия] INTEGER NULL , [Комментарий] VARCHAR(1024), [Скрипт] BLOB NULL)  ReadOnly0 Version2!Date2012.08.03NameDune.db  DuneInitIt is a initialization module. You must add you device in itvar MyDune = new Dune; MyDune.DriverName = 'Dune'; MyDune.Init();f6DuneMainIt is a main module of Dune control. You)+ DuneHDipControlvar Dune = function(Dr0+>DuneHDipControlvar Dune = function(DriverName) { this.DriverName = DriverName;//Имя устройства в Device tree this.device; //Указательна устройство //this.Responce = 'i=h<g;f:e9d8c7b6a5`4_3^2]1\0[/Z.Y-X,W+V*U)T(S'R&Q%P$O#N"M!L KJIHGFEDCBA@?>=<;:9 8 7 6 5 43210/,&9d ddxK+PUUtableФункциональныеТипыФ ii{tableДополнительныеПараметрыДополнительныеПараметрыCREATE TABLE [ДополнительныеПараметры] ( [Код] INTEGER NOT NULL PRIMARY KEY, [КодУзла] INTEGER NULL, [НеУчитыватьХидер] INTEGER NULL)nQQGtableКаналыПредкиУзловКаналыПредкиУзловCREATE TABLE [КаналыПредкиУзлов] ( [Код] INTEGER NOT NULL PRIMARY KEY, [КодУзла] INTEGER NULL, [КодКанала] INTEGER NULL)PUUtableФункциональныеТипыФункциональныеТипыCREATE TABLE [ФункциональныеТипы] ( [Код] INTEGER NOT NULL PRIMARY KEY, [Имя] VARCHAR(255) NULL )2AAotableПроизводителиПроизводителиCREATE TABLE [Производители] ( [Код] INTEGER NOT NULL PRIMARY KEY, [Имя] VARCHAR(255) NULL ) ~tj`VLB8.$        @N|vpjd^XRLF@:4.("~vnf^VN'&'%'$'#'"'!' ''''''''''''''''''' ' ' ' ' ''''''' ==$dgYindexДеревоУзловШаблонов_index1ДеревоУзловШаблоновCREATE INDEX [ДеревоУзловШаблонов_index1] on [ДеревоУзловШаблонов] ([КодПредка] DESC)b ' indexКаналыВходаВыходаУзлаДереваШаблонов_index1КаналыВходаВыходаУзлаДереваШаблоновCREATE INDEX [КаналыВходаВыходаУзлаДереваШаблонов_index1] on [КаналыВходаВыходаУзлаДереваШаблонов] ([КодУзла] DESC)t '1indexКаналыВходаВыходаУзлаДереваШаблонов_index2КаналыВходаВыходаУзлаДереваШаблоновCREATE INDEX [КаналыВходаВыходаУзлаДереваШаблонов_index2] on [КаналыВходаВыходаУзлаДереваШаблонов] ([ТипВходовВыходов] DESC) B>|vpjd^XRLF@:4.("~vnf^VNF>&'%&$%#$"#!" !        BY|vpjd^XRLF@:4.(!|ung`Y                         '  & % $ # " !                               4vj^RF:." |pdXL@4(43210/.-,+*)('&%$#"!       sB#Z[MindexПараметрыКаналов_index1ПараметрыКаналовCREATE INDEX [ПараметрыКаналов_index1] on [ПараметрыКаналов] ([КодТипаПараметра] DESC)L[M}indexПараметрыКаналов_index2ПараметрыКаналов CREATE INDEX [ПараметрыКаналов_index2] on [ПараметрыКаналов] ([КодКанала] DESC)^_QindexТипыВходовВыходов_index1ТипыВходовВыходов!CREATE INDEX [ТипыВходовВыходов_index1] on [ТипыВходовВыходов] ([КодНаправления] DESC)Z_QindexТипыВходовВыходов_index2ТипыВходовВыходов"CREATE INDEX [ТипыВходовВыходов_index2] on [ТипыВходовВыходов] ([КодТипКанала] DESC) 4~wpib[TMF?81*#43210/.-,+*)('&%$#"!       F|vpjd^XRLF      F|vpjd^XRLF                  @L|vpjd^XRLF@:4.(" |tld\TL&&%%$$##""!!       8A)'indexСкрfcU!indexУзлыДереваШаблонов_index1УзлыДереваШаблонов#CREATE INDEX [УзлыДереваШаблонов_index1] on [УзлыДереваШаблонов] ([КодДереваУзлов] DESC)`cUindexУзлыДереваШаблонов_index2УзлыДереваШаблонов%CREATE INDEX [УзлыДереваШаблонов_index2] on [УзлыДереваШаблонов] ([КодТипаУзла] DESC)A)'indexСкриптыИмя_indexСкрипты&CREATE INDEX [СкриптыИмя_index] on [Скрипты] ([Имя] DESC)EYMqindexТипыКонтроллеров_indexТипыКонтроллеров'CREATE UNIQUE INDEX [ТипыКонтроллеров_index] on [ТипыКонтроллеров] ([Код] DESC) @f{uoic]WQKE?93-'!{tmf&%$#"!       Du+DuneHDipControl d|vpjd       (iwbM8#{fQ<'jU@+iQ ! Host Input' !&Host Input&!% Host Input%!$ Host Input$!# Host Input#!" Host Input"!! Host Input!! Host Input ! Host Input! Host Input! Host Input! Host Input! Host Input! Host Input! Host Input! Host Input! Host Input! Host Input! Host Input! Host Input! Host Input! Host Input! Host Input! Host Input! Host Input! Host Input! Host Input ! Host Input ! Host Input ! Host Input ! Host Input ! Host Input! Host Input! Host Input! Host Input! Host Input! Host InputOe?'/cgi-bin/do?cmd=ir_code&ircode=00BF10EF',13Хостовый Вход Virtual# ? Хостовый Вход 0,w^{EbxL3Id ! Host Inputh ! Host Input\ ! Host InputS ! Host Inputk ! Host Inputb ! Host InputZ ! Host InputW ! Host Input! Host Inpj ! Host Input ! Host Ii ! Host Inputg ! Host Inpute! Host If ! Host Inpute ! Host Input! Host Ic ! Host Input ! a ! Host Input` ! Host Input_ ! Host Input^ ! Host Input] ! Host Input! HoV ! Host Input[ ! Host InputY ! Host InputX ! Host Input*! Host Input! Host IU ! Host InputT ! Host InputRVirtual?eak case "4096": this.speed = "16x" this.speed_value = 12; break case "8192": this.speed = "32x" this.speed_value = 13; break } break case "playback_volume": this.volume = this.value; break case "playback_mute": this.mute = this.value; break case "audio_track": this.audio_track = this.value; break case "playback_url": this.playback_url = this.value; break } } } //Вызов определения процента проигрывания GetProgress(); } function GetProgress() { this.percent = parseInt(this.position/this.duration*100); //Конвертация текущей позиции из секунд в формат HH:MM:SS var PHours = Math.floor(this.position/360,-./01234567?*?m name="playback_speed" value="-256"/>'; this.buff; this.tag; this.value; this.protocol_version = 0; this.duration = 0; this.position = 0; this.percent = 0; this.state = 0; this.speed = 0; this.volume = 0; this.mute = 0; this.audio_track = 0; this.playback_url = 0; this.speed_value = 0; this.pos.ition_seconds = 0; this.duration_duration = 0; //function initialization() //{ this.device = IR.GetDevice(this.DriverName); //Указатель на устройство IR.Log("Now device = "+this.DriverName); var that = this; //переопределение this IR.AddListener(IR.EVENT_START,0,function() { IR.Log("start"); Convert(that.Responce); IR.SetVariable("Drivers."+that.DriverName+".playback_speed",this.speed); IR.SetVariable("Drivers."+that.DriverName+".playback_duration",this.duration); IR.SetVariable("Drivers."+that.DriverName+".playback_position",this.position); IR.SetVariable("Drivers."+that.DriverName+".playback_volume",this.volume); IR.SetVariable("Drivers."+that.DriverName+".playback_mute",this.mute); IR.SetVariable("Drivers."+that.DriverName+".audio_track",this.audio_track); IR.SetVariable("Drivers."+that.DriverName+".playback_url",this.playback_url); IR.SetVa/riable("Drivers."+that.DriverName+".playback_percent",this.percent); that.device.Send(['GET,/cgi-bin/do?cmd=status,']); //Запрос начального статуса }); IR.AddListener(IR.EVENT_RECEIVE_TEXT, this.device, function(text) { IR.Log("text = "+text); Convert(text);//Конвертирование пакета в xml объект IR.SetVariable("Drivers."+that.DriverName+".playback_speed",this.speed); IR.SetVariable("Drivers."+that.DriverName+".playback_duration",this.duration); IR.SetVariable("Drivers."+that.DriverName+".playback_position",this.position); IR.SetVariable("Drivers."+that.DriverName+".playback_volume",this.volume); IR.SetVariable("Drivers."+that.DriverName+".playback_mute",this.mute); IR.SetVariable("Drivers."+that.DriverName+".audio_track",this.audio_track); IR.SetVariable("Drivers."+that.DriverName+".playback_url",this.playback_url); IR.SetVariable("Driv0ers."+that.DriverName+".playback_percent",this.percent); }); IR.AddListener(IR.EVENT_CHANNEL_SET,this.device,function(name) { IR.Log("name = "+name); switch (name) { case "MainScreen": that.device.Send(['GET,/cgi-bin/do?cmd=main_screen,']); break case "black_screen": that.device.Send(['GET,/cgi-bin/do?cmd=black_screen,']); break case "standby": that.device.Send(['GET,/cgi-bin/do?cmd=standby,']); break case "Up": if (this.state == "dvd_playback") { that.device.Send(['GET,/cgi-bin/do?cmd=dvd_navigation&action=up,']); } if (this.state == "bluray_playback") { that.device.Send(['GET,/cgi-bin/do?cmd=bluray_navigation&action=up,']); } break case "Down": if (this.state == "dvd_playback") { that.device.S1end(['GET,/cgi-bin/do?cmd=dvd_navigation&action=down,']); } if (this.state == "bluray_playback") { that.device.Send(['GET,/cgi-bin/do?cmd=bluray_navigation&action=down,']); } break case "Left": if (this.state == "dvd_playback") { that.device.Send(['GET,/cgi-bin/do?cmd=dvd_navigation&action=left,']); } if (this.state == "bluray_playback") { that.device.Send(['GET,/cgi-bin/do?cmd=bluray_navigation&action=left,']); } break case "Right": if (this.state == "dvd_playback") { that.device.Send(['GET,/cgi-bin/do?cmd=dvd_navigation&action=right,']); } if (this.state == "bluray_playback") { that.device.Send(['GET,/cgi-bin/do?cmd=bluray_navigation&action=right,']); } break case "Enter": 2 if (this.state == "dvd_playback") { that.device.Send(['GET,/cgi-bin/do?cmd=dvd_navigation&action=enter,']); } if (this.state == "bluray_playback") { that.device.Send(['GET,/cgi-bin/do?cmd=bluray_navigation&action=enter,']); } break case "Speed": var param = IR.GetVariable("Drivers."+that.DriverName+".InputAction").toLowerCase(); switch (param) { case "up": var NewValue if (this.speed_value < 13) { if (this.speed_value > 0) { NewValue = Math.pow (2, ++this.speed_value); IR.Log("NewValue = "+NewValue) } else if (this.speed_value < 0) { var exp = this.speed_value * -1; NewValue = Math.pow (-2, --exp); 3 IR.Log("NewValue = "+NewValue) } that.device.Send(['GET,/cgi-bin/do?cmd=set_playback_state&speed='+NewValue+',']) } break; case "down": if (this.speed_value > -13) { if (this.speed_value > 0) { NewValue = Math.pow (2, --this.speed_value); IR.Log("NewValue = "+NewValue) } else if (this.speed_value < 0) { var exp = this.speed_value * -1; NewValue = Math.pow (-2, ++exp); IR.Log("NewValue = "+NewValue) } that.device.Send(['GET,/cgi-bin/do?cmd=set_playback_state&speed='+NewValue+',']) } break; } break; case "Volume": var param = IR.GetVariable("Drivers."+that.DriverName+".InputAction").to4LowerCase(); switch (param) { case "up": if (this.volume < 100) { var NewVolume = parseInt(this.volume)+ 10; that.device.Send(['GET,/cgi-bin/do?cmd=set_playback_state&volume='+NewVolume+',']) } break; case "down": if (this.volume > 0) { var NewVolume = parseInt(this.volume) - 10; that.device.Send(['GET,/cgi-bin/do?cmd=set_playback_state&volume='+NewVolume+',']) } break; } break; case "Frame": var param = IR.GetVariable("Drivers."+that.DriverName+".InputAction").toLowerCase(); switch (param) { case "next": that.device.Send(['GET,/cgi-bin/do?cmd=set_playback_state&skip_frames=1,']); break; case "prev": tha5t.device.Send(['GET,/cgi-bin/do?cmd=set_playback_state&skip_frames=-1,']); break; } break; case "Set Volume": var NewVolume = IR.GetVariable("Drivers."+that.DriverName+".playback_volume") that.device.Send(['GET,/cgi-bin/do?cmd=set_playback_state&volume='+NewVolume+',']) break case "Mute": if (IR.GetVariable("Drivers."+that.DriverName+".playback_mute") == 0) { that.device.Send(['GET,/cgi-bin/do?cmd=set_playback_state&mute=1,']) } else { that.device.Send(['GET,/cgi-bin/do?cmd=set_playback_state&mute=0,']) } break; case "Next": var track = IR.GetVariable("Drivers."+that.DriverName+".audio_track"); track++ that.device.Send(['GET,/cgi-bin/do?cmd=set_playback_state&audio_track='+track+',']) break; case "Prev": var track = IR.GetVariable("D6rivers."+that.DriverName+".audio_track"); track-- that.device.Send(['GET,/cgi-bin/do?cmd=set_playback_state&audio_track='+track+',']) break; case "Set Position": var NewProgress = IR.GetVariable("Drivers."+that.DriverName+".playback_percent"); var newtime = this.duration_seconds/100*NewProgress; that.device.Send(['GET,/cgi-bin/do?cmd=set_playback_state&position='+newtime+',']); break; } }); //}; //this.Init = initialization; function Convert(str) { //IR.Log("str = "+str); this.buff = str.split(">"); for (var i = 0; i < this.buff.length; i++) { //IR.Log(this.buff[i]) if (this.buff[i].indexOf("param") != -1) { this.tag = this.buff[i].slice(this.buff[i].indexOf('name="')+6,this.buff[i].indexOf('" value')); this.value = this.buff[i].slice(this.buff[i].indexOf('value="')+7,this.buff[i].ind7exOf('"/>')-1); switch (this.tag) { case "protocol_version": this.protocol_version = this.value; break case "player_state": this.state = this.value; break case "playback_position": this.position = this.value; this.position_seconds = this.value; break case "playback_duration": this.duration = this.value; this.duration_seconds = this.value; break case "playback_speed": switch (this.value) { case "-8192": this.speed = "-32x" this.speed_value = -13; break case "-4096": this.speed = "-16x" this.speed_value = -12; break case "-2048": this.speed = "-8x" this.speed_value = -11; break case "-1024": this.speed = "-84x" this.speed_value = -10; break case "-512": this.speed = "-2x" this.speed_value = -9; break case "-256": this.speed = "-1x" this.speed_value = -8; break case "-128": this.speed = "-1/2" this.speed_value = -7; break case "-64": this.speed = "-1/4x" this.speed_value = -6; break case "-32": this.speed = "-1/8x" this.speed_value = -5; break case "-16": this.speed = "-1/16x" this.speed_value = -4; break case "-8": this.speed_value = -3; this.speed = "-1/32x" break case "0": this.speed = "Paused" this.speed_value = 0; break cas 'tt!.;HUbo|,<M[k{ DuneEjectMuteModePowerRed(A)Green(B)Yellow(C)  Blue(D)  1  2  3  4 5 6 7 8 9 0ClearSelectVolume up#Volume DownPage UpPage DownSearchZoomSetup UpDownLeft  Right!!Enter""Return##Info$#$Pop up menu%%Top menu&&PlayX+ 1DuneHDipControlIt is a DuneHD driver that controls via ip protocol. For volume, speed and frame commands you must use a feedback InputAction. You must write text in this feedback (up,down,next,prev), and then drop the command@B dxph`XPH@80( xph`XPH@80( xph`WNE<3*!dcba`_^]\[ZYXWVUTS~R}Q|P{OzNyMxLwKvJuItHsGrFqEpDoCnBmAl@k?j>i=h<g;f:e9d8c7b6a5`4_3^2]1\0[/Z.Y-X,W+V*U)T(S'R&Q%P$O#N"M!L KJIHGFEDCBA@?>=<;:9 8 7 6 5 43210/,& <ypg^ULC:1( wmcYOE;1'       ~}|{zyxwvutsrqponmlkjihgfe $Lo5Uuuo|,<M[k{z Dune DuneEjectMuteModePowerRed(A)f YVolumeThis command used with the InputAction feedback. You must write "up" or "down" in InputAction feedbackg YSpeedThis command used with the InputAction feedback. You must write "up" or "down" in InputAction feedback#Y! MainScreen%Z% black_screen [ standby\ Up] Down^ Left_ Right` Enter#a! Set Volumeb Mutec Nextd Prev%e% Set PositionC Volume! Speed h@giAY.EEBq# IInputActionHere you must write the action)p- playback_percent%o% playback_url$n# audio_track&m' playback_mute(l+ playback_volume*k/ playback_position*j/ playback_duration'i) playback_speedh ]FrameThis command used with the InputAction feedback. You must write "next" or "prev" in InputAction feedback'i) playback_speed*j/ playback_duration*k/ playback_position(l+ playback_volume&m' playback_mute$n# audio_track%o% playback_url)p- playback_percentBq# IInputActionHere you must write the action p+A\w !:Ni~puaL8#kk(  URI'  Type&  URI%  Type$  URI#  Type"  URI!  Type  URI  Type  URI  Type    Type0  Type0#7HostEnter IP adress here.Port80!#ParametersDo not use. Login PasswordSSL0! User Agent#HostDo not use. #PortDo not use. !#ParametersDo not use.( 7HostEnter IP adress here., 5Port8080This port is default ! Parameters  Login  Password  SSL ! User Agent  Host  Port ! Parameters Type   URI Type   URI (fQ O8!Gwp}%  Type0!  Type0+  Type0)  Type0'  Type0  Type03  Type0#  Type0  Type0= T4   URI   URI/  Type0   URI   URIf Type   URI Ty-  Type0"   URI$   URI  Ty1  Type0&   URI(   URI3 Type*   URI\ Type,   URI Type.   URI   Type00   URI  Type0  URI2   URI0); var PMinutes = this.position % 3600; PMinutes = Math.floor(PMinutes/60); var PSeconds = this.position % 60; if (PHours < 10) { PHours = "0"+PHours; } if (PMinutes < 10) { PMinutes = "0"+PMinutes; } if (PSeconds < 10) { PSeconds = "0"+PSeconds; } this.position = PHours+":"+PMinutes+":"+PSeconds; //Конвертация продолжительности из секунд в формат HH:MM:SS var DHours = Math.floor(this.duration/3600); var DMinutes = this.duration % 3600; DMinutes = Math.floor(DMinutes/60); var DSeconds = this.duration % 60; if (DHours < 10) { DHours = "0"+DHours; } if (DMinutes < 10) { DMinutes = "0"+DMinutes; } if (DSeconds < 10) { DSeconds = "0"+DSeconds; } this.duration = DHours+":"+DMinutes+":"+DSeconds; } }; var MyDune = new Dune('Dune'); //MyDune.DriverName = 'Dune'; //MyDune.Init();A>'; this.buff; this.tag; this.value; this.protocol_version = 0; this.duration = 0; this.position = 0; this.percent = 0; this.state = 0; this.speed = 0; this.volume = 0; this.mute = 0; this.audio_track = 0; this.playbCack_url = 0; this.speed_value = 0; this.position_seconds = 0; this.duration_duration = 0; //function initialization() //{ this.device = IR.GetDevice(this.DriverName); //Указатель на устройство IR.Log("Now device = "+this.DriverName); var that = this; //переопределение this IR.AddListener(IR.EVENT_START,0,function() { IR.Log("start"); Convert(that.Responce); IR.SetVariable("Drivers."+that.DriverName+".playback_speed",this.speed); IR.SetVariable("Drivers."+that.DriverName+".playback_duration",this.duration); IR.SetVariable("Drivers."+that.DriverName+".playback_position",this.position); IR.SetVariable("Drivers."+that.DriverName+".playback_volume",this.volume); IR.SetVariable("Drivers."+that.DriverName+".playback_mute",this.mute); IR.SetVariable("Drivers."+that.DriverName+".audio_track",this.audio_track); IR.SetVariable("Drivers."+that.DriverName+".plDayback_url",this.playback_url); IR.SetVariable("Drivers."+that.DriverName+".playback_percent",this.percent); that.device.Send(['GET,/cgi-bin/do?cmd=status,']); //Запрос начального статуса }); IR.AddListener(IR.EVENT_RECEIVE_TEXT, this.device, function(text) { IR.Log("text = "+text); Convert(text);//Конвертирование пакета в xml объект IR.SetVariable("Drivers."+that.DriverName+".playback_speed",this.speed); IR.SetVariable("Drivers."+that.DriverName+".playback_duration",this.duration); IR.SetVariable("Drivers."+that.DriverName+".playback_position",this.position); IR.SetVariable("Drivers."+that.DriverName+".playback_volume",this.volume); IR.SetVariable("Drivers."+that.DriverName+".playback_mute",this.mute); IR.SetVariable("Drivers."+that.DriverName+".audio_track",this.audio_track); IR.SetVariable("Drivers."+that.DriverName+".playback_url"E,this.playback_url); IR.SetVariable("Drivers."+that.DriverName+".playback_percent",this.percent); }); IR.AddListener(IR.EVENT_CHANNEL_SET,this.device,function(name) { IR.Log("name = "+name); switch (name) { case "MainScreen": that.device.Send(['GET,/cgi-bin/do?cmd=main_screen,']); break case "black_screen": that.device.Send(['GET,/cgi-bin/do?cmd=black_screen,']); break case "standby": that.device.Send(['GET,/cgi-bin/do?cmd=standby,']); break case "Up": if (this.state == "dvd_playback") { that.device.Send(['GET,/cgi-bin/do?cmd=dvd_navigation&action=up,']); } if (this.state == "bluray_playback") { that.device.Send(['GET,/cgi-bin/do?cmd=bluray_navigation&action=up,']); } break case "Down": if (this.state == "dvd_plaFyback") { that.device.Send(['GET,/cgi-bin/do?cmd=dvd_navigation&action=down,']); } if (this.state == "bluray_playback") { that.device.Send(['GET,/cgi-bin/do?cmd=bluray_navigation&action=down,']); } break case "Left": if (this.state == "dvd_playback") { that.device.Send(['GET,/cgi-bin/do?cmd=dvd_navigation&action=left,']); } if (this.state == "bluray_playback") { that.device.Send(['GET,/cgi-bin/do?cmd=bluray_navigation&action=left,']); } break case "Right": if (this.state == "dvd_playback") { that.device.Send(['GET,/cgi-bin/do?cmd=dvd_navigation&action=right,']); } if (this.state == "bluray_playback") { that.device.Send(['GET,/cgi-bin/do?cmd=bluray_navigation&action=right,']); }G break case "Enter": if (this.state == "dvd_playback") { that.device.Send(['GET,/cgi-bin/do?cmd=dvd_navigation&action=enter,']); } if (this.state == "bluray_playback") { that.device.Send(['GET,/cgi-bin/do?cmd=bluray_navigation&action=enter,']); } break case "Speed": var param = IR.GetVariable("Drivers."+that.DriverName+".InputAction").toLowerCase(); switch (param) { case "up": var NewValue if (this.speed_value < 13) { if (this.speed_value > 0) { NewValue = Math.pow (2, ++this.speed_value); IR.Log("NewValue = "+NewValue) } else if (this.speed_value < 0) { var exp = this.speed_value * -1; H NewValue = Math.pow (-2, --exp); IR.Log("NewValue = "+NewValue) } that.device.Send(['GET,/cgi-bin/do?cmd=set_playback_state&speed='+NewValue+',']) } break; case "down": if (this.speed_value > -13) { if (this.speed_value > 0) { NewValue = Math.pow (2, --this.speed_value); IR.Log("NewValue = "+NewValue) } else if (this.speed_value < 0) { var exp = this.speed_value * -1; NewValue = Math.pow (-2, ++exp); IR.Log("NewValue = "+NewValue) } that.device.Send(['GET,/cgi-bin/do?cmd=set_playback_state&speed='+NewValue+',']) } break; } break; case "Volume": var param = IR.GetVariaIble("Drivers."+that.DriverName+".InputAction").toLowerCase(); switch (param) { case "up": if (this.volume < 100) { var NewVolume = parseInt(this.volume)+ 10; that.device.Send(['GET,/cgi-bin/do?cmd=set_playback_state&volume='+NewVolume+',']) } break; case "down": if (this.volume > 0) { var NewVolume = parseInt(this.volume) - 10; that.device.Send(['GET,/cgi-bin/do?cmd=set_playback_state&volume='+NewVolume+',']) } break; } break; case "Frame": var param = IR.GetVariable("Drivers."+that.DriverName+".InputAction").toLowerCase(); switch (param) { case "next": that.device.Send(['GET,/cgi-bin/do?cmd=set_playback_state&skip_frames=1,']); breakJ; case "prev": that.device.Send(['GET,/cgi-bin/do?cmd=set_playback_state&skip_frames=-1,']); break; } break; case "Set Volume": var NewVolume = IR.GetVariable("Drivers."+that.DriverName+".playback_volume") that.device.Send(['GET,/cgi-bin/do?cmd=set_playback_state&volume='+NewVolume+',']) break case "Mute": if (IR.GetVariable("Drivers."+that.DriverName+".playback_mute") == 0) { that.device.Send(['GET,/cgi-bin/do?cmd=set_playback_state&mute=1,']) } else { that.device.Send(['GET,/cgi-bin/do?cmd=set_playback_state&mute=0,']) } break; case "Next": var track = IR.GetVariable("Drivers."+that.DriverName+".audio_track"); track++ that.device.Send(['GET,/cgi-bin/do?cmd=set_playback_state&audio_track='+track+',']) break; case K"Prev": var track = IR.GetVariable("Drivers."+that.DriverName+".audio_track"); track-- that.device.Send(['GET,/cgi-bin/do?cmd=set_playback_state&audio_track='+track+',']) break; case "Set Position": var NewProgress = IR.GetVariable("Drivers."+that.DriverName+".playback_percent"); var newtime = this.duration_seconds/100*NewProgress; that.device.Send(['GET,/cgi-bin/do?cmd=set_playback_state&position='+newtime+',']); break; } }); //}; //this.Init = initialization; function Convert(str) { //IR.Log("str = "+str); this.buff = str.split(">"); for (var i = 0; i < this.buff.length; i++) { //IR.Log(this.buff[i]) if (this.buff[i].indexOf("param") != -1) { this.tag = this.buff[i].slice(this.buff[i].indexOf('name="')+6,this.buff[i].indexOf('" value')); this.value = this.buff[i].slice(tLhis.buff[i].indexOf('value="')+7,this.buff[i].indexOf('"/>')-1); switch (this.tag) { case "protocol_version": this.protocol_version = this.value; break case "player_state": this.state = this.value; break case "playback_position": this.position = this.value; this.position_seconds = this.value; break case "playback_duration": this.duration = this.value; this.duration_seconds = this.value; break case "playback_speed": switch (this.value) { case "-8192": this.speed = "-32x" this.speed_value = -13; break case "-4096": this.speed = "-16x" this.speed_value = -12; break case "-2048": this.speed = "-8x" this.speed_value = -11; break M case "-1024": this.speed = "-4x" this.speed_value = -10; break case "-512": this.speed = "-2x" this.speed_value = -9; break case "-256": this.speed = "-1x" this.speed_value = -8; break case "-128": this.speed = "-1/2" this.speed_value = -7; break case "-64": this.speed = "-1/4x" this.speed_value = -6; break case "-32": this.speed = "-1/8x" this.speed_value = -5; break case "-16": this.speed = "-1/16x" this.speed_value = -4; break case "-8": this.speed_value = -3; this.speed = "-1/32x" break case "0": this.speed = "Paused" this.speedN_value = 0; break case "8": this.speed = "1/32x" this.speed_value = 3; break case "16": this.speed = "1/16x" this.speed_value = 4; break case "32": this.speed = "1/8x" this.speed_value = 5; break case "64": this.speed = "1/4x" this.speed_value = 6; break case "128": this.speed = "1/2x" this.speed_value = 7; break case "256": this.speed = "Normal" this.speed_value = 8; break case "512": this.speed = "2x" this.speed_value = 9; break case "1024": this.speed = "4x" this.speed_value = 10; break case "2048": this.speed = "8x" O this.speed_value = 11; break case "4096": this.speed = "16x" this.speed_value = 12; break case "8192": this.speed = "32x" this.speed_value = 13; break } break case "playback_volume": this.volume = this.value; break case "playback_mute": this.mute = this.value; break case "audio_track": this.audio_track = this.value; break case "playback_url": this.playback_url = this.value; break } } } //Вызов определения процента проигрывания GetProgress(); } function GetProgress() { this.percent = parseInt(this.position/this.duration*100); //Конвертация текущей позиции из секунд в формат HH:MM:SS var PHours = Math.floor(this.position/3600); var PMinutes = this.position % 3600; PMinutes = Math.floor(PMinutes/60); var PSeconds = this.position % 60; if (PHours < 10) { PHours = "0"+PHours; } if (PMinutes < 10) { PMinutes = "0"+PMinutes; } if (PSeconds < 10) { PSeconds = "0"+PSeconds; } this.position = PHours+":"+PMinutes+":"+PSeconds; //Конвертация продолжительности из секунд в формат HH:MM:SS var DHours = Math.floor(this.duration/3600); var DMinutes = this.duration % 3600; DMinutes = Math.floor(DMinutes/60); var DSeconds = this.duration % 60; if (DHours < 10) { DHours = "0"+DHours; } if (DMinutes < 10) { DMinutes = "0"+DMinutes; } if (DSeconds < 10) { DSeconds = "0"+DSeconds; } this.duration = DHours+":"+DMinutes+":"+DSeconds; } }; var MyDune = new Dune('Dune');