New TAP to manage the PVR using HTML/CSS/JavaScript.

TAPs für die SRP- und CRP-Serie
Benutzeravatar
Sirius
Vollzeit-Guru
Vollzeit-Guru
Beiträge: 2429
Registriert: So 8. Apr 2007, 10:05
Receivertyp: SRP-2100(TMS) / TF5500
Receiverfirmware: 08.Apr.2014 / 22.Dez.2011 PHUD
Wohnort: Hessen

AW: New TAP to manage the PVR using HTML/CSS/JavaScript.

#121

Beitrag von Sirius » Fr 6. Sep 2013, 23:38

My SRP-2100 has the newest firmware with UTF8 support.

Maybe jkIT has a non-UTF8 Firmware on his SRP-2410? (I don't know)

SRP-2100(TMS) seit 12.12.2009 ... Firmware: 08.Apr.2014 (1.16.00) | WD20EURS | Harmony ONE
XStartTAP_TMS ==> TimerDiags | AcadeRC | TMSRemote | QuickPlay | FastSkip | TMSCommander | SmartEPG | SmartFiler | TMSDisplay | CallMonitor | RSSRP

DeltaMikeCharlie
WebController
WebController
Beiträge: 469
Registriert: Di 7. Mai 2013, 05:11
Wohnort: Australia

AW: New TAP to manage the PVR using HTML/CSS/JavaScript.

#122

Beitrag von DeltaMikeCharlie » Sa 7. Sep 2013, 00:45

Here is the latest version of TMA1 to play with (A-011).
  • This week I have added the ability for the JavaScript code to store and retrieve settings with the PVR. I have implemented a very simple "Config" screen to demonstrate this feature where you can adjust the number of channels listed across the screen in the "Channels" menu option.
  • The "Config" screen also represents my first attempt to modularise TMA1. This is an external HTML file with an external JS file as well. Index.hml loads these independently. Eventually, I plan to have the ability to have all of the features constructed from add-in modules so that if you don't like one module (timers for example) you can write your own and install it without damaging any of the other modules. The TMA1-Setup TAP will be able to set which modules are loaded and in which position on the menu they appear.
  • I think I have fixed the caching problem, again. I hope I'm right this time.
  • I have also implemented a test fixed for jkIT's idea about JSON.parse rather than eval. For the timers only, I have fixed the comma problem and changed index.html to use JSON.parse for the timers data. All other areas, including apitest.html, still use eval for now. The point is that both JSON.parse and eval now work for timers, proving the concept.
On the issue of character encoding, I'm either going to have to find a way to determine if the PVR is UTF8 compliant or have a configuration setting to force the encoding method.

Also, all along, there has been an emergency stop key for the TAP. If you press "Sleep", the TAP should stop.

As always, please be careful and power-cycle your PVR after testing.

DeltaMikeCharlie
WebController
WebController
Beiträge: 469
Registriert: Di 7. Mai 2013, 05:11
Wohnort: Australia

AW: New TAP to manage the PVR using HTML/CSS/JavaScript.

#123

Beitrag von DeltaMikeCharlie » Sa 7. Sep 2013, 08:16

Today's additions (A-012):
  • The recorded programmes list can now navigate down into subdirectories and commence playback of files in those subdirectories. To get back up to /DataFiles, press the menu button again.
  • I have fixed the trailing comma problem with all of the lists so that JSON.parse SHOULD work, but I have not tested that yet.
  • The "config" API call has a new element returned called "utftoppy". This calls FireBird's isUTFToppy() and returns that value. The apitest.html page has been modified to show this value.
    (jkIT and Sirius, can you please load apitest.html and let me know the value of the "utftoppy" field in the "PVR Configuration" section?)
  • The "Alive" heartbeat output to the telnet console now includes a timestamp.

Benutzeravatar
Mucki
Quelle des Wissens
Quelle des Wissens
Beiträge: 1347
Registriert: Mo 12. Dez 2005, 19:14
Receivertyp: SRP2100, PVR5000, Vu+ Ultimo4K mit DVB-S2 + DVB-T2
Receiverfirmware: Die Aktuelle
Wohnort: Grafschaft

AW: New TAP to manage the PVR using HTML/CSS/JavaScript.

#124

Beitrag von Mucki » Sa 7. Sep 2013, 10:37

Hallo DeltaMikeCharlie,

my Channellist is now empty ! :thinker:

If I select Apitest.html all Channels are shown.
Gruß Mucki :)

