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

TAPs für die SRP- und CRP-Serie
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.

#21

Beitrag von DeltaMikeCharlie » Mi 14. Aug 2013, 22:55

I did some testing this morning and narrowed down the performance issue to my use of strcat() to build the JSON output string.

I did a quick test of strcat() vs keeping track of the length of the string in an external variable and using strncpy() with an offset and got a 400 fold improvement in performance.

I'm going to explore this further as well as looking into caching.

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.

#22

Beitrag von Isarwolf » Do 15. Aug 2013, 10:14

I wanted to test TMA1 but had no succes.
Perhaps CRP2401 is somewhat different to the SRP-Series.

I got this log:

Code: Alles auswählen

TMA1 Started: 09:27:56.

Initialising listening socket.
Setting listening socket 93 to non-blocking mode.
About to 'bind' listening socket 93.
About to 'listen' listening socket 93.
Listening socket 93 initialisation complete.
Got connection from 192.168.178.20.
Got connection from 192.168.178.20.
Got 354 bytes of data.
GET / HTTP/1.1
User-Agent: Opera/9.80 (X11; Linux i686) Presto/2.12.388 Version/12.16
Host: 192.168.178.33:8000
Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/webp, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
Accept-Language: de-DE,de;q=0.9,en;q=0.8
Accept-Encoding: gzip, deflate
Connection: Keep-Alive


Method: 'GET'
Path: '/'
Processing Command '/' (1).
Trying to send home page.
Sending 
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 116

<html><head>
<title>404 Not Found</title>
</head><body>
<p>The requested URL was not found.</p>
</body></html>

Sent 404 - 181.
Got 403 bytes of data.
GET /favicon.ico HTTP/1.1
User-Agent: Opera/9.80 (X11; Linux i686) Presto/2.12.388 Version/12.16
Host: 192.168.178.33:8000
Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/webp, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
Accept-Language: de-DE,de;q=0.9,en;q=0.8
Accept-Encoding: gzip, deflate
Referer: http://192.168.178.33:8000/
Connection: Keep-Alive


Method: 'GET'
Path: '/favicon.ico'
Processing Command '/favicon.ico' (12).
Trying to send home page.
Sending 
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 116

<html><head>
<title>404 Not Found</title>
</head><body>
<p>The requested URL was not found.</p>
</body></html>

Sent 404 - 181.
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.

#23

Beitrag von DeltaMikeCharlie » Do 15. Aug 2013, 11:23

Method: 'GET'
Path: '/'
Processing Command '/' (1).
Trying to send home page.
Sending
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 116

<html><head>
<title>404 Not Found</title>
</head><body>
<p>The requested URL was not found.</p>
</body></html>
Did you copy index.html into /ProgramFiles/Settings/TMA1/public_html on your PVR?

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.

#24

Beitrag von Isarwolf » Do 15. Aug 2013, 11:49

DeltaMikeCharlie hat geschrieben:Did you copy index.html into /ProgramFiles/Settings/TMA1/public_html on your PVR?


Yes I have copied as requested the file to this folder.
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
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.

#25

Beitrag von Isarwolf » Do 15. Aug 2013, 11:58

It was my fault.
I have named the folder "public html" without underline. :patsch:
I have changed it and now I got a result.
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.

#26

Beitrag von DeltaMikeCharlie » Do 15. Aug 2013, 13:34

It's good to hear that you got it working. Can you please share your findings?
  • How many channels do you have?
  • How fast do they load?
  • Can you change channels OK?
  • Can you list the timers?

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.

#27

Beitrag von Isarwolf » Do 15. Aug 2013, 15:08

I have 118 channels
It needs less then three seconds
Yes, I can change channels
Yes I can list the timers

On my tablet I can change the channels by touchscreen.

I think the time should be in 24h notation
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
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.

#28

Beitrag von Sirius » Do 15. Aug 2013, 15:49

TMA1 A-004 (11.08.2013)

"742 records found".

First loading needed 60 seconds.

Then I closed browser window, and opened again:
I did this several times and it needs always 42 seconds.

When it was loaded the change between "Channels" to "Timers" and back to "Channels" needs about 0.5 second.
Zuletzt geändert von Sirius am Do 15. Aug 2013, 15:52, 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.

#29

Beitrag von DeltaMikeCharlie » Do 15. Aug 2013, 22:12

Thanks for the feedback everyone.

I am currently working on a way to speed up loading the channels. I hope to implement it on the weekend.
I think the time should be in 24h notation
I don't recall intentionally using 12h format anywhere, but that does not matter just yet. Eventually, the date/time format will be controlled by the user and can be in whatever format they like. The JavaScript code could use the default date/time format of the browser, for example.

As you can also see, the proof-of-concept is only in English. I plan to support multiple languages. The question here would be which language setting to use? 1) The language of the PVR or 2) The language of the browser. At the moment, I am favouring using the language of the PVR for consistency, but I am happy to hear other opinions. Are there many multi-lingual households that would want to personalise the interface language per person?

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.

#30

Beitrag von DeltaMikeCharlie » Sa 17. Aug 2013, 10:32

I have uploaded a new test version to my ftp site that should be a lot faster loading channels.

I have added an entry to the log for how long a command takes to complete. There are 2 versions of the TAP included in this release, both have the extra logging, but one has the faster code and the other has the original code.

