# DiscoveryProperties How to access it

**URL:** <https://forum.commonvisionblox.com/t/discoveryproperties-how-to-access-it/837>\
**Category:** Python API\
**Created:** [July 23, 2019, 6:36am UTC](https://forum.commonvisionblox.com/t/discoveryproperties-how-to-access-it/837 "2019-07-23T06:36:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![piotrM](https://avatars.discourse-cdn.com/v4/letter/p/d07c76/32.png) [@piotrM](https://forum.commonvisionblox.com/u/piotrM)\
**Post date:** [July 23, 2019, 6:36am UTC](https://forum.commonvisionblox.com/t/discoveryproperties-how-to-access-it/837/1 "2019-07-23T06:36:26Z")

</div>

Hi,  
I am using CVBpy documentation and I see “DiscoveryProperties” that can be queried from DiscoveryInformation. How can I access “DiscoveryProperties”? Currently I am parsing DiscoveryInformation.access\_token as JSON since I am not sure how to query it.

```python
discovered_devices_list = cvb.DeviceFactory.discover_from_root(cvb.DiscoverFlags.IgnoreVins)

for i in range(camera_count):
    json_data = json.loads(discovered_devices_list[i].access_token)

```

Thanks!  
Piotr

---

<div class="post-metadata">

**Author:** ![usernv](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/usernv/32/637_2.png) [@usernv](https://forum.commonvisionblox.com/u/usernv)\
**Post date:** [July 25, 2019, 8:20am UTC](https://forum.commonvisionblox.com/t/discoveryproperties-how-to-access-it/837/2 "2019-07-25T08:20:03Z")

</div>

Hi Piotr,  
you can access the device properties like so:  
`discovered_devices_list[0].read_property(cvb.DiscoveryProperties.DeviceAccessStatus)`  
or:  
`discovered_devices_list[0][cvb.DiscoveryProperties.DeviceAccessStatus]`

see: [https://help.commonvisionblox.com/NextGen/14.0/cvbpy/d5/d30/classcvb\_1\_1\_discovery\_information.html](https://help.commonvisionblox.com/NextGen/14.0/cvbpy/d5/d30/classcvb_1_1_discovery_information.html)

If you are just looking for any USB camera, you could also do:

```python
# Set a filter to ignore all GigE and CVB specific devices
device_info = cvb.DeviceFactory.discover_from_root(cvb.DiscoverFlags.IgnoreGevFD
  | cvb.DiscoverFlags.IgnoreVins
  | cvb.DicoverFlags.IgnoreSD)
# There should not be much left except USB 3 Vision devices but you never know...
token = next((info.access_token for info in device_info 
  if "U3V" == info[cvb.DiscoverProperties.DeviceTransportLayerType]), None)
# Finally open it...
device = cvb.DeviceFactory.open(token)

```

(here are some adjustemnts to avoid missconceptions)

Sorry for my bad formatting, all spaces got removed. Please let me know if you have further questions.  
Best Nico

---

<div class="post-metadata">

**Author:** ![Andreas](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/andreas/32/75_2.png) [@Andreas](https://forum.commonvisionblox.com/u/Andreas)\
**Post date:** [July 25, 2019, 6:06pm UTC](https://forum.commonvisionblox.com/t/discoveryproperties-how-to-access-it/837/3 "2019-07-25T18:06:29Z")

</div>

Hi @usernv  
I hope you don’t mind me editing your code. It was essentially right, however Discourse offers some formatting options 😉