Taps: SE, TMSArchiv, V!deotext, Callmonitor, lost+found, TMSRemote, TimeShiftSaver, NiceDisplay, FastSkip, TMSCommander, Backupsettings, FreeSatEit_TMS, TMSMount, Inf+, TMA1

Neu Ultimo4K mit SmartEPGVu+, Autotimer, AutomaticBackup, EMC, Camofs, CoolTV, AdvancedLibrary, VWeather3.
Skin: IFlatHD mit Eisman Pro Features

Benutzeravatar
Isarwolf
Vielantworter
Vielantworter
Beiträge: 825
Registriert: Fr 8. Dez 2006, 17:19
Receivertyp: TF5200PVRC 08.12.2006
CRP 2401 C+ 21.05.2011
CRP 2401 C+ 24.02.2017
Receiverfirmware: TF5200 01.12.2006
CRP 2401 C+ 42031_2012Sept14
Wohnort: KDG Oberbayern

AW: New TAP to manage the PVR using HTML/CSS/JavaScript.

#125

Beitrag von Isarwolf » Sa 7. Sep 2013, 10:43

TMA-012
Many thanks for the new features.

1. My channellist is empty
2. Recording programs, i can open the subdirectories and start programs.
Best regards
CRP-2401CI+: Autostart: 'TimerDiags V3.4g' 'AutoExtender' 'SmartEPG_TMS V7.0e' 'Automove V2.1 Beta 3' 'BetterVideoText V0.33' 'FastSkip TMS 3.7' 'INFplus 1.2 Beta 3' 'Liza V1.6' 'QStart 1.2' 'RebuildNAV/RecCopy V5.3' 'SmartFiler_TMS 3.0' 'TMSDisplay V2.3a' 'TMSRemote V4.1' 'Webcontrol 2.0' 'lost+found V2.0'
TF5200: | iTina 1.04 L3 | Improbox t3 a.5 | Filer 2.30 |

Benutzeravatar
jkIT
TFtool-Guru
TFtool-Guru
Beiträge: 3194
Registriert: Sa 10. Dez 2005, 18:26
Receivertyp: TF4000 & TF5000MP & SRP-2410

AW: New TAP to manage the PVR using HTML/CSS/JavaScript.

#126

Beitrag von jkIT » Sa 7. Sep 2013, 10:45

