Changes to System.DeviceAttached/System.DeviceRemoved

Got a good idea? You can suggest new features here.

Add device names and other device data to System.DeviceAttached/System.DeviceRemoved

Yes
14
100%
No
0
No votes
Have no clue what I am talking about
0
No votes
Don't care
0
No votes
 
Total votes: 14

Snowbird
Experienced User
Posts: 340
Joined: Fri Jul 03, 2009 10:04 am

Re: Changes to System.DeviceAttached/System.DeviceRemoved

Post by Snowbird » Sun Jun 25, 2017 5:24 pm

ok, I did what you said, now I have this :

Code: Select all

19:28:34            Exception in thread WMI Thread:
19:28:34            Traceback (most recent call last):
19:28:34              File "threading.pyc", line 801, in __bootstrap_inner
19:28:34              File "C:\ProgramData\EventGhost\plugins\System\Device\Notifier.py", line 1525, in run
19:28:34                self._current_devices(guid, device, **dev)
19:28:34              File "C:\ProgramData\EventGhost\plugins\System\Device\Notifier.py", line 1488, in _current_devices
19:28:34                class_guid = device.ClassGuid.upper()
19:28:34            AttributeError: 'NoneType' object has no attribute 'upper'
19:28:34            

Snowbird
Experienced User
Posts: 340
Joined: Fri Jul 03, 2009 10:04 am

Re: Changes to System.DeviceAttached/System.DeviceRemoved

Post by Snowbird » Sun Jun 25, 2017 5:35 pm

kgschlosser wrote:yes there is. this is why I am having you test it out. But with BT there has to be a specific things I have to code into the plugin to look for as the devices get added removed in a different manner.. Now if you delete the pairing completely and then remake it does it then show a connection for the device?

because if it does then i will have to monitor BT devices for being enabled or not.
actually this does work ! But I first had to reinstall the version located in this post :
viewtopic.php?f=5&t=9588&start=75#p46704

When I pair or unpair the phone, not only I can see the phone itself but also the other BT services related to the phone as well, so this does work !!! :)

User avatar
kgschlosser
Site Admin
Posts: 4023
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Changes to System.DeviceAttached/System.DeviceRemoved

Post by kgschlosser » Mon Jun 26, 2017 3:39 am

I know it works. Just gotta make all the tidbits work. And windows 10 is not making this very easy. I am wondering if it is acting like this possibly becsuse of administrative privileges. Try running EG as admin and see if it begins to work.
If you like the work I have been doing then feel free to Image

User avatar
kgschlosser
Site Admin
Posts: 4023
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Changes to System.DeviceAttached/System.DeviceRemoved

Post by kgschlosser » Mon Jun 26, 2017 3:40 am

And copy and paste the events for the BT stuff for the phone. I want to see what it looks like.
If you like the work I have been doing then feel free to Image

Snowbird
Experienced User
Posts: 340
Joined: Fri Jul 03, 2009 10:04 am

Re: Changes to System.DeviceAttached/System.DeviceRemoved

Post by Snowbird » Mon Jun 26, 2017 7:54 am

Ok, here's what happens when I pair my phone :

Code: Select all

09:38:59   System.Device.Attached.USBDevice.RAZR MAXX HD <dynamic-device 'USBDevice'>
09:38:59      Attached
09:38:59         Python Script
09:38:59            Name: RAZR MAXX HD, Description: Bluetooth Peripheral Device, Caption: RAZR MAXX HD, DeviceId: BTHENUM\DEV_B07994F7ABDF\8&A715F6&0&BLUETOOTHDEVICE_B07994F7ABDF, DeviceID: BTHENUM\DEV_B07994F7ABDF\8&A715F6&0&BLUETOOTHDEVICE_B07994F7ABDF, ClassGuid: None, PNPDeviceID: BTHENUM\DEV_B07994F7ABDF\8&A715F6&0&BLUETOOTHDEVICE_B07994F7ABDF, 


