<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def value(self):
 """ Read the value from BACnet network """

        try:
            res = self.properties.device.properties.network.read(
                "{} {} {} presentValue".format(
                    self.properties.device.properties.address,
                    self.properties.type,
                    str(self.properties.address),
                )
            )
            self._trend(res)

        except Exception:
            raise Exception("Problem reading : {}".format(self.properties.name))

        if res == "inactive":
            self._key = 0
            self._boolKey = False
        else:
            self._key = 1
            self._boolKey = True
        return res