wow, 2 versions while germany is sleeping (and beating the Austrians in soccer) :D
DeltaMikeCharlie hat geschrieben:I may reverse the UTF8 coding in the web page, but leave it in the JSON data.
no, leave it as it is
because:
Sirius hat geschrieben:My SRP-2100 has the newest firmware with UTF8 support.
Maybe jkIT has a non-UTF8 Firmware on his SRP-2410? (I don't know)

Yes, i have a non UTF8 Firmware, so i hope, you can encode the strings like servicename, filename, etc, when you put them into the json structure. Maybe firebird can help with code tables, or what else is required.

DeltaMikeCharlie hat geschrieben:Today's additions (A-012):
I have fixed the trailing comma problem with all of the lists so that JSON.parse SHOULD work, but I have not tested that yet.

It works for all, except files and settings. Firebug says "SyntaxError: JSON.parse: expected double-quoted property name"
I think, thats another trailing comma problem

Code: Alles auswählen

/api?function=setting&action=set!key=apitest01&value=test%20value&
{
  "timestamp":"2013/09/07 10:21:58", 
  "content":"setting-set", 
  "status":1, 
  "setting_key":"apitest01", 
  "setting_value":"test value"[color=red][b],[/b][/color] 
}
The "config" API call has a new element returned called "utftoppy". This calls FireBird's isUTFToppy() and returns that value. The apitest.html page has been modified to show this value.
(jkIT and Sirius, can you please load apitest.html and let me know the value of the "utftoppy" field in the "PVR Configuration" section?)
my result:

Code: Alles auswählen

{
  "content":"config", 
  "sysid":22121, 
  "device":"SRP-2410", 
  "apptype":"", 
  "remotetype":1, 
  "maxrecstreams":4, 
  "version":263, 
  "recextension":".rec", 
  "language_code":"de", 
  "utftoppy" :[ b]0[/b], 
  "utcoffset":120, 
  "dst":3, 
  "timestamp":"2013/09/07 10:21:57"
}
Gruß jkIT

CRP-2401; SRP-2410 (aD); TF5000MP (aD); TF4000PVR (aD); TFtool, aTMSremote (Autor)

Benutzeravatar
jkIT
TFtool-Guru
TFtool-Guru
Beiträge: 3194
Registriert: Sa 10. Dez 2005, 18:26
Receivertyp: TF4000 & TF5000MP & SRP-2410

AW: New TAP to manage the PVR using HTML/CSS/JavaScript.

#127

Beitrag von jkIT » Sa 7. Sep 2013, 11:05

Mucki hat geschrieben:Hallo DeltaMikeCharlie,

my Channellist is now empty ! :thinker:

If I select Apitest.html all Channels are shown.


DMC just forgot to remove a test entry in the code.
Edit index.html and move the // from line 245 to 246

Code: Alles auswählen

    chRequest.open( "GET", "api?function=channels&action=get!", false );
   [b] //[/b]chRequest.open( "GET", "channels.txt", false );
Gruß jkIT

CRP-2401; SRP-2410 (aD); TF5000MP (aD); TF4000PVR (aD); TFtool, aTMSremote (Autor)

Benutzeravatar
Mucki
Quelle des Wissens
Quelle des Wissens
Beiträge: 1347
Registriert: Mo 12. Dez 2005, 19:14
Receivertyp: SRP2100, PVR5000, Vu+ Ultimo4K mit DVB-S2 + DVB-T2
Receiverfirmware: Die Aktuelle
Wohnort: Grafschaft

AW: New TAP to manage the PVR using HTML/CSS/JavaScript.

#128

Beitrag von Mucki » Sa 7. Sep 2013, 11:11

Danke dir !
Gruß Mucki :)

Taps: SE, TMSArchiv, V!deotext, Callmonitor, lost+found, TMSRemote, TimeShiftSaver, NiceDisplay, FastSkip, TMSCommander, Backupsettings, FreeSatEit_TMS, TMSMount, Inf+, TMA1

Neu Ultimo4K mit SmartEPGVu+, Autotimer, AutomaticBackup, EMC, Camofs, CoolTV, AdvancedLibrary, VWeather3.
Skin: IFlatHD mit Eisman Pro Features

Benutzeravatar
Sirius
Vollzeit-Guru
Vollzeit-Guru
Beiträge: 2429
Registriert: So 8. Apr 2007, 10:05
Receivertyp: SRP-2100(TMS) / TF5500
Receiverfirmware: 08.Apr.2014 / 22.Dez.2011 PHUD
Wohnort: Hessen

AW: New TAP to manage the PVR using HTML/CSS/JavaScript.

#129

Beitrag von Sirius » Sa 7. Sep 2013, 11:21

Thank you for the new versions!

Code: Alles auswählen

Object	Value
content	config
sysid	22010
device	SRP-2100 (TMS)
apptype	
remotetype	1
maxrecstreams	2
version	277
recextension	.rec
language_code	de
[b]utftoppy	1[/b]
utcoffset	120
dst	3
timestamp	2013/09/07 10:55:49
The playback of a file in a subdirectory works here also.

I get now also no list of Channels. (see Edit 2)

