def __init__(self):
        WeatherBase.__init__(self)
        self._last_check = 0
        self._time_ws = None

        # logging.
        # put every logger on behalf of chimera's logger so
        # we can easily setup levels on all our parts

        logName = self.__module__
        if not logName.startswith("chimera."):
            logName = "chimera." + logName + " (%s)" % logName

        self.log = logging.getLogger(logName)
    def __init__(self):

        WeatherBase.__init__(self)

        self._last_check = 0
        self._time_ws = None

        # logging.
        # put every logger on behalf of chimera's logger so
        # we can easily setup levels on all our parts
        logName = self.__module__
        if not logName.startswith("chimera."):
            logName = "chimera." + logName + " (%s)" % logName

        self.log = logging.getLogger(logName)
    def __init__(self):
        WeatherBase.__init__(self)
        self._serial = None

        # Temperatures of IR sensor and IR measurement are converted to degC
        #		by dividing by 100.
        #
        # A! - Device name
        # B! - Firmware version
        # K! - serial number
        # T! - Ambient temperature (/100 to get value)
        # S! - IR sky temperature (/100 to get value)
        # E! - Rain frequency (2560=dry, <2560=wet, single drop = 2300)
        # C! - LDR voltage + Rain sensor temp (!4=1022 = dark, !4=11 = bright - around sunset starts to increase, seen from home)
        # D! - Device errors

        self._cmds = ('T!', 'E!', 'S!', 'C!')
        self._rets = ('!2', '!R', '!1', '!6')
        self._data = {cmd: list() for cmd in self._cmds}
        self._data_update = {cmd: list() for cmd in self._cmds}
Example #4
0
    def __init__(self):
        WeatherBase.__init__(self)
        self.field_re = re.compile('[ ]*')  # Weather data file parse regexp
        self._last_check = 0
        self._date_ws = None
        self._time_ws = None

        # logging.
        # put every logger on behalf of chimera's logger so
        # we can easily setup levels on all our parts
        logName = self.__module__
        if not logName.startswith("chimera."):
            logName = "chimera." + logName + " (%s)" % logName

        self.log = logging.getLogger(logName)

        # For wind direction
        self._directions = np.array(
            ["N", "NNE", "NE", "ENE", "E", "ESE", "SE", "SSE", "S", "SSW", "SW", "WSW", "W", "WNW", "NW", "NNW"])
        self._angles = np.arange(0, 360, 360. / len(self._directions))
        self._directions = np.append(self._directions, ["---"])
        self._angles = np.append(self._angles, [0])
Example #5
0
 def __init__(self):
     WeatherBase.__init__(self)
Example #6
0
 def __init__(self):
     WeatherBase.__init__(self)
Example #7
0
 def __init__(self):
     WeatherBase.__init__(self)
     self._data = dict()