I am not sure which forum is best to post this question.
I am looking for a way to read the value of the Sleep timer: Disabled, 10 min, 1 min, etc.
It would be best to do this in a Shell Script, but any clues might help me.
I have tried to use DMC's Webcontrol API calls. There is no option for this.
How to access the Sleep Timer from a Script
-
keith_leitch
- Erfahrener Benutzer

- Beiträge: 141
- Registriert: Mo 29. Apr 2013, 06:05
How to access the Sleep Timer from a Script
Zuletzt geändert von keith_leitch am Sa 8. Jul 2017, 01:53, insgesamt 1-mal geändert.
- FireBird
- Suspekter verdächtiger Zauberküchenchef, TAP & Firmware-Guru

- Beiträge: 25358
- Registriert: Fr 9. Dez 2005, 09:59
AW: Übersicht SRP TAPs
The FireBirdLib contains the function
and the struct TimeInfo contains the field
The following TAP Code would write the current sleep time to a Telnet console whenever it changes.
Code: Alles auswählen
FlashTimeGetInfo(tFlashTimeInfo *TimeInfo)Code: Alles auswählen
word SleepTimerCode: Alles auswählen
tFlashTimeInfo TimeInfo;
static word LastSleepTimer;
FlashTimeGetInfo(&TimeInfo);
if(TimeInfo.SleepTimer != LastSleepTimer)
{
TAP_PrintNet("SleepTimer = %d\n", TimeInfo.SleepTimer);
LastSleepTimer = TimeInfo.SleepTimer;
}-
keith_leitch
- Erfahrener Benutzer

- Beiträge: 141
- Registriert: Mo 29. Apr 2013, 06:05
AW: Übersicht SRP TAPs
Great information; thanks for your reply. Does it need to be TAP code, or is there a C interpreter I could use to include the library and run it from a script?
- FireBird
- Suspekter verdächtiger Zauberküchenchef, TAP & Firmware-Guru

- Beiträge: 25358
- Registriert: Fr 9. Dez 2005, 09:59
AW: Übersicht SRP TAPs
The library is accessing specific RAM locations and to be able to do that, the code has to run within the pvr process. In other words, it has to be a TAP. But there are many ways to communicate that information to the outside world. That TAP could for example monitor the sleep timer and write the result to a file whenever the sleep time changes. This way, a simple script would have access to the current sleep timer timeout. Of course there are other ways.
And I think that I'll move these posts to a separate thread.
And I think that I'll move these posts to a separate thread.
-
keith_leitch
- Erfahrener Benutzer

- Beiträge: 141
- Registriert: Mo 29. Apr 2013, 06:05
AW: How to access the Sleep Timer from a Script
Makes sense; thanks for the education.
-
keith_leitch
- Erfahrener Benutzer

- Beiträge: 141
- Registriert: Mo 29. Apr 2013, 06:05
AW: How to access the Sleep Timer from a Script
DMC has added the property to Webcontrol's status get API, so that is a good outcome.