MLDirecTV Determine if Anything is Recording?

Repository of MainLobby Server plug-ins and updates not available in the current installation.
MurrayW
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1198
Joined: Sun Mar 07, 2004 1:05 pm
Location: Austin, TX
Contact:

MLDirecTV Determine if Anything is Recording?

Postby MurrayW » Thu May 20, 2010 1:27 pm

Is it possible to see if anything is currently recording or scheduled to record in the next x minutes? Server variables would be ideal. The reason for the question is that I a few DVR's that become unresponsive after a few days of running and I have had to resort to manually rebooting these about twice a week. There is a reboot command in the MLDirecTV plugin and I would like to use this along with a check to make sure nothing is recording or about to start recording before rebooting.

What I would like to do is schedule a task at 2AM and 5AM every day that would do something like this:
If system uptime > 24hrs AND Tuner1 is NOT recording AND Tuner2 is NOT recording AND no recording is scheduled in the next 10 minutes, THEN send the MLDirecTV command to reboot the DVR.

This would require the following server variables:
1. System uptime (time since last reboot)
2. Tuner 1 Status (Recording / Not Recording)
3. Tuner 2 Status (Recording / Not Recording)
4. Time of next scheduled recording (or minutes until next scheduled recording)

I am not sure if the DirecTV DVR will even respond with this type of information, but if so, it would be nice to have.

thanks,
Murray

MurrayW
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1198
Joined: Sun Mar 07, 2004 1:05 pm
Location: Austin, TX
Contact:

Re: MLDirecTV Determine if Anything is Recording?

Postby MurrayW » Sat Feb 05, 2011 4:10 pm

With MLDirecTVIP there are now directv_1_isrecording, etc. variables so half of my above desire is now met. There is a variable named directv_1_starttime with a value of 1296932400. What date/time does this number represent and does this indicate the start time of the next recording? If so, can we get the plugin to convert it to a normal date/time so we could compare it to the actual time to see if a recording is imminent? If I knew what this number actually represented I could compare it with the time of my next scheduled recording which is 12/07/2010 at 12:06 AM to see if indeed this does indicate the next scheduled recording time.

If it turns out that directv_1_starttime does not indicate the time of the next scheduled recording, that is not a huge deal, I will just schedule my reboot command to be sent at 2:37 AM or some other time when a recording would not be expected to start in the next 5 minutes.

I can set up a conditional to check to the value of directv_1_isrecording. If 0 then send the reboot command otherwise don't send it immediately. What i would like to do is schedule the reboot command to be sent in another hour if isrecording = 1 and to keep trying to send it until it was successful up to a certain number of times (5 or 6) or until a set time (for example, 9 AM).

Would MLTimer or MLScheduler be the way to accomplish this?

thanks,
Murray

MurrayW
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1198
Joined: Sun Mar 07, 2004 1:05 pm
Location: Austin, TX
Contact:

Re: MLDirecTV Determine if Anything is Recording?

Postby MurrayW » Mon Feb 07, 2011 10:33 am

Dave, do you know what real date and time 1296932400 corresponds to?

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: MLDirecTV Determine if Anything is Recording?

Postby CinemarDave » Mon Feb 07, 2011 11:58 am

The documentation says that 1296932400 represents the number of seconds in UTC when the recording started. If the units are actual seconds then it appears to be the number of seconds that have elapsed since Midnight on January 1st 1970 in Universal Time. I'll modify the plugin so it translates to something readable.

MurrayW
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1198
Joined: Sun Mar 07, 2004 1:05 pm
Location: Austin, TX
Contact:

Re: MLDirecTV Determine if Anything is Recording?

Postby MurrayW » Mon Feb 07, 2011 1:09 pm

CinemarDave wrote:The documentation says that 1296932400 represents the number of seconds in UTC when the recording started. If the units are actual seconds then it appears to be the number of seconds that have elapsed since Midnight on January 1st 1970 in Universal Time. I'll modify the plugin so it translates to something readable.
It looks like that date corresponds to Saturday, February 05, 2011 1:00:00 PM which is not equal to the date/time of my next scheduled recording. In fact this date was in the past at the time I looked at the data and I was not recording anything at that time.
Thanks for modifying the plugin anyway.

Murray

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: MLDirecTV Determine if Anything is Recording?

Postby CinemarDave » Mon Feb 07, 2011 1:11 pm

Don't forget to convert the time from GMT to your local time. Is it accurate when you convert to your timezone?

MurrayW
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1198
Joined: Sun Mar 07, 2004 1:05 pm
Location: Austin, TX
Contact:

Re: MLDirecTV Determine if Anything is Recording?

Postby MurrayW » Mon Feb 07, 2011 1:30 pm

CinemarDave wrote:Don't forget to convert the time from GMT to your local time. Is it accurate when you convert to your timezone?
It was converted to my local time. I used this website http://www.epochconverter.com/ The next scheduled recording wasn't for 2 more days (2/7 compared to 2/5 when I looked at the data). I posted something over on dbstalk to see if what I am looking for is possible.

thanks,
Murray

MurrayW
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1198
Joined: Sun Mar 07, 2004 1:05 pm
Location: Austin, TX
Contact:

Re: MLDirecTV Determine if Anything is Recording?

Postby MurrayW » Mon Feb 07, 2011 2:21 pm

It looks like this information is not available.
Capture.JPG
You do not have the required permissions to view the files attached to this post.


Return to “MLServer Plug-Ins”

Who is online

Users browsing this forum: No registered users and 1 guest