Edit: die Lösung ist ja schon in Sicht... werde es gleich testen ...
Edit 2: Now the channel list is there. Thank you jkIT!
.
.
Zuletzt geändert von Sirius am Sa 7. Sep 2013, 12:03, insgesamt 4-mal geändert.

SRP-2100(TMS) seit 12.12.2009 ... Firmware: 08.Apr.2014 (1.16.00) | WD20EURS | Harmony ONE
XStartTAP_TMS ==> TimerDiags | AcadeRC | TMSRemote | QuickPlay | FastSkip | TMSCommander | SmartEPG | SmartFiler | TMSDisplay | CallMonitor | RSSRP

Benutzeravatar
Isarwolf
Vielantworter
Vielantworter
Beiträge: 825
Registriert: Fr 8. Dez 2006, 17:19
Receivertyp: TF5200PVRC 08.12.2006
CRP 2401 C+ 21.05.2011
CRP 2401 C+ 24.02.2017
Receiverfirmware: TF5200 01.12.2006
CRP 2401 C+ 42031_2012Sept14
Wohnort: KDG Oberbayern

AW: New TAP to manage the PVR using HTML/CSS/JavaScript.

#130

Beitrag von Isarwolf » Sa 7. Sep 2013, 11:32

@jkIT
Thanks!
CRP-2401CI+: Autostart: 'TimerDiags V3.4g' 'AutoExtender' 'SmartEPG_TMS V7.0e' 'Automove V2.1 Beta 3' 'BetterVideoText V0.33' 'FastSkip TMS 3.7' 'INFplus 1.2 Beta 3' 'Liza V1.6' 'QStart 1.2' 'RebuildNAV/RecCopy V5.3' 'SmartFiler_TMS 3.0' 'TMSDisplay V2.3a' 'TMSRemote V4.1' 'Webcontrol 2.0' 'lost+found V2.0'
TF5200: | iTina 1.04 L3 | Improbox t3 a.5 | Filer 2.30 |

Benutzeravatar
Mucki
Quelle des Wissens
Quelle des Wissens
Beiträge: 1347
Registriert: Mo 12. Dez 2005, 19:14
Receivertyp: SRP2100, PVR5000, Vu+ Ultimo4K mit DVB-S2 + DVB-T2
Receiverfirmware: Die Aktuelle
Wohnort: Grafschaft

AW: New TAP to manage the PVR using HTML/CSS/JavaScript.

#131

Beitrag von Mucki » Sa 7. Sep 2013, 11:35

jkIT hat geschrieben:DMC just forgot to remove a test entry in the code.
Edit index.html and move the // from line 245 to 246

Code: Alles auswählen

    chRequest.open( "GET", "api?function=channels&action=get!", false );
   [b] //[/b]chRequest.open( "GET", "channels.txt", false );


Bei mir leider ohne Erfolg !
Gruß Mucki :)

Taps: SE, TMSArchiv, V!deotext, Callmonitor, lost+found, TMSRemote, TimeShiftSaver, NiceDisplay, FastSkip, TMSCommander, Backupsettings, FreeSatEit_TMS, TMSMount, Inf+, TMA1

Neu Ultimo4K mit SmartEPGVu+, Autotimer, AutomaticBackup, EMC, Camofs, CoolTV, AdvancedLibrary, VWeather3.
Skin: IFlatHD mit Eisman Pro Features

Benutzeravatar
Sirius
Vollzeit-Guru
Vollzeit-Guru
Beiträge: 2429
Registriert: So 8. Apr 2007, 10:05
Receivertyp: SRP-2100(TMS) / TF5500
Receiverfirmware: 08.Apr.2014 / 22.Dez.2011 PHUD
Wohnort: Hessen

AW: New TAP to manage the PVR using HTML/CSS/JavaScript.

#132

Beitrag von Sirius » Sa 7. Sep 2013, 11:41

@Mucki - I made this and it works now:
- stop the TAP
- edit the index.html like jkIT wrote and copy to PVR
- start the tma TAP again
Zuletzt geändert von Sirius am Sa 7. Sep 2013, 11:44, insgesamt 1-mal geändert.

