ok now im confused (big time) here is my log file and looks like it should work so what is it looking for...
csv file = 78.1,20.0,26.5 log file says Mar 1 14:15:33 raspberrypi weewx[1706]: pond: found values of ['78.1', '20.0', '26.5\n'] Mar 1 14:15:33 raspberrypi weewx[1706]: engine: 2017-03-01 14:15:00 EST (1488395700) Archive value 'barometer' . outside limits (26.0, 32.5) Mar 1 14:15:33 raspberrypi weewx[1706]: engine: 2017-03-01 14:15:00 EST (1488395700) Archive value 'inHumidity' 8 outside limits (0.0, 100.0) Mar 1 14:15:33 raspberrypi weewx[1706]: engine: 2017-03-01 14:15:00 EST (1488395700) Archive value 'inTemp' 7 outside limits (10.0, 120.0) Mar 1 14:15:33 raspberrypi weewx[1706]: manager: added record 2017-03-01 14:15:00 EST (1488395700) to database 'weewx.sdb' pond.py cat pond.py import syslog import weewx from weewx.wxengine import StdService class PondService(StdService): def __init__(self, engine, config_dict): super(PondService, self).__init__(engine, config_dict) d = config_dict.get('PondService', {}) self.filename = d.get('filename', '/home/weewx/weewx362/SenseLog.csv') syslog.syslog(syslog.LOG_INFO, "pond: using %s" % self.filename) self.bind(weewx.NEW_ARCHIVE_RECORD, self.read_file) def read_file(self, event): try: with open(self.filename) as f: line = f.readline() values = line.split(',') syslog.syslog(syslog.LOG_DEBUG, "pond: found values of %s" % values) event.record['inTemp'] = line[0] event.record['inHumidity'] = line[1] event.record['barometer'] = line[2] except Exception, e: syslog.syslog(syslog.LOG_ERR, "pond: cannot read value: %s" % e) iv'e jugled values all around and cant find anything it likes so is it doing something to the data after it reads it in doesn't look like it thanks for any help... frank On Monday, February 27, 2017 at 7:37:26 PM UTC-5, Frank Johnson wrote: > > thanks Mathew your the best, and sorry guys i can't spell either... lol > the datetime is just there to make sure its getting updated each cycle... > thanks again > frank > > On Monday, February 27, 2017 at 6:02:24 PM UTC-5, Frank Johnson wrote: >> >> hi all: >> >> hope someone can point me in the right direction i have crated a csv >> file in raspberry pi reading data from the hat so im using the >> pond.py example but having problem reading multiple items my file just >> contains the data... >> ie >> 32.65,44.5,1015.6,2017-02-27 17:54:38.827595 >> so i need to read that in as >> inTemp (value) >> inHumidity (value) >> barameter (value) >> datetime (value) >> >> im adding this in to argument the SDR info to complete the site is this >> even the right approach ?? >> >> frank KF4CQ >> python newbe >> >> >> -- 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 weewx-user+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.