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.

DeviceAttached & DeviceRemoved Triggers Multiple Times

If you have a question or need help, this is the place to be.
Post Reply
Canis Enigmas
Posts: 5
Joined: Tue Apr 09, 2013 12:29 pm

DeviceAttached & DeviceRemoved Triggers Multiple Times

Post by Canis Enigmas »

Has anyone encountered this problem before?
Whenever I plug or unplug in a USB device (for my case a Logitech wireless headset USB transmitter) the DeviceAttached and DeviceRemoved events would trigger 3 times.
I've tried putting in a 5 second delay to maybe wait out the extra triggers, but it only delays it and it will always trigger 3 times no matter what. Event log is attached below:
Does this appear to be a unique problem to my device, or is there a workaround for this problem?
Thanks.


System.DeviceAttached [u'\\\\?\\USB#VID_046D&PID_0A1F#6&182a12da&0&8#{a5dcbf10-6530-11d2-901f-00c04fb951ed}']
PnP Device Converter
eg.TriggerEvent(eg.event.payload[0][8:25], prefix = eg.event.suffix)
DeviceAttached.VID_046D&PID_0A1F
Emulate Keystrokes: {Ctrl+Alt+Win+F8}
System.DeviceAttached [u'\\\\?\\HID#VID_046D&PID_0A1F&MI_03&Col01#9&1a67e214&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}']
PnP Device Converter
eg.TriggerEvent(eg.event.payload[0][8:25], prefix = eg.event.suffix)
System.DeviceAttached [u'\\\\?\\HID#VID_046D&PID_0A1F&MI_03&Col02#9&1a67e214&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}']
PnP Device Converter
eg.TriggerEvent(eg.event.payload[0][8:25], prefix = eg.event.suffix)
DeviceAttached.VID_046D&PID_0A1F
Emulate Keystrokes: {Ctrl+Alt+Win+F8}
DeviceAttached.VID_046D&PID_0A1F
Emulate Keystrokes: {Ctrl+Alt+Win+F8}


System.DeviceRemoved [u'\\\\?\\HID#VID_046D&PID_0A1F&MI_03&Col01#9&1a67e214&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}']
PnP Device Converter
eg.TriggerEvent(eg.event.payload[0][8:25], prefix = eg.event.suffix)
System.DeviceRemoved [u'\\\\?\\HID#VID_046D&PID_0A1F&MI_03&Col02#9&1a67e214&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}']
PnP Device Converter
eg.TriggerEvent(eg.event.payload[0][8:25], prefix = eg.event.suffix)
System.DeviceRemoved [u'\\\\?\\USB#VID_046D&PID_0A1F#6&182a12da&0&8#{a5dcbf10-6530-11d2-901f-00c04fb951ed}']
PnP Device Converter
eg.TriggerEvent(eg.event.payload[0][8:25], prefix = eg.event.suffix)
DeviceRemoved.VID_046D&PID_0A1F
Emulate Keystrokes: {Ctrl+Alt+Win+F5}
DeviceRemoved.VID_046D&PID_0A1F
Emulate Keystrokes: {Ctrl+Alt+Win+F5}
DeviceRemoved.VID_046D&PID_0A1F
Emulate Keystrokes: {Ctrl+Alt+Win+F5}
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: DeviceAttached & DeviceRemoved Triggers Multiple Times

Post by Pako »

This is not a bug.
This is the correct behavior. Apparently it is a composite device.
You can use eg.event.payload[0][8:37] instead of eg.event.payload[0][8:25] and you get three different events.
Then, use only one of them.

Pako
You know flattr ? You can Image
Canis Enigmas
Posts: 5
Joined: Tue Apr 09, 2013 12:29 pm

Re: DeviceAttached & DeviceRemoved Triggers Multiple Times

Post by Canis Enigmas »

Thanks, Pako. That hit the spot.
Getting the hang of the Python programming in there.
Post Reply