SRP-2100(TMS) seit 12.12.2009 ... Firmware: 08.Apr.2014 (1.16.00) | WD20EURS | Harmony ONE
XStartTAP_TMS ==> TimerDiags | AcadeRC | TMSRemote | QuickPlay | FastSkip | TMSCommander | SmartEPG | SmartFiler | TMSDisplay | CallMonitor | RSSRP

DeltaMikeCharlie
WebController
WebController
Beiträge: 469
Registriert: Di 7. Mai 2013, 05:11
Wohnort: Australia

AW: New TAP to manage the PVR using HTML/CSS/JavaScript.

#133

Beitrag von DeltaMikeCharlie » Sa 7. Sep 2013, 11:51

I apologise for the problem with the channels. As jkIT kindly pointed out, I had left some debug code active. (Thanks jkIT)

I have uploaded a new version that should be OK now.

I will look into the trailing comma problem (again) tomorrow.

Has anybody tested the new "Config" menu and tried to change the width of the channel listing? I'd like to hear if that works OK.

@Sirius - It is not normally necessary to stop the TAP when one of the files is changed. Sometimes, you need to "reload" the file in the browser so that it is not loaded from cache. Also, if you stop/start the TAP too many time, the TAP will become unresponsive.

Benutzeravatar
Isarwolf
Vielantworter
Vielantworter
Beiträge: 825
Registriert: Fr 8. Dez 2006, 17:19
Receivertyp: TF5200PVRC 08.12.2006
CRP 2401 C+ 21.05.2011
CRP 2401 C+ 24.02.2017
Receiverfirmware: TF5200 01.12.2006
CRP 2401 C+ 42031_2012Sept14
Wohnort: KDG Oberbayern

AW: New TAP to manage the PVR using HTML/CSS/JavaScript.

#134

Beitrag von Isarwolf » Sa 7. Sep 2013, 11:55

[quote="DeltaMikeCharlie"]
Has anybody tested the new "Config" menu and tried to change the width of the channel listing? I'd like to hear if that works OK.
[/quote]


It works well.

best regards
CRP-2401CI+: Autostart: 'TimerDiags V3.4g' 'AutoExtender' 'SmartEPG_TMS V7.0e' 'Automove V2.1 Beta 3' 'BetterVideoText V0.33' 'FastSkip TMS 3.7' 'INFplus 1.2 Beta 3' 'Liza V1.6' 'QStart 1.2' 'RebuildNAV/RecCopy V5.3' 'SmartFiler_TMS 3.0' 'TMSDisplay V2.3a' 'TMSRemote V4.1' 'Webcontrol 2.0' 'lost+found V2.0'
TF5200: | iTina 1.04 L3 | Improbox t3 a.5 | Filer 2.30 |

DeltaMikeCharlie
WebController
WebController
Beiträge: 469
Registriert: Di 7. Mai 2013, 05:11
Wohnort: Australia

AW: New TAP to manage the PVR using HTML/CSS/JavaScript.

#135

Beitrag von DeltaMikeCharlie » Sa 7. Sep 2013, 11:58

[quote="Isarwolf"]It works well.[/quote]
Thanks

Online
Benutzeravatar
FireBird
Suspekter verdächtiger Zauberküchenchef, TAP & Firmware-Guru
Suspekter verdächtiger Zauberküchenchef, TAP & Firmware-Guru
Beiträge: 28911
Registriert: Fr 9. Dez 2005, 09:59
Receivertyp: SRP-2401CI+ TFIR
vu+ Duo 4k
Wohnort: Wien

AW: New TAP to manage the PVR using HTML/CSS/JavaScript.

#136

Beitrag von FireBird » Sa 7. Sep 2013, 12:00

[quote="jkIT"]Yes, i have a non UTF8 Firmware, so i hope, you can encode the strings like servicename, filename, etc, when you put them into the json structure.[/quote]
It's not the firmware, it is up to the provider who defines the encoding. The German channels in our region usually use ISO8859-9 (Latin 5).

