Runco Projector Plugin

Everything but the power button is greyed out and it doesn’t seem to be sending the command to the gc-1000. (I used “PWR ON” for the power toggle and power on variables for testing.

You must not be connected. Those navigation buttons shouldn’t be grayed out if you are connected to the Runco plugin. Try removing & readding the plugin. Delete both your device & the file in the scripts folder. When you readd it, make sure it prompts you for the Host & Port. If it doesn’t prompt you, then you aren’t adding it correctly. After you enter your Host & Port it will validate the connection.

The GC-100 only supports 1 connection. Make sure you have all other clients closed, including Home Remote apps. If you have another phone or tablet connected to it, it will not accept a connection. I generally do not recommend the GC-100 because of this. Newer iTach & Global Connect devices work much better because they support multiple simultaneous connections. If I had to guess, this is probably your issue.

Further discussion about this can be found here:

Thanks Bill, I was aware of the one connection rule from reading other posts, but that is what I have currently and I think we really only need one connection for our controller. I did get it connected I believe by reloading. It currently says Runco is off and is frequently polling the projector when I run the simulator. I’m assuming the code in the plugin dealing with the status check probably needs to be changed for our projector, or no? I see sending a “null” command will return status, but not sure what values are returned. https://files.support.epson.com/pdf/pltw1_/pltw1_cm.pdf

I don’t know. Maybe your model isn’t compatible. I’m not familiar with these projectors. If you don’t need to know the status, you can just delete that code.

I’ve got the power button working now, and I think I’ve figured out the status issue. I can put in a PWR? command to the projector and it will return a PWR=[status number] followed by a carriage return and a colon as shown below. What’s the proper way to put in this return value in the status code portion? I tried, e.g., “PWR=01” and “PWR=01\r:” but that’s probably not the correct way to account for the colon I’m guessing? The Runco app continues to show as “off” when I tried these.

Here’s the way I have the section revised based on the three power status values for the projector:

// query power status
// expected response is of the form “OP STATUS = value” and the Switch
// attribute we’re going to update is an enum with values of “On”/“Off”
flushReceiveBuffer();
socket.send(“PWR?\r”);
sleep(250); // sleep briefly just to make sure we get the whole response
response = socket.receive({ timeout: 500 });
response = response.trim();
responseVal = response.split(" = ")[1];
switch(responseVal) {
case “PWR=00\r:”: // standby mode
//case “”: // cooling down
powerStatus = “Off”;
break;

        case "PWR=02\r:":   // powering up
        case "PWR=01\r:":   // displaying
            powerStatus = "On";
            break;

        default:
            // unknown/unhandled status (or an error), default to off
            powerStatus = "Off";
            break;

I suggest you do a console write to look at the value you are comparing (responseVal). Here’s a hint, I don’t think it’s going to start with PWR=.

I agree with Bill, it’s likely not going to start with PWR=. Check out the line just before the switch():

responseVal = response.split(" = ")[1];

This takes what is to the right of the = and puts it into responseVal. You should probably take the spaces out from either side of the = and then your switch would be on the values that can appear to the right. That is:

responseVal = response.split("=")[1];

Also, the response = response.trim(); call just above that is almost certainly removing the \r at the end, so your switch cases should be very similar to the original plugin’s, I’d think.

Thank you both! I was actually looking at the code earlier today and figured that the code before is trimming and supposedly removing carriage returns and then splitting the value and taking the right side, i.e 00, 01… I tried using 00: 01: etc. but that didn’t work either. After seeing Bill’s suggestion of doing a console write, I discovered the log button at the bottom of the designer window and added a console.log(responseVal) so I could see the variable in the log. Well it turns out there is a carriage return before the colon even though I thought like HFN that the response.trim function would have removed that. So putting it into the form “00\r:” did the trick and the feedback is now working properly. Here’s the portion of the code I used for anyone trying to change the feedback for an Epson projector using the ESC/VP21 command protocol:

// query power status
// expected response is of the form “OP STATUS = value” and the Switch
// attribute we’re going to update is an enum with values of “On”/“Off”
flushReceiveBuffer();
socket.send(“PWR?\r”);
sleep(250); // sleep briefly just to make sure we get the whole response
response = socket.receive({ timeout: 500 });
response = response.trim();
responseVal = response.split("=")[1];
console.log(responseVal);
switch(responseVal) {
case “00\r:”: // standby mode
// case “3”: // cooling down
powerStatus = “Off”;
break;

        case "02\r:":   // powering up
        case "01\r:":   // displaying
            powerStatus = "On";
            break;

        default:
            // unknown/unhandled status (or an error), default to off
            powerStatus = "Off";
            break;
2 Likes

Quick update: I’ve just posted the 2022-12-15 version of this plugin. It is likely to be the last update because I no longer have this projector. The only change from the last version is to fix a bug so that the Switch Capability works correctly when using it to turn the projector on/off (I wasn’t able to test this, but I’m pretty sure it works). I am mainly posting this update because this plugin seems to get used a lot as a basis for other projector plugins :slight_smile:

1 Like

Hi,

@hotelfoxtrotnovember

thanks for the pluggin.

Can you explain why you chose the ky function instead of op which provides feedback?

Thanks

Ben

Hi @Tex61,

I’m not sure I understand your question. The plugin does support feedbacks for Switch (power state) and InputSelect using op commands.

This was actually the very first plugin I ever wrote and I didn’t really need to do much with the projector beyond turning it on and off (and other minor things with the remote). Any relevant processing in my setup was done by the Lumagen I had at the time, so the projector was just a “dumb” display. Implementing the full scope of ‘op’ commands didn’t seem worth it because they are generally very low-level, would be more complicated to create a THR interface for, and controlled things I would never be changing.

I hope that answers your question?

HFN

Thanks for your reply, I understand