def get_values(self):
     try:
         cluster = SensorCluster(ID=self.plant.slot_id)
         values = cluster.sensor_values()
         for sensor, value in values.items():
             self.plant.record_sensor(sensor, value)
     except:
         # Something has gone wrong
         # (module disconnected, had an error collecting, etc.)
         # Don't let it crash the webserver.
         pass
 def get_water_level(cls):
     try:
         level = SensorCluster.get_water_level()
         models.WaterLevel.create(level=level*100)
     except:
         pass