I would be interested to see the difference on a PVR with hundreds of channels. My PVR with 30 channels reduced from 10 ticks to 1 tick to list the channels. Be careful, if you do try both TAP versions, I have found it best to reboot the PVR rather than unloading/loading the TAPs.

Please note: I have deliberately not fixed the channel character issue so that I can compare the channel loading times only.

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.

#31

Beitrag von FireBird » Sa 17. Aug 2013, 10:44

The fast version just displays "No records found" for both channels and timers.

Code: Alles auswählen

Got connection from 192.168.0.1.
Got connection from 192.168.0.1.
Got 282 bytes of data.
GET / HTTP/1.1
Accept: text/html, application/xhtml+xml, */*
Accept-Language: de-AT
User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)
Accept-Encoding: gzip, deflate
Host: 192.168.0.214:8000
DNT: 1
Connection: Keep-Alive
Cache-Control: no-cache


Method: 'GET'
Path: '/'
Processing Command '/' (1).
Trying to send home page.
Closing home file.
Home file closed.
NetHTTPRespond Sending header: 67.
NetHTTPRespond Sent: 67.
NetHTTPRespond Sending payload: 10750.
NetHTTPRespond Sent: 10750.
Response sent.
Command completed in 1 ticks.

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.

#32

Beitrag von Isarwolf » Sa 17. Aug 2013, 11:43

Thanks for the 24h notation. :D :

TMAfast works very quickly with 118 channels.

In the list of timers there is the sorting not correct. I compare with the timer list of SmartEPG.

The scan timer is wrong and two "repetition timer"
A blocked timer will not be shown.
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
Zuletzt geändert von Isarwolf am Sa 17. Aug 2013, 11:55, insgesamt 1-mal geändert.
Grund: Anhänge
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.

#33

Beitrag von DeltaMikeCharlie » Sa 17. Aug 2013, 12:04

FireBird hat geschrieben:The fast version just displays "No records found" for both channels and timers.


It's like the home page is being delivered but the JavaScript is not activating.

Can you try: http://192.168.0.214:8000/api?function= ... action=get! and see if that returns anything to your browser?

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.

#34

Beitrag von FireBird » Sa 17. Aug 2013, 12:22

DeltaMikeCharlie hat geschrieben:Can you try: http://192.168.0.214:8000/api?function= ... action=get! and see if that returns anything to your browser?

I get a long list of text with the channel details. The problem seems to be connected with the Internet Explorer (V10). If I try the same with FireFox, I get the ?no records found? for a very short period, and then it refreshes the display with the correct channel list. As there was a newer index.html in the zip, I?ve also updated that one.

The difference between slow and fast version is 10086 vs. 51 ticks.

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.

#35

Beitrag von DeltaMikeCharlie » Sa 17. Aug 2013, 13:03

The difference between slow and fast version is 10086 vs. 51 ticks.
Wow! That is a huge difference.

I did not test the latest version with IE, only FireFox. From memory, IE 10 has a "compatibility" mode. Did you try that?

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.

#36

Beitrag von DeltaMikeCharlie » Sa 17. Aug 2013, 13:06

Out of interest, how do people with 400/500/1000+ services manage them? Do you just use the standard Favourites list that the PVR provides, or is there another mechanism for managing satellite/cable services?

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.

#37

Beitrag von FireBird » Sa 17. Aug 2013, 13:18

Now I wanted to try the compatibility mode and IE even worked in standard mode. The Toppy has been rebooted before every test. :confused: I’d suggest that you forget about it until more people report that problem or until there is some way to reproduce the behaviour.

I mainly use only about 60 channels, which create the first block in the channel list. The remaining 1100 are just there for curiosity (e.g. if someone reports a SmartEPG problem with one of these) and build an alphabetically sorted second block. I do not use favourites.

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.

#38

Beitrag von Sirius » Sa 17. Aug 2013, 13:19

TMA1 A-005b (17.08.2013)

The new fast version is really fast !!

"742 records found" with old version it needed 42 seconds to show the Channel list,
and now with the new version only 1 second :hello:

The log of the fast version is attached.
With the slow version I got no records found.

Bug (?):
When I selected channel number 3 the SRP-2100 switches to TV channel 3.
When I switched more than two times back to the same channel, the browser marked this selected channel in red, but the SRP-2100 didn't change the channel.
Now I can only switch to other channels which I had never switched before.

Info:
First I had both TAPs in ProgramFiles.
When I started one of them with SmartFiler, the other tma TAP was also green marked (as running)

Info 2:
I use only about 50 channels, which are sorted in first place of channel list.
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.
Zuletzt geändert von Sirius am Sa 17. Aug 2013, 13:38, insgesamt 2-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
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.

#39

Beitrag von FireBird » Sa 17. Aug 2013, 13:24

[quote="Sirius"]When I started one of them with SmartFiler, the other tma TAP was also green marked (as running)[/quote]
The public SmartFiler just checks the TAPID and I assume the both version use the same ID and therefore will both be shown in green when one of them is running.

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.

#40

Beitrag von Sirius » Sa 17. Aug 2013, 13:28

Ah Ok.
Only a display problem, and only one tap is really running.

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

Gesperrt

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