Shoutbox

Logitech LED Disable - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: Logitech LED Disable (/showthread.php?tid=93018)

Logitech LED Disable by SourSpud on 11-25-2009 at 10:35 PM

There is a way to disable Logitech LED, even if there isn't an option for it in the settings which you can see quoted at the bottom by chillburgh, if anyone can do this it will be really popular from Logitech users. You could add commands like.

/ledoff or /ledon

[Image: ledva6.jpg]


quote:

For QuickCam 11.5.0.1169 and above, LVUVC_LEDControl is located in the following registry key:


    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{6BDD1FC6-810F-11D0-BEC7-08002BE2092F}\0000\Settings


Note - If more than one camera is installed, you will have a "folder" for each device (i.e., 0000, 0001, 0002, etc...).


It has a default Data Value of REG_DWORD = 0x00000005 (5).


Based on your comments, I will assume that the following information is true:

0x00000000 (0) = LED Off
0x00000008 (8) = LED On


Please note that only *certain* cameras support this feature, so the mere addition of this key will not cause the LED Control buttons to appear in the QuickCam® Advanced Settings.

from chillburgh:
quote:
- The LED Control setting shown in that thread does not exist in my Logitech Webcam Software

- The registry entry shown in that thread does not exist in the proper section of my registry

- After manually adding the registry setting and rebooting, the LED was indeed disabled

So if the registery doesn't exist it can be added

Kind Regards,
SourSpud
RE: Logitech LED Disable by Spunky on 11-25-2009 at 11:36 PM

I have a feeling that the camera won't be constantly reading the registry to check if it's LEDs should be on. There would be a delay, probably of minutes or hours I would have thought.

It certainly is possible to change the registry keys via a script and would only be around 10-15 lines of code. Why don't you search the forum for how to interact with the registry and give it a go yourself?


RE: Logitech LED Disable by SourSpud on 11-25-2009 at 11:39 PM

I'm not confident enough to try and tamper with the registery yet mate, I don't trust myself enough lol Also i added a quote from chillburgh which if the registery doesn't exist it can be added. if anyone would like to have a go at this id really appreciate it.


RE: Logitech LED Disable by Spunky on 11-26-2009 at 12:17 AM

Not sure if this will work as I don't have the camera. It's a bit longer than I said it would be as I added menus etc incase you wanted to pass it around... Let me know if you want to distribute it and I'll package it into a PLSC file for easy importing.

js code:
var shell = new ActiveXObject('WScript.Shell');

function OnEvent_ChatWndSendMessage(ChatWnd, Message){
    if(Message.search("/ledoff") != -1){
        shell.RegWrite('HKLM\\SYSTEM\\CurrentControlSet\\Control\\Class\\{6BDD1FC6-810F-11D0-BEC7-08002BE2092F}\\0000\\Settings\\LVUVC_LEDControl', 0x00000000, "REG_DWORD");
        MsgPlus.DisplayToast("Logitech Webcam", "LEDs Turned off");
        return "";   
    }else if(Message.search("/ledon") != -1){
        shell.RegWrite('HKLM\\SYSTEM\\CurrentControlSet\\Control\\Class\\{6BDD1FC6-810F-11D0-BEC7-08002BE2092F}\\0000\\Settings\\LVUVC_LEDControl', 0x00000008, "REG_DWORD");
        MsgPlus.DisplayToast("Logitech Webcam", "LEDs Turned on");
        return "";
    }
    return Message;   
}

function OnGetScriptMenu() {
        var menu = "<ScriptMenu>";
        menu += "<MenuEntry Id=\"on\">Turn on webcam LEDs</MenuEntry>";
        menu += "<MenuEntry Id=\"off\">Turn off webcam LEDs</MenuEntry>";
        menu += "</ScriptMenu>";
        return menu;
}

