Hi,
I'm using WeeWx V4.4.1 and MySQL V8.0.20 with a Davis Vantage Pro 2 and
have an RPi measuring my roof space Temp and Humidity and am planning to
store the data in extraTemp1 and extraHumid1.
I've successfully created a data_service and am simply writing static
values initially as a test. extraHumid1 works (I get the same value I put
in out the end) but when I set extraTemp1 I'm getting strange values when
viewed in MySQL Workbench. 40 becomes 4.4', 50 = 10. 60 = 15.5', 70 =
21.1', numbers around 30 and below become negatives. But I am yet to see a
pattern or find a reason why. extraTemp2 does the same thing (haven't
tested any other fields, and they all appear to be typed "double").
My code is below and any help would be greatly appreciated. I've checked
and there are no StdCalibrate entries in my configuration.
Thanks,
Glenn.
import syslog
import weewx
from weewx.engine import StdService
class AddRoof(StdService):
def __init__(self, engine, config_dict):
# Initialize my superclass first:
super(AddRoof, self).__init__(engine, config_dict)
# Bind to any new archive record events:
self.bind(weewx.NEW_ARCHIVE_RECORD, self.new_archive_record)
def new_archive_record(self, event):
roofTemp = float("50")
roofHumid = float("9.1")
event.record['extraTemp1'] = roofTemp
event.record['extraHumid1'] = roofHumid
syslog.syslog(syslog.LOG_INFO, "AddRoof: Temperature %s, Humidity %s" %
(roofTemp, roofHumid))
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/6cbbadfc-d1b8-4b3a-93b1-91578392df05n%40googlegroups.com.