DeltaMikeCharlie
WebController
WebController
Beiträge: 469
Registriert: Di 7. Mai 2013, 05:11
Wohnort: Australia

AW: New TAP to manage the PVR using HTML/CSS/JavaScript.

#137

Beitrag von DeltaMikeCharlie » Sa 7. Sep 2013, 12:10

jkIT hat geschrieben:It works for all, except files and settings.

Code: Alles auswählen

/api?function=setting&action=set!key=apitest01&value=test%20value&
{
  "timestamp":"2013/09/07 10:21:58", 
  "content":"setting-set", 
  "status":1, 
  "setting_key":"apitest01", 
  "setting_value":"test value"[color=red][b],[/b][/color] 
}

I have uploaded A-013 with what I hope is the final fix for the trailing comma problem. It is very untested, so I have also included a copy of A-012 as a fallback just in case.

DeltaMikeCharlie
WebController
WebController
Beiträge: 469
Registriert: Di 7. Mai 2013, 05:11
Wohnort: Australia

AW: New TAP to manage the PVR using HTML/CSS/JavaScript.

#138

Beitrag von DeltaMikeCharlie » Sa 7. Sep 2013, 12:17

[quote="FireBird"]It's not the firmware, it is up to the provider who defines the encoding. The German channels in our region usually use ISO8859-9 (Latin 5).[/quote]

Before UTF8, I was using ISO-8859-1, now I have to think about ISO8859-9. This is all getting very complicated.

The spec for JSON states that it should use UTF8. Perhaps I need to look at the PVR language code and select the best ISO-8859-? For that language and then convert that to UTF8.

Perhaps there needs to be a manual configuration setting to select the best code for the region that the user lives in?

Benutzeravatar
macfan
Ex-iTiNa-Promoter
Ex-iTiNa-Promoter
Beiträge: 24968
Registriert: Fr 9. Dez 2005, 10:16
Receivertyp: 2 x TF 2401 CI+, 2100, 5200 C, VU+ Ultimo 4K
Receiverfirmware: SRP-Serie: die neueste, 5k: Jan 07 PTU, VU+ VTi 15.0
Wohnort: Dortmund

AW: New TAP to manage the PVR using HTML/CSS/JavaScript.

#139

Beitrag von macfan » Sa 7. Sep 2013, 12:21

DeltaMikeCharlie hat geschrieben:Here is the latest version of TMA1 to play with (A-011).

Everything works, thanks!
This week I have added the ability for the JavaScript code to store and retrieve settings with the PVR. I have implemented a very simple "Config" screen to demonstrate this feature where you can adjust the number of channels listed across the screen in the "Channels" menu option.
The "Config" screen also represents my first attempt to modularise TMA1. This is an external HTML file with an external JS file as well. Index.hml loads these independently.

And this is great! The only "number of channels listed across the screen" that is useful for me is the 10, because I sorted the channels using multiples of 10. But you gave the option for 2 to 7, not for 10. One little change in "config.html", and now I have the view I wanted to have. :up:

Gruß, Horst

Online
Benutzeravatar
FireBird
Suspekter verdächtiger Zauberküchenchef, TAP & Firmware-Guru
Suspekter verdächtiger Zauberküchenchef, TAP & Firmware-Guru
Beiträge: 28911
Registriert: Fr 9. Dez 2005, 09:59
Receivertyp: SRP-2401CI+ TFIR
vu+ Duo 4k
Wohnort: Wien

AW: New TAP to manage the PVR using HTML/CSS/JavaScript.

#140

Beitrag von FireBird » Sa 7. Sep 2013, 12:23

I'm sorry but I didn't invent all the different tables. :) Check out EN300468 Annex A.2 for some samples. Of course, Unicode is the best method because every character has its well defined location. But the 8-bit tables are still widely used.

Gesperrt

Zurück zu „SRP/CRP TAP-Bereich“