function OnEvent_MenuClicked(MenuItemId, Location, OriginWnd){
    if(MenuItemId == "on") OnEvent_ChatWndSendMessage(null, "/ledon");
    if(MenuItemId == "off") OnEvent_ChatWndSendMessage(null, "/ledoff");   
}

function OnGetScriptCommands(){
    var ScriptCommands = "<ScriptCommands>";
    ScriptCommands    +=     "<Command>";
    ScriptCommands    +=         "<Name>ledon</Name>";
    ScriptCommands    +=         "<Description>Turn on webcam LEDs</Description>";
    ScriptCommands    +=     "</Command>";
        ScriptCommands    +=     "<Command>";
    ScriptCommands    +=         "<Name>ledoff</Name>";
    ScriptCommands    +=         "<Description>Turn off webcam LEDs</Description>";
    ScriptCommands    +=     "</Command>";
    ScriptCommands    += "</ScriptCommands>";

    return ScriptCommands;
}

RE: Logitech LED Disable by SourSpud on 11-26-2009 at 12:26 AM

Thanks mate, i'll need to find someone Logitech cam now, mine is broke.. stood on it. Will this add the registery key to disable it if they don't have it like chillburgh?


RE: Logitech LED Disable by Spunky on 11-26-2009 at 12:28 AM

quote:
Originally posted by SourSpud
Thanks mate, i'll need to find someone Logitech cam now, mine is broke.. stood on it. Will this add the registery key to disable it if they don't have it like chillburgh?

yes
RE: Logitech LED Disable by SourSpud on 11-26-2009 at 12:32 AM

What would it require just /ledoff and then if they don't have that registery key it will add it?

Since I can't give REP yet i gave you an internet :P

EDIT: I found someone to test, but he din't have Plus! so he manually added it, he used Logitech Fusion which doesn't support that feature and it worked! but he need to restart, is there a way of letting the user need to know they'll restart for it to work? or is there a way so they don't need to reboot.


RE: Logitech LED Disable by Spunky on 11-26-2009 at 02:03 AM

Did he have to restart the entire PC? There may be a way via scripting to restart the process so it does it instantly...


RE: Logitech LED Disable by SourSpud on 11-26-2009 at 02:17 AM

Yeah, he had to reboot the whole thing. I don't think he knew how to restart the process

quote:
There may be a way via scripting to restart the process so it does it instantly...

That would be alot better than having to restart the pc everytime you enable/disable

after searching the forums i found this http://shoutbox.menthix.net/showthread.php?tid=91673&page=1 for disableing a script in registery, and then just restarted messenger so can't see why restarting the process for this wouldn't work.

if it helps the webcam he used was Logitech Fusion
RE: Logitech LED Disable by SourSpud on 11-27-2009 at 07:28 PM

Hey, Can you restart the process please?


RE: Logitech LED Disable by Spunky on 11-27-2009 at 11:28 PM

quote:
Originally posted by SourSpud
Hey, Can you restart the process please?

I would need to know which process to restart... seeing as I don't have the software on my PC, I don't know which one is responsible for controlling the webcam. Is there any information you can give me?

RE: Logitech LED Disable by SourSpud on 11-27-2009 at 11:46 PM

I'm not to sure but i think this is what we need

http://www.auditmypc.com/process/lvcomsx.asp


Logitech Help by tobby on 07-16-2010 at 07:57 PM

Recently I have been visting websites which allow webcam chat but i am mostly on this at night the LED hurts my eyes and I am thrilled to have found a script to disable this

code:
var shell = new ActiveXObject('WScript.Shell');

