Page 7 of 8

Re: [App] Get/Set Current Time From TV C/D/E

Posted: Mon Aug 10, 2015 2:22 pm
by zoelechat
smart_lover wrote:I have two question:
1:Is there any possibilities to set Date/Time on TV init after TV power on with helps of remote server (remote server will set it in TV)within Telnet in NO INTERNET access network?
2:Does your lib supports H series TVs? Is there any plan for close future support?
Here's a minimal lib I did that should work to set time from B to H.
By default, it first tries to get time from TV and if result is inaccurate (what often happens, especially if on external source) it gets it from file. You can also force it to get it only from file using FROMFILE arg:

Code: Select all

samyGOso -A -B -l /mnt/opt/privateer/usr/libso/libSetTime.so SET FROMFILE
File have to be /tmp/ntp_time, a text file containing time from epoch e.g:

Code: Select all

1439212253
That way you can create file using any method you want before injection.
Is also included a sample startup script, writing file after getting time from NTP server.

For localtime offset, if needed, check "Bonus" spoiler there.

Re: [App] Get/Set Current Time From TV C/D/E

Posted: Mon Aug 10, 2015 11:00 pm
by smart_lover
zoelechat wrote: Here's a minimal lib I did that should work to set time from B to H.
By default, it first tries to get time from TV and if result is inaccurate (what often happens, especially if on external source) it gets it from file. You can also force it to get it only from file using FROMFILE arg:
I created a file named 'ntp_time' and filled it with '1439212253' and put it in '/tmp/' path. After that I run

Code: Select all

samyGOso -A -B -l /mnt/opt/privateer/usr/libso/libSetTime.so SET FROMFILE
and I got following log file

Code: Select all

[SetTime] SamyGO B/C/D/E/F/H libSetTime v0.0.6 - (c) zoelechat 2015
[SetTime] _ZN6PCTime9EpochTimeEv [0x15e444c].
[SetTime] clock_settime [0x4248d2e0].
[SetTime] lib_init, >>>
[SetTime] Got time from file!
[SetTime] Epoch time: 1439212253
[SetTime] <<< lib_deinit
but whenever I call 'date' command or I use menu/system/time with remote control, TV's datetime is still 'Thu Jan 1 00:44:23 UTC 1970' or '--:--'.
what is my problem? Why set date not works properly in my TV.

Note:My TV is H series.

Re: [App] Get/Set Current Time From TV C/D/E

Posted: Tue Aug 11, 2015 8:25 am
by zoelechat
It's a lib I quickly did for myself, possible it doesn't work on H... Maybe try to inject -T instead of -A.

Re: [App] Get/Set Current Time From TV C/D/E

Posted: Tue Aug 11, 2015 11:42 am
by smart_lover
zoelechat wrote:It's a lib I quickly did for myself, possible it doesn't work on H... Maybe try to inject -T instead of -A.
I test it with -T instead of -A. But same result.
Is there any hope for support in H series?

I have another problem, Although I set my clock to auto mode(get datetime from broadcasting channels) but I get same result 'Thu Jan 1 00:14:08 UTC 1970' with date command. In other hand, In clock setting in menu I get proper and right datetime!! Why?!! How I can get datetime with telnet in the state that TV set its datetime from channels automatically?

Re: [App] Get/Set Current Time From TV C/D/E

Posted: Tue Aug 11, 2015 12:12 pm
by zoelechat
No idea if it could be supported on H, I'd need H to tell you :) . Maybe sectroyer had a good reason for not to port his patch to F/H, mine was even not meant to be released...
System and TV date/time are independant settings. TV (mostly) doesn't care of system time which remains and restarts at epoch every reboot and handle its own retrieved from channels. You still can use patch without arg to GET time then parse log when needed.

Re: [App] Get/Set Current Time From TV C/D/E

Posted: Tue Aug 11, 2015 4:09 pm
by sectroyer
zoelechat wrote:No idea if it could be supported on H, I'd need H to tell you :) . Maybe sectroyer had a good reason for not to port his patch to F/H, mine was even not meant to be released...
On H it breaks PVR !!!! :)

Re: [App] Get/Set Current Time From TV C/D/E

Posted: Wed Aug 12, 2015 8:47 am
by smart_lover
sectroyer wrote:On H it breaks PVR !!!! :)
PVR is not important for me. Is there any hope to have proper version for H support(Even without need of PVR)?

Re: [App] Get/Set Current Time From TV C/D/E

Posted: Wed Aug 12, 2015 10:23 am
by sectroyer
smart_lover wrote:
sectroyer wrote:On H it breaks PVR !!!! :)
PVR is not important for me. Is there any hope to have proper version for H support(Even without need of PVR)?
PVR is only ONE of features that don't work. IIRC others were reminders, widgets, etc. :) If you don't plan to use ANY features that require "accurate" time than this patch is for you :)

Re: [App] Get/Set Current Time From TV C/D/E

Posted: Sat Jul 23, 2016 7:18 pm
by smart_lover
sectroyer wrote:Simple App that just gets Current Time directly from TV (based on hedaks findings)
I use your lib in following way:
timezone.png
How can I find what is my timezone? (F.Y.I: I am not in GMT!)
My current and correct time is the one in 'The current date/time is:' line and not the one int 'date/time+offset' line. How can I make my TV to use proper one?
As you can see I already used -U to set UTC with no luck!

Re: [App] Get/Set Current Time From TV C/D/E

Posted: Sat Jul 23, 2016 8:51 pm
by zoelechat
Use only -u switch (-s does crap) to set correct UTC, then rename/copy right localtime file to expected path :)