Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Event when headphones are plugged in & Bluetooth plugin?

If you have a question or need help, this is the place to be.
Post Reply
mitchelltrout
Posts: 6
Joined: Tue Apr 07, 2015 6:30 pm

Event when headphones are plugged in & Bluetooth plugin?

Post by mitchelltrout »

I have done a little searching here on the forum but didn't find anything related to what I want. I am trying to have EventGhost recognise when my headphones are plugged into my laptop. My goal is to have EG turn the system volume down automatically whenever I plug in headphones. I will often unplug my headphones so others in my office can hear the music or video that I am playing, but I also have to turn the volume up as the laptop speakers are very quiet. Afterwards I plug the headphones back in and end up blasting my eardrums. This is something that is very easy to do with Tasker on my Android phone, but I cannot find any EG plugins that will fire an event when headphones are plugged in. Does anyone know of a way?
Last edited by mitchelltrout on Wed Apr 08, 2015 4:26 pm, edited 1 time in total.
Sem;colon
Plugin Developer
Posts: 625
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Event when headphones are plugged in

Post by Sem;colon »

Hello mitchelltrout,
I have done a little searching here on the forum but didn't find anything related to what I want.
A little more searching would have probably lead you to this plugin:
viewtopic.php?f=9&t=6213&sid=449b54abec ... 2b57ac36aa
Which does exactly what you want :wink:
If you like my work, Image me a drink :wink:
mitchelltrout
Posts: 6
Joined: Tue Apr 07, 2015 6:30 pm

Re: Event when headphones are plugged in

Post by mitchelltrout »

Ah thank you very much!

The search function on this forum must not be very good. When I searched for "headphones" I only got 1 result. However after reading your link I tried searching "headphone" and got a lot more results.

Thanks again.
mitchelltrout
Posts: 6
Joined: Tue Apr 07, 2015 6:30 pm

Re: Event when headphones are plugged in

Post by mitchelltrout »

I have another question that I don't want to make a new thread for.

Regarding Bluetooth, is there a way to simply detect if a bluetooth device is connected? For example if my laptop can no longer see my phone via bluetooth it will automatically lock itself. The lock itself part is easy and I'm not worried about having it automatically unlock(briefly looked into that but seems to be a pain in the butt). I found this thread from 2009, viewtopic.php?f=2&t=1264&p=7437, where someone was able to achieve this using some "personal hacked code". I followed the instructions but it just crashes EventGhost when I try to add the plugin. The author has not provided any updates for it since 2009 and has not been back to these forums for almost a year. Is there another plugin that adds bluetooth support? Again I tried searching but there are not that many threads on bluetooth, and the ones I did find are for a specific device(playstation controller plugin for example).
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Event when headphones are plugged in & Bluetooth plugin?

Post by Pako »

mitchelltrout wrote:I found this thread from 2009, viewtopic.php?f=2&t=1264&p=7437, where someone was able to achieve this using some "personal hacked code". I followed the instructions but it just crashes EventGhost when I try to add the plugin.
I tried it and it works.
Some files from bluetooth directory must be removed.
Maybe it would be easier if you use the attached file BT.zip.
Unzip it into a directory ...\EventGhost\plugins, and then you still have to set the MAC address of your device (file _init_.py, line 91).
Then you can see something like this:
egBluetooth.png
Pako
Attachments
BT.zip
(84 KiB) Downloaded 222 times
mitchelltrout
Posts: 6
Joined: Tue Apr 07, 2015 6:30 pm

Re: Event when headphones are plugged in & Bluetooth plugin?

Post by mitchelltrout »

Awesome! Works like a charm. Thank you very much.
Post Reply