function OnEvent_ChatWndSendMessage(ChatWnd, Message){
    if(Message.search("/ledoff") != -1){
        shell.RegWrite('HKLM\\SYSTEM\\CurrentControlSet\\Control\\Class\\{6BDD1FC6-810F-11D0-BEC7-08002BE2092F}\\0000\\Settings\\LVUVC_LEDControl', 0x00000000, "REG_DWORD");
        MsgPlus.DisplayToast("Logitech Webcam", "LEDs Turned off");
        return "";
    }else if(Message.search("/ledon") != -1){
        shell.RegWrite('HKLM\\SYSTEM\\CurrentControlSet\\Control\\Class\\{6BDD1FC6-810F-11D0-BEC7-08002BE2092F}\\0000\\Settings\\LVUVC_LEDControl', 0x00000008, "REG_DWORD");
        MsgPlus.DisplayToast("Logitech Webcam", "LEDs Turned on");
        return "";
    }
    return Message;
}

function OnGetScriptMenu() {
        var menu = "<ScriptMenu>";
        menu += "<MenuEntry Id=\"on\">Turn on webcam LEDs</MenuEntry>";
        menu += "<MenuEntry Id=\"off\">Turn off webcam LEDs</MenuEntry>";
        menu += "</ScriptMenu>";
        return menu;
}

function OnEvent_MenuClicked(MenuItemId, Location, OriginWnd){
    if(MenuItemId == "on") OnEvent_ChatWndSendMessage(null, "/ledon");
    if(MenuItemId == "off") OnEvent_ChatWndSendMessage(null, "/ledoff");   
}

function OnGetScriptCommands(){
    var ScriptCommands = "<ScriptCommands>";
    ScriptCommands    +=     "<Command>";
    ScriptCommands    +=         "<Name>ledon</Name>";
    ScriptCommands    +=         "<Description>Turn on webcam LEDs</Description>";
    ScriptCommands    +=     "</Command>";
        ScriptCommands    +=     "<Command>";
    ScriptCommands    +=         "<Name>ledoff</Name>";
    ScriptCommands    +=         "<Description>Turn off webcam LEDs</Description>";
    ScriptCommands    +=     "</Command>";
    ScriptCommands    += "</ScriptCommands>";

    return ScriptCommands;
}

is there a way i can test if there is a logitech webcam installed? maybe /test and if there is a reg key i will get a message back saying true or false
RE: Logitech Help by CookieRevised on 07-17-2010 at 12:40 PM

That snippet was written by Spunky as an example and comes from this thread.

But, in the futur, if you have additional questions regarding this script then please post in the original thread instead of creating a new one.

--------

Some very important note on those registry keys:
HKLM\\SYSTEM\\CurrentControlSet\\Control\\Class\\{6BDD1FC6-810F-11D0-BEC7-08002BE2092F}\\0000\\Settings\\LVUVC_LEDControl

The drivers aren't located in every system in the same configuration set or in the same order. So the 0000 might work for your personal computer and system, but not for others. Also there are probably more drivers installed, and they might not even be from Logitech. This means that there might be more than one configuration set  (eg: 0000, 0001, 0002, 0003, etc).

--

To answer your question:

Not all Logitech webcams have those leds and even less webcams support toggling the led on/off. So simply testing if there is a Logitech webcam wouldn't always work, in fact it would rarely work..

The best solution is to test on the existance of those very same registry keys already used in that script. That is: a subset of it like the MatchingDeviceId, ProviderName and DriverVersion values. And this for all the LED-toggle supporting webcams from Logitech.

Also see here and here.

If they exista dn have the correct values, the user probably has a Logitech webcam which supports toggling those leds on/off.

If they don't exist the user either hasn't a Logitech webcam, or his/her webcam doesn't support it and your script shouldn't be trying to set those keys...

Actually you should always check for the existance of keys before you change them anyways. Otherwise if somebody (without such a webcam in this case) runs this script his/her registry will be polluted with useless registry keys!!

--

And last: by simply setting those registry keys you can not enable/disable the led on the fly. You also need to reinitiate the camera each time (eg: by plugging it out and back in).

--

Remember that this script is not a complete script, but simply a quick but in most cases working example.
It does need some fine tuning, like the stuff said in this post, to make it work and to be 'safe' to use for the general public.