|
|
|
|
110
|
tm_t, value_t = self.__target_storage__[self.KEY_SETPOINT]
|
110
|
tm_t, value_t = self.__target_storage__[self.KEY_SETPOINT]
|
111
|
except KeyError:
|
111
|
except KeyError:
|
112
|
if value_s is not None:
|
112
|
if value_s is not None:
|
113
|
- return self.__nagios_return__(DID_FOLLOWS_SETPOINT, nagios.Nagios.OK, "Current temperature setpoint %.1f°C, but never received a setpoint. That might be okay." % value_s)
|
|
|
|
|
113
|
+ return self.__nagios_return__(DID_FOLLOWS_SETPOINT, nagios.Nagios.OK, "Current temperature setpoint %.1f C, but never received a setpoint. That might be okay." % value_s)
|
114
|
return self.__nagios_return__(DID_FOLLOWS_SETPOINT, nagios.Nagios.UNKNOWN, "Device exists, but no data received")
|
114
|
return self.__nagios_return__(DID_FOLLOWS_SETPOINT, nagios.Nagios.UNKNOWN, "Device exists, but no data received")
|
115
|
else:
|
115
|
else:
|
116
|
tm = time.time()
|
116
|
tm = time.time()
|
117
|
dt = tm - tm_t
|
117
|
dt = tm - tm_t
|
118
|
if value_t != value_s and dt > self.FOLLOW_REQUEST_ERROR:
|
118
|
if value_t != value_s and dt > self.FOLLOW_REQUEST_ERROR:
|
119
|
- return self.__nagios_return__(DID_FOLLOWS_SETPOINT, nagios.Nagios.ERROR, "Requested setpoint %.1f°C unequal valve setpoint %.1f°C since %.1fmin" % (value_t, value_s, (time.time()-tm_s)/60))
|
|
|
|
|
119
|
+ return self.__nagios_return__(DID_FOLLOWS_SETPOINT, nagios.Nagios.ERROR, "Requested setpoint %.1f C unequal valve setpoint %.1f C since %.1fmin" % (value_t, value_s, (time.time()-tm_s)/60))
|
120
|
elif value_t != value_s and dt > self.FOLLOW_REQUEST_WARNING:
|
120
|
elif value_t != value_s and dt > self.FOLLOW_REQUEST_WARNING:
|
121
|
- return self.__nagios_return__(DID_FOLLOWS_SETPOINT, nagios.Nagios.WARNING, "Requested setpoint %.1f°C unequal valve setpoint %.1f°C since %.1fmin" % (value_t, value_s, (time.time()-tm_s)))
|
|
|
122
|
- return self.__nagios_return__(DID_FOLLOWS_SETPOINT, nagios.Nagios.OK, "Requested setpoint equal valve setpoint %.1f°C" % value_s)
|
|
|
|
|
121
|
+ return self.__nagios_return__(DID_FOLLOWS_SETPOINT, nagios.Nagios.WARNING, "Requested setpoint %.1f C unequal valve setpoint %.1f C since %.1fmin" % (value_t, value_s, (time.time()-tm_s)))
|
|
|
122
|
+ return self.__nagios_return__(DID_FOLLOWS_SETPOINT, nagios.Nagios.OK, "Requested setpoint equal valve setpoint %.1f C" % value_s)
|
123
|
#
|
123
|
#
|
124
|
# BATTERY
|
124
|
# BATTERY
|
125
|
#
|
125
|
#
|
|
|
|
|
220
|
elif value_s <= 5:
|
220
|
elif value_s <= 5:
|
221
|
return self.__nagios_return__(DID_ACTOR, nagios.Nagios.OK, "No monitoring in Summer Mode")
|
221
|
return self.__nagios_return__(DID_ACTOR, nagios.Nagios.OK, "No monitoring in Summer Mode")
|
222
|
elif value_c > value_s + self.ACTOR_ERR_OFFSET:
|
222
|
elif value_c > value_s + self.ACTOR_ERR_OFFSET:
|
223
|
- return self.__nagios_return__(DID_ACTOR, nagios.Nagios.ERROR, "Current Temperature much to high %.1f°C > %.1f°C" % (value_c, value_s))
|
|
|
|
|
223
|
+ return self.__nagios_return__(DID_ACTOR, nagios.Nagios.ERROR, "Current Temperature much to high %.1f C > %.1f C" % (value_c, value_s))
|
224
|
elif value_c > value_s + self.ACTOR_WARN_OFFSET:
|
224
|
elif value_c > value_s + self.ACTOR_WARN_OFFSET:
|
225
|
- return self.__nagios_return__(DID_ACTOR, nagios.Nagios.WARNING, "Current Temperature to high %.1f°C > %.1f°C" % (value_c, value_s))
|
|
|
|
|
225
|
+ return self.__nagios_return__(DID_ACTOR, nagios.Nagios.WARNING, "Current Temperature to high %.1f C > %.1f C" % (value_c, value_s))
|
226
|
else:
|
226
|
else:
|
227
|
- return self.__nagios_return__(DID_ACTOR, nagios.Nagios.OK, "Current Temperature okay %.1f°C > %.1f°C" % (value_c, value_s))
|
|
|
|
|
227
|
+ return self.__nagios_return__(DID_ACTOR, nagios.Nagios.OK, "Current Temperature okay %.1f C > %.1f C" % (value_c, value_s))
|
228
|
else:
|
228
|
else:
|
229
|
return super().status(key)
|
229
|
return super().status(key)
|
230
|
|
230
|
|