What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Monitor your projectors and light bulbs with PJLink

Votes:

0

Your Vote:

Up

Down

Hi,

Below is a solution rather than a question. Just thought I share it with the rest of the PRTG world.

Our challenge:

Projectors are having issues "out of now where" and of course always urgent - IT department didn't have monitoring on it. Of course, normally you already have a conference going on or it is urgent and the projector might be really down already - most likely due to an end of life light bulb.

What we have:

NEC and Optima projectors - with Ethernet interfaces

Research and work:

We found out that there is a PJLink protocol (http://pjlink.jbmia.or.jp/english/index.html) that is supported by those devices. A little more research and we found a library on GitHub for Visual Studio (C#) (https://github.com/uow-dmurrell/ProjectorControl). We took it, modified the LAMPHOURS so we could get it public (only one lamp for now - but we only have projectors with one lamp). Modified the TEST-Project that comes with it to accept IP addresses as parameter and modified the output in to a PRTG XML format. Further modified the output so it is numeric. (We are not aware that any of that stuff is copyright protected, if so - we apologize and will stop using those components)

Result:

We added a PRTG sensor based on XML data that monitors (advanced EXE/XML) with the IP of the device as parameter and get the following information:

  • LampHours - we set ours to max. 4000 as error level
  • CoverStatus (0 OK / 1 ERROR)
  • FanStatus (0 OK / 1 ERROR)
  • FilterStatus (0 OK / 1 ERROR)
  • LampStatus (0 OK / 1 ERROR)
  • PowerStatus (0 off / 1 on = OK 2 cool down / 3 warm up = WARNING (we don't get alerts there) 4 unknown = ERROR)

This actually helps us to keep an as close as possible eye on the projectors and being proactive if something is already reported as defect and the LampHours (adjustable, depending on manufacturer/model) are coming close to an issue, so we are ready for it.

Sensor Image

Code changes:

ProjectorInfo.cs - added this:

        public int LampHours
        {
            get { return _multiLampHours[0]; }
            set {  }
        }

Program.cs (or create your own project)

using System;
using rv; 

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            PJLinkConnection c = new PJLinkConnection(args[0], "rv");

            if (args.Length != 1)
            {
                Console.WriteLine("Wrong arguments detected:");
                foreach(string arg in args)
                {
                    Console.WriteLine(arg);
                }
            }

            ProjectorInfo pi = ProjectorInfo.create(c);

            string powerstatus = "0";
            string fanstatus = "0";
            string lampstatus = "0";
            string coverstatus = "0";
            string filterstatus = "0";

            //PowerStatus:
            //OFF 0
            //ON 1
            //COOLING 2
            //WARMUP 3
            //UNKNOWN 4
            if (pi.PowerStatus.ToString() == "OFF") { powerstatus = "0"; };
            if (pi.PowerStatus.ToString() == "ON") { powerstatus = "1"; };
            if (pi.PowerStatus.ToString() == "COOLING") { powerstatus = "2"; };
            if (pi.PowerStatus.ToString() == "WARMUP") { powerstatus = "3"; };
            if (pi.PowerStatus.ToString() == "UNKNOWN") { powerstatus = "4"; };

            if (pi.FanStatus.ToString() != "OK") { fanstatus = "1"; };
            if (pi.LampStatus.ToString() != "OK") { lampstatus = "1"; };
            if (pi.CoverStatus.ToString() != "OK") { coverstatus = "1"; };
            if (pi.FilterStatus.ToString() != "OK") { filterstatus = "1"; };

            string prtg = "<prtg>\n" +
                "<result><channel>PowerStatus</channel><value>" + powerstatus.ToString() + "</value></result>\n" + 
                "<result><channel>LampHours</channel><value>" + pi.LampHours.ToString() + "</value></result>\n" +
                "<result><channel>FanStatus</channel><value>" + fanstatus.ToString() + "</value></result>\n" +
                "<result><channel>LampStatus</channel><value>" + lampstatus.ToString() + "</value></result>\n" +
                "<result><channel>CoverStatus</channel><value>" + coverstatus.ToString() + "</value></result>\n" +
                "<result><channel>FilterStatus</channel><value>" + filterstatus.ToString() + "</value></result>\n" +
                "</prtg>";

            Console.WriteLine(prtg);

            //Console.ReadKey(); // this is only for debug to pause the output window / stop closing it
        }
    }
}


pjlink projector prtg

Created on Nov 13, 2017 4:45:00 PM by  Florian Rossmark (4,369) 4 2



3 Replies

Votes:

0

Your Vote:

Up

Down

This is awesome! To be honest, never thought of monitoring a beamer, but now that I saw it it's rather obvious :) I'll make sure this gets added to our script world to gain more awareness.


Kind regards,
Stephan Linke, Tech Support Team

Created on Nov 13, 2017 9:21:13 PM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Can I ask how this was added or can you point me to information on how this was incorporated into PRTG?

Created on Jul 23, 2019 3:26:57 PM by  curtinat (0) 1



Votes:

1

Your Vote:

Up

Down

Once compiled via Visual Studio, you can add this to C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML and add an EXE Script/Advanced Sensor to it. As a parameter, you enter the IP address of the beamer and it should connect properly and return the corresponding information.

Created on Jul 24, 2019 6:24:12 AM by  Stephan Linke [Paessler Support]

Last change on Jul 24, 2019 6:24:19 AM by  Stephan Linke [Paessler Support]



Please log in or register to enter your reply.


Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.