Customer questions about plugins including examples requested
Is there a message sent when a Variable is changed, and is it possible to detect that in a Plugin?
Yes, there are different Variable change messages. The following could be added to the Processevent function in a plugin to detect variable changes. You can see that a Variable has changed, and you can get the variable name and variable value.
if type(event) = "roAssociativeArray" then
if type(event["EventType"]) = "roString" then
if (event["EventType"] = "USER_VARIABLE_CHANGE") then
userVariable = event["UserVariable"]
variablename$ = uservariable.name$
variablevalue$ = uservariable.getcurrentvalue()
You could also change the variable value by calling here:
Can you detect when the HDMI input has a cable plugged in or unplugged?
Yes, there's a roHdmiInputChanged event when a cable is connected of disconnected. You can use a plugin to detect the change, and check the status of the input. If a cable was unplugged the value returned is zero (0). If a cable was plugged in, the value returned is one (1).
The attached project and plugin plays a video if there's nothing connected to the HDMI input or plays Live Video if something is plugged into the HDMI input.
- The plugin detects the HDMI input change, and sends a plugin message of nohdmi or hdmi based on the status.
- The BrightAuthor project file listens for a plugin message event to change from Video to Live Video and back
Plugin, Sample Video, and BrightAuthor project file
Publish New Setup FIles over Local Network
- Shows how to Publish Updated Setup FIles
- How to zip setup files, renamed autorun.zip
- How to include autozip.brs file
- Redo setup without retrieving the sd card
- Use Any project - included an example showing Plugin and Attached Files
- Plugin Runs automatically on power up or after publish
- It deletes existing autorun.brs and copies autorun.zip from the Files tab
- Plugin then restarts the unit
- Unit unpacks autorun.zip file and reboots again
Includes Plugin File, Autozip.brs, sample autorun.zip. sample project file
Could you clarify the Readme.txt? especially the 1st step three (Add autozip.brs file to the autorun.zip file) Is this done in BrightAuthor? Also, it seems that you are saying to add "autozip.brs" but the graphic shows "setup_plugins.brs".
I tried to follow the steps but I ended up with an error LED flashing 10x.
The readme covers three things.
1. Creating the zip file which you add the autorzip.brs to. - shown in first graphic
2. Adding the plugin to brightauthor - shown in the second graphic
So this process is independent of brightauthor. This is a standard zip file. You save the setup files into a folder. You add the autozip.brs file I included. If you're using newer version so of windows, you can can do a Control A to select all of the files in your folder, Right click on one of them, and send to, compressed zip folder, and it'll create your zip file. All you then need to do is rename it to "autorun.zip".
Once you have the zip file, you add it to the files tab in brightauthor.
You add the setup plugin to the autorun tab, under plugins, in brightauthor.
Please double check the directions and make sure when you're done, your autorun.zip file looks like the image I posted above when you open it.
Is there somewhere i can download the autozip.brs file that is referenced here?
Yes, it appears that when we updated the forum, it didn't include any attachements to the forum posts. I've reported the problem. I'm adding links to the files now.
Thank you, it worked perfectly.
I am trying to run this HDMI input detection plugin and I get the message plugin is invalid.
I tried using the hdmi input change script posted on this page and it appears to work by going to a loaded movie when I unplug the HDMI input, but when I plug it back in, it doesn't go back to the live video window.
I am having the same issue as Brandon above. Works the first time I plug in. But once I unplug and plug in again, it no longer works.
Yes, I have replicated the issue....working on identifying a cause. It might be a bug. Not sure yet.
Do you have an update concerning the earlier told problem?
I would love to use this script but having the same issue that a second time of plugin in the HDMI will not have affect on the plugin.
Looking forward to hearing from you!
I also would love to see if you can take a look at it.
I've noticed that when you plug in the HDMI for the first time after a restart the plugin works.
When you send a new presentation to the BS it still doesn't work.
So I think when the HDMI cable is plugged in for the first time after a reset there is something written somewhere that saves the values of the plugged in HDMI.
And I think the script doesn't recognize a second HDMI plugged in because there are still some values somewhere that prevent the status to go from "nohdmi" to "hdmi", if that makes sense?
With kind regards, Marc