diff --git a/bin/user/gw1000.py b/bin/user/gw1000.py index f5ef796..065b110 100755 --- a/bin/user/gw1000.py +++ b/bin/user/gw1000.py @@ -968,8 +968,6 @@ def __init__(self, **gw_config): # whether to log an available firmware update log_fw_update_avail = weeutil.weeutil.tobool(gw_config.get('log_firmware_update_avail', False)) - # get device specific debug settings - self.debug = DebugOptions(gw_config) # log our config/settings that are not being pushed further down before # we obtain a GatewayCollector object, obtaining a gatewayCollector @@ -1379,6 +1377,9 @@ def __init__(self, engine, config_dict): # an extended lost contact period self.lost_contact_log_period = int(gw_config_dict.get('lost_contact_log_period', default_lost_contact_log_period)) + # get device specific debug settings + self.debug = DebugOptions(gw_config_dict) + if self.debug.any or weewx.debug > 0: loginf(" max age of API data to be used is %d seconds" % self.max_age) # The field map. Field map dict output will be in unsorted key order. @@ -2304,6 +2305,8 @@ def __init__(self, **stn_dict): # log our version number loginf('GatewayDriver: version is %s' % DRIVER_VERSION) + # get device specific debug settings + self.debug = DebugOptions(stn_dict) # now initialize my superclasses super(GatewayDriver, self).__init__(**stn_dict) # start the Gw1000Collector in its own thread @@ -2943,6 +2946,7 @@ class ApiParser(object): b'\x12': ('decode_big_rain', 4, 't_rainmonth'), b'\x13': ('decode_big_rain', 4, 't_rainyear'), b'\x7A': ('decode_int', 1, 'rain_priority'), + # TODO. Should this be 'temp_comp' or 'rain_comp' b'\x7B': ('decode_int', 1, 'temp_comp'), b'\x80': ('decode_rainrate', 2, 'p_rainrate'), b'\x81': ('decode_rain', 2, 'p_rainevent'), @@ -3789,6 +3793,8 @@ def parse_read_firmware_version(response): 6+f checksum byte LSB of the sum of the command, size and data bytes + + Returns a unicode string """ # create a format string so the firmware string can be unpacked into @@ -5203,6 +5209,8 @@ def get_firmware_version(self): been raised by send_cmd_with_retries() which will be passed through by get_firmware_version(). Any code calling get_firmware_version() should be prepared to handle this exception. + + Returns a unicode string """ # get the validated API response