I located an error in vantage.py. I do not know if this has been reported
but in setCalibrationHumid the "If" statement left out the "not" and the
results is that "offset" in the range of -100 to 100 is rejected as being
out of range when attempting to use "wee_device --set-offset". The
corrected code is below:
*def setCalibrationHumid(self, variable, offset):*
* """Set an on-board humidity calibration."""*
* # Offset is in percentage points.*
* if not -100 <= offset <= 100:*
* raise weewx.ViolatedPrecondition("Offset %d out of range
[-100, 100]." % offset)*
* byte = struct.pack("b", offset)*
* variable_dict = { 'inHumid': 0x44, 'outHumid': 0x45 }*
* for i in range(1, 8): variable_dict['extraHumid%d' % i] = 0x45 + i*
* if variable in variable_dict:*
* self.port.send_data(b"EEBWR %X 01\n" %
variable_dict[variable])*
* self.port.send_data_with_crc16(byte, max_tries=1)*
* else:*
* raise weewx.ViolatedPrecondition("Variable name %s not known"
% variable)*
* syslog.syslog(syslog.LOG_NOTICE, "vantage: Humidity calibration %s
set to %d" % (variable, offset))*
--
You received this message because you are subscribed to the Google Groups
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.