Example #1
0
    def stop(self):
        """Stop the component.

        """
        self.stop_check()
        JNTComponent.stop(self)
        return True
Example #2
0
 def stop(self):
     """
     """
     if self.sensor is not None:
         self.sensor.sleep()
     JNTComponent.stop(self)
     self.sensor = None
 def stop(self):
     """
     """
     self.stop_listen()
     JNTComponent.stop(self)
     if self._bus.spi_locked():
         logger.warning('[%s] - Bus is locked. Close device anyway.', self.__class__.__name__)
         if self.pn532 is not None:
             self.pn532.close()
     self._bus.spi_acquire()
     try:
         self.pn532.close()
     except Exception:
         logger.exception('[%s] - Exception when stopping', self.__class__.__name__)
     finally:
         self.pn532 = None
         self._bus.spi_release()
 def stop(self):
     """
     """
     self.stop_listen()
     JNTComponent.stop(self)
     if self._bus.spi_locked():
         logger.warning('[%s] - Bus is locked. Close device anyway.',
                        self.__class__.__name__)
         if self.pn532 is not None:
             self.pn532.close()
     self._bus.spi_acquire()
     try:
         self.pn532.close()
     except Exception:
         logger.exception('[%s] - Exception when stopping',
                          self.__class__.__name__)
     finally:
         self.pn532 = None
         self._bus.spi_release()
Example #5
0
 def stop(self):
     """Stop the component.
     """
     if self.mqttc_values is not None:
         try:
             hadd = HADD%(self.remote_hadd[0], self.remote_hadd[1])
             values_read = self.get_read_values()
             topics = []
             for value in values_read:
                 if value[0] == 'user':
                     topic=TOPIC_VALUES_USER
                 else:
                     topic=TOPIC_VALUES_BASIC
                 topic = topic%(HADD%(self.remote_hadd)+'/'+value[1])
                 topics.append(topic)
             logger.debug("[%s] - Unsubscribe to %s", self.__class__.__name__, topics)
             self.mqttc_values.unsubscribe(topics)
             self.mqttc_values.stop()
             if self.mqttc_values.is_alive():
                 self.mqttc_values.join()
             self.mqttc_values = None
         except Exception:
             logger.exception("[%s] - stop", self.__class__.__name__)
     if self.mqttc_heartbeat is not None:
         try:
             hadd = HADD%(self.remote_hadd[0], self.remote_hadd[1])
             logger.debug("[%s] - Unsubscribe to %s", self.__class__.__name__, TOPIC_HEARTBEAT_NODE%(hadd))
             self.mqttc_heartbeat.unsubscribe(topic=TOPIC_HEARTBEAT_NODE%(hadd))
             self.mqttc_heartbeat.stop()
             if self.mqttc_heartbeat.is_alive():
                 self.mqttc_heartbeat.join()
             self.mqttc_heartbeat = None
         except Exception:
             logger.exception("[%s] - stop", self.__class__.__name__)
     JNTComponent.stop(self)
     return True
 def stop(self):
     """
     """
     res = JNTComponent.stop(self)
     if self._bus.spi_locked():
         logger.warning('[%s] - Bus is locked. Close device anyway.',
                        self.__class__.__name__)
         if self.tft is not None:
             self.tft.close()
     self._bus.spi_acquire()
     try:
         self.tft.close()
     except Exception:
         logger.exception('[%s] - Exception when clearing',
                          self.__class__.__name__)
     try:
         self.tft = None
     except Exception:
         logger.exception('[%s] - Exception when stopping',
                          self.__class__.__name__)
     finally:
         self._bus.spi_release()
     return res
Example #7
0
    def stop(self):
        """Stop the component.

        """
        JNTComponent.stop(self)
        return True
 def stop(self):
     """
     """
     JNTComponent.stop(self)
     self.sensor = None
 def stop(self):
     """
     """
     JNTComponent.stop(self)
     self.clock = None
 def stop(self):
     """
     """
     JNTComponent.stop(self)
     self.display = None
Example #11
0
    def stop(self):
        """Stop the component.

        """
        self._bus.nodeman.remove_daily_job(self.current_rotate)
        return JNTComponent.stop(self)
Example #12
0
 def stop(self):
     """
     """
     JNTComponent.stop(self)
     self.vcnl = None
 def stop(self):
     """
     """
     JNTComponent.stop(self)
     self.clock = None