Charmed Quark Systems, Ltd. - Support Forums and Community
Sage Media Server driver (beta) - Printable Version

+- Charmed Quark Systems, Ltd. - Support Forums and Community (
+-- Forum: General Discussion (
+--- Forum: Driver Development (
+--- Thread: Sage Media Server driver (beta) (/showthread.php?tid=5497)

Sage Media Server driver (beta) - personalt - 08-18-2010

I think i know the answer but want to confirm,

Do you have access to the errors that get printed to sagetvmsgs.txt?

I just got a APC masterswitch and I am looking to use it to restart my HDPVR when it craps out.

I could do it from a command line if i can get a SNMP script via perl to work but figured inside of CQC would be even better.

Sage Media Server driver (beta) - Fonceur - 08-18-2010

personalt Wrote:Do you have access to the errors that get printed to sagetvmsgs.txt?
Well, you can look at the SageTV API at:

I guess it might be part of the SystemMessage, but it might be drown in a lot of other stuff, be somewhere else, or not even available through the API... Wink

Sage Media Server driver (beta) - personalt - 08-18-2010

Thanks... I ended up posting over at Sage
as you can tell it is tough to see if it might be available based on that documentation.

Is any of the system messages exposed to CQC now?

Sage Media Server driver (beta) - SamVimes2 - 08-18-2010


I don't know much (anything) about the Sage API but it looks like there is a function in the SystemMessageAPI called GetSystemMessages() that returns an array of sage.msg.SystemMessage objects. Could that be used to populate a driver field with a list of messages? Assuming your driver could be notified when a new message is added to the queue, you could update the driver field and we could trigger off it to do various actions.


Which APC Masterswitch do you have? There is an SNMP CQC driver some of us are using to control some APC gear.

Sage Media Server driver (beta) - personalt - 08-18-2010

masterswtich plus with the A9606 card. I am assuming I can control the masterswitch from CQC but have not tried yet. If I use CQC to control I need to get a single from sage that the HDPVR crapped out.

My original plan was to go right from sage using sagealert to a command line task but I got stuck getting the masterswitch to control outlets via command line. But since I planned to use CQC to control the other outlets if I can get the signal that the HDPVR crapped out into CQC I expect I can use CQC SNMP driver to trigger a reboot.

I don't want to get to off traffic here but I ran into a roadblock trying to control it from the command line. It appears newer firmware from APC allows you to add a -c after your password and it gives you a different command line prompt when you telnet in. It doesnt appear AP9606 supports firmware that new. I then tried to script SMNP but I had issues with the perl library.

If anyone is using a AP9606 card and getting outlets to reboot from command line I would like to hear from you. Maybe I can open an off topic thread for that since it is outside of the CQC domain.

Sage Media Server driver (beta) - Fonceur - 08-18-2010

I took a quick look at the SageAlert source code, and indeed it seems to be using SystemMessage. The way I see it, I could probably have a list of all messages, a bunch of lists for the various "type" of messages, and a string field for the last message. Maybe a last message per "type", to help with the triggering, or a filter to only monitor one type in the first place...

Sage Media Server driver (beta) - Fonceur - 08-18-2010

Regarding the system messages, the first issue is that if you look at the API description, you'll see that many require SageTV 6.6 or 7.0... Since SageTV 7.0 is still in beta and requires an upgrade fee, I will stick with the 6.6 requirement.

Worse, the gkusnick.jar + javadoc that I was using didn't even have the SystemMessageAPI exposed. I grabbed the last pre-7.0 version, and do see the SystemMessageAPI in there, so it should be fine. I also assume that the version for 7.0 will just work as is.

Sage Media Server driver (beta) - Fonceur - 08-18-2010

Just some early testing for the System messages... This version should produce some messages of the form: "[System message] Type ..." in the sagetv_0.txt. You need to have updated accordingly, with the msg/curr_alert_level=X, where X is a value from 0-3; with 0=No Alert, 1=Info Alert, 2=Warning Alert, 3=Error Alert.

So if someone could set it up, let it run for a while and then search the sagetv_0.txt for any results. I would like to see the corresponding lines, or the full zipped log...

Sage Media Server driver (beta) - personalt - 08-22-2010

I will PM you my log, you can see the alerts triggering emails and growl which is what I am using now to alert me of a crash.

Sage Media Server driver (beta) - Fonceur - 08-26-2010

I didn't have a working copy of CQC in a while, so it made support tricky and things got a bit out of sync... But now I posted a set of updated driver/macros/templates/.jar and made sure they played nice with each others. Make sure to install everything, as I had to include the macros with the templates, due to the forum limitations, both in term of file count and file size.

On the RecordedShows template, if you go to the Template's action "On Load", for the Query you can replace the null by true/false, if you want to filter for the Watched/unwatched shows, or make it a variable on that template. If you don't want the streaming, you can get rid of the web browser widget, otherwise edit it to point to the location where you copied VLC_stream_IE2.html.