09:39:01   System.Device.Attached.USBDevice.Bluetooth Peripheral Device <dynamic-device 'USBDevice'>
09:39:01      Attached
09:39:01         Python Script
09:39:01            Name: Bluetooth Peripheral Device, Description: Bluetooth Peripheral Device, Caption: Bluetooth Peripheral Device, DeviceId: BTHENUM\{00001801-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, DeviceID: BTHENUM\{00001801-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, ClassGuid: None, PNPDeviceID: BTHENUM\{00001801-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, 


09:39:03   System.Device.Attached.USBDevice.Bluetooth Peripheral Device <dynamic-device 'USBDevice'>
09:39:03      Attached
09:39:03         Python Script
09:39:03            Name: Bluetooth Peripheral Device, Description: Bluetooth Peripheral Device, Caption: Bluetooth Peripheral Device, DeviceId: BTHENUM\{00001800-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, DeviceID: BTHENUM\{00001800-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, ClassGuid: None, PNPDeviceID: BTHENUM\{00001800-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, 


09:39:05   System.Device.Attached.USBDevice.Headset Gateway <dynamic-device 'USBDevice'>
09:39:05      Attached
09:39:05         Python Script
09:39:05            Name: Headset Gateway, Description: Headset Gateway, Caption: Headset Gateway, DeviceId: BTHENUM\{00001112-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, DeviceID: BTHENUM\{00001112-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, ClassGuid: None, PNPDeviceID: BTHENUM\{00001112-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, 


09:39:07   System.Device.Attached.USBDevice.Handsfree Gateway <dynamic-device 'USBDevice'>
09:39:07      Attached
09:39:07         Python Script
09:39:07            Name: Handsfree Gateway, Description: Handsfree Gateway, Caption: Handsfree Gateway, DeviceId: BTHENUM\{0000111F-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, DeviceID: BTHENUM\{0000111F-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, ClassGuid: None, PNPDeviceID: BTHENUM\{0000111F-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, 


09:39:07   System.Device.Attached.USBDevice.MAP SMS <dynamic-device 'USBDevice'>
09:39:07      Attached
09:39:07         Python Script
09:39:07            Name: MAP SMS, Description: MAP SMS, Caption: MAP SMS, DeviceId: BTHENUM\{00001132-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, DeviceID: BTHENUM\{00001132-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, ClassGuid: None, PNPDeviceID: BTHENUM\{00001132-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, 


09:39:07   System.Device.Attached.USBDevice.Headset Gateway <dynamic-device 'USBDevice'>
09:39:07      Attached
09:39:07         Python Script
09:39:07            Name: Headset Gateway, Description: Headset Gateway, Caption: Headset Gateway, DeviceId: BTHENUM\{00001112-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, DeviceID: BTHENUM\{00001112-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, ClassGuid: None, PNPDeviceID: BTHENUM\{00001112-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, 


09:39:07   System.Device.Attached.USBDevice.OBEX File Transfer <dynamic-device 'USBDevice'>
09:39:07      Attached
09:39:07         Python Script
09:39:07            Name: OBEX File Transfer, Description: OBEX File Transfer, Caption: OBEX File Transfer, DeviceId: BTHENUM\{00001106-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, DeviceID: BTHENUM\{00001106-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, ClassGuid: None, PNPDeviceID: BTHENUM\{00001106-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, 


09:39:07   System.Device.Attached.USBDevice.OBEX Object Push <dynamic-device 'USBDevice'>
09:39:07      Attached
09:39:07         Python Script
09:39:07            Name: OBEX Object Push, Description: OBEX Object Push, Caption: OBEX Object Push, DeviceId: BTHENUM\{00001105-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, DeviceID: BTHENUM\{00001105-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, ClassGuid: None, PNPDeviceID: BTHENUM\{00001105-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, 


09:39:07   System.Device.Attached.USBDevice.OBEX Phonebook Access Server <dynamic-device 'USBDevice'>
09:39:07      Attached
09:39:07         Python Script
09:39:07            Name: OBEX Phonebook Access Server, Description: OBEX Phonebook Access Server, Caption: OBEX Phonebook Access Server, DeviceId: BTHENUM\{0000112F-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, DeviceID: BTHENUM\{0000112F-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, ClassGuid: None, PNPDeviceID: BTHENUM\{0000112F-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, 


09:39:09   System.Device.Attached.USBDevice.Handsfree Gateway <dynamic-device 'USBDevice'>
09:39:09      Attached
09:39:09         Python Script
09:39:09            Name: Handsfree Gateway, Description: Handsfree Gateway, Caption: Handsfree Gateway, DeviceId: BTHENUM\{0000111F-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, DeviceID: BTHENUM\{0000111F-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, ClassGuid: None, PNPDeviceID: BTHENUM\{0000111F-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, 


09:39:13   System.Device.Attached.USBDevice.AV Remote Control Target <dynamic-device 'USBDevice'>
09:39:13      Attached
09:39:13         Python Script
09:39:13            Name: AV Remote Control Target, Description: AV Remote Control Target, Caption: AV Remote Control Target, DeviceId: BTHENUM\{0000110C-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, DeviceID: BTHENUM\{0000110C-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, ClassGuid: None, PNPDeviceID: BTHENUM\{0000110C-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, 


09:39:15   System.Device.Attached.USBDevice.Advanced Audio <dynamic-device 'USBDevice'>
09:39:15      Attached
09:39:15         Python Script
09:39:15            Name: Advanced Audio, Description: Advanced Audio, Caption: Advanced Audio, DeviceId: BTHENUM\{0000110A-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, DeviceID: BTHENUM\{0000110A-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, ClassGuid: None, PNPDeviceID: BTHENUM\{0000110A-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000,


09:39:17   System.Device.Attached.USBDevice.Bluetooth Peripheral Device <dynamic-device 'USBDevice'>
09:39:17      Attached
09:39:17         Python Script
09:39:17            Name: Bluetooth Peripheral Device, Description: Bluetooth Peripheral Device, Caption: Bluetooth Peripheral Device, DeviceId: BTHENUM\{0000110E-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, DeviceID: BTHENUM\{0000110E-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, ClassGuid: None, PNPDeviceID: BTHENUM\{0000110E-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, 


09:39:19   System.Device.Attached.USBDevice.Android Network Access Point <dynamic-device 'USBDevice'>
09:39:19      Attached
09:39:19         Python Script
09:39:19            Name: Android Network Access Point, Description: Android Network Access Point, Caption: Android Network Access Point, DeviceId: BTHENUM\{00001116-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, DeviceID: BTHENUM\{00001116-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, ClassGuid: None, PNPDeviceID: BTHENUM\{00001116-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, 


09:39:21   System.Device.Attached.USBDevice.MAP SMS <dynamic-device 'USBDevice'>
09:39:21      Attached
09:39:21         Python Script
09:39:21            Name: MAP SMS, Description: MAP SMS, Caption: MAP SMS, DeviceId: BTHENUM\{00001132-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, DeviceID: BTHENUM\{00001132-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, ClassGuid: None, PNPDeviceID: BTHENUM\{00001132-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, 


09:39:25   System.Device.Attached.USBDevice.OBEX Phonebook Access Server <dynamic-device 'USBDevice'>
09:39:25      Attached
09:39:25         Python Script
09:39:25            Name: OBEX Phonebook Access Server, Description: OBEX Phonebook Access Server, Caption: OBEX Phonebook Access Server, DeviceId: BTHENUM\{0000112F-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, DeviceID: BTHENUM\{0000112F-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, ClassGuid: None, PNPDeviceID: BTHENUM\{0000112F-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, 


09:39:29   System.Device.Attached.USBDevice.OBEX Object Push <dynamic-device 'USBDevice'>
09:39:29      Attached
09:39:29         Python Script
09:39:29            Name: OBEX Object Push, Description: OBEX Object Push, Caption: OBEX Object Push, DeviceId: BTHENUM\{00001105-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, DeviceID: BTHENUM\{00001105-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, ClassGuid: None, PNPDeviceID: BTHENUM\{00001105-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, 


09:39:33   System.Device.Attached.USBDevice.OBEX File Transfer <dynamic-device 'USBDevice'>
09:39:33      Attached
09:39:33         Python Script
09:39:33            Name: OBEX File Transfer, Description: OBEX File Transfer, Caption: OBEX File Transfer, DeviceId: BTHENUM\{00001106-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, DeviceID: BTHENUM\{00001106-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, ClassGuid: None, PNPDeviceID: BTHENUM\{00001106-0000-1000-8000-00805F9B34FB}_LOCALMFG&000F\8&A715F6&0&B07994F7ABDF_C00000000, 


09:39:37   System.Device.Attached.USBDevice.Bluetooth Peripheral Device <dynamic-device 'USBDevice'>
09:39:37      Attached
09:39:37         Python Script
09:39:37            Name: Bluetooth Peripheral Device, Description: Bluetooth Peripheral Device, Caption: Bluetooth Peripheral Device, DeviceId: BTHENUM\{00001101-0000-1000-8000-00805F9B34FB}_LOCALMFG&0000\8&20E5A5E0&0&000000000000_00000009, DeviceID: BTHENUM\{00001101-0000-1000-8000-00805F9B34FB}_LOCALMFG&0000\8&20E5A5E0&0&000000000000_00000009, ClassGuid: None, PNPDeviceID: BTHENUM\{00001101-0000-1000-8000-00805F9B34FB}_LOCALMFG&0000\8&20E5A5E0&0&000000000000_00000009,

Snowbird
Experienced User
Posts: 340
Joined: Fri Jul 03, 2009 10:04 am

Re: Changes to System.DeviceAttached/System.DeviceRemoved

Post by Snowbird » Mon Jun 26, 2017 7:58 am

kgschlosser wrote:I know it works. Just gotta make all the tidbits work. And windows 10 is not making this very easy. I am wondering if it is acting like this possibly becsuse of administrative privileges. Try running EG as admin and see if it begins to work.
I still get this error when I start as admin :
09:57:11 Exception in thread WMI Thread:
09:57:11 Traceback (most recent call last):
09:57:11 File "threading.pyc", line 801, in __bootstrap_inner
09:57:11 File "C:\ProgramData\EventGhost\plugins\System\Device\Notifier.py", line 1525, in run
09:57:11 self._current_devices(guid, device, **dev)
09:57:11 File "C:\ProgramData\EventGhost\plugins\System\Device\Notifier.py", line 1488, in _current_devices
09:57:11 class_guid = device.ClassGuid.upper()
09:57:11 AttributeError: 'NoneType' object has no attribute 'upper'
09:57:11

User avatar
kgschlosser
Site Admin
Posts: 4023
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Changes to System.DeviceAttached/System.DeviceRemoved

Post by kgschlosser » Mon Jun 26, 2017 5:22 pm

give this one a try
Attachments
System-1.2.0.egplugin
(206.95 KiB) Downloaded 126 times
If you like the work I have been doing then feel free to Image

Snowbird
Experienced User
Posts: 340
Joined: Fri Jul 03, 2009 10:04 am

Re: Changes to System.DeviceAttached/System.DeviceRemoved

Post by Snowbird » Mon Jun 26, 2017 5:49 pm

nice ! the error is gone ! :wink:

but what happened to these events ? they are not generated anymore ?
System.SessionUnlock
System.SessionLock

User avatar
kgschlosser
Site Admin
Posts: 4023
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Changes to System.DeviceAttached/System.DeviceRemoved

Post by kgschlosser » Tue Jun 27, 2017 2:26 am

follow th initial instructions for running the plugin. I need that log.txt file after it has run for a minute or so.. you will see all kinds of stuff go flying by on the screen. I am not worried about the session locking and unlocking. this thing is not complete. I only set this version to give excessive logging information. and i need to see that information.
If you like the work I have been doing then feel free to Image

Post Reply