# \[BUG-14837\] system.opc.readvalue not working for diagnostics tags

**URL:** <https://forum.inductiveautomation.com/t/bug-14837-system-opc-readvalue-not-working-for-diagnostics-tags/27802>\
**Category:** Ignition Early Access\
**Created:** [August 27, 2019, 3:14pm UTC](https://forum.inductiveautomation.com/t/bug-14837-system-opc-readvalue-not-working-for-diagnostics-tags/27802 "2019-08-27T15:14:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![oisin.gribben](https://avatars.discourse-cdn.com/v4/letter/o/9d8465/32.png) [@oisin.gribben](https://forum.inductiveautomation.com/u/oisin.gribben)\
**Post date:** [August 27, 2019, 3:14pm UTC](https://forum.inductiveautomation.com/t/bug-14837-system-opc-readvalue-not-working-for-diagnostics-tags/27802/1 "2019-08-27T15:14:58Z")

</div>

We have a report with a script as the data source that worked fine in 7.10 but doesn’t seem to work now in 8.0

We are finding all the OPC Servers and then looking for all the devices on each one and displaying the Port, Hostname and connection state. When using the system.opc.readvalue all we get back is nulls.

We are able to see the value on the quick client on the gateway using subscribe but not not read.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/1/155747fdcab14bae37c756c087f914d87e06f6e3.png)

```auto
OPCServers = system.opc.getServers()
for OPCServer in OPCServers:
		nodeId = "Devices"
		devices = system.opc.browseServer(OPCServer, nodeId)
		for device in devices:
			path = device.getDisplayName()
			connectionState = str(system.opc.readValue(OPCServer, path + "_Meta:[Diagnostics]/Connection State").getValue())
			port = str(system.opc.readValue(OPCServer, path + "_Meta:[Diagnostics]/Port").getValue())
			hostname = str(system.opc.readValue(OPCServer, path + "_Meta:[Diagnostics]/Hostname" ).getValue())

```

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 27, 2019, 3:25pm UTC](https://forum.inductiveautomation.com/t/bug-14837-system-opc-readvalue-not-working-for-diagnostics-tags/27802/2 "2019-08-27T15:25:49Z")

</div>

Where does the `OPCServers` list come from? The name of the connection to the built-in OPC UA server changed in 8.0 on a fresh install.

---

<div class="post-metadata">

**Author:** ![oisin.gribben](https://avatars.discourse-cdn.com/v4/letter/o/9d8465/32.png) [@oisin.gribben](https://forum.inductiveautomation.com/u/oisin.gribben)\
**Post date:** [August 27, 2019, 3:28pm UTC](https://forum.inductiveautomation.com/t/bug-14837-system-opc-readvalue-not-working-for-diagnostics-tags/27802/3 "2019-08-27T15:28:12Z")

</div>

i’ve updated the code… missed the top line

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [August 27, 2019, 3:30pm UTC](https://forum.inductiveautomation.com/t/bug-14837-system-opc-readvalue-not-working-for-diagnostics-tags/27802/4 "2019-08-27T15:30:17Z")

</div>

This does seem to be a bug, I’ll make a ticket.

---

<div class="post-metadata">

**Author:** ![awalker](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/awalker/32/6874_2.png) [@awalker](https://forum.inductiveautomation.com/u/awalker)\
**Post date:** [September 3, 2019, 5:41pm UTC](https://forum.inductiveautomation.com/t/bug-14837-system-opc-readvalue-not-working-for-diagnostics-tags/27802/5 "2019-09-03T17:41:20Z")

</div>

This issue was fixed in the 8.0.5 nightly build that was uploaded today (9/3).
