I have weewx (4.10.2) configured with the Davis Vantage 2 driver, and 
additionally the GW1000 gateway service provides values for some more 
temperature sensors.
Everything is working properly , and GW1000 temperature values (mapped as 
extraTempX) are recorded in the archive database and  appear in LOOP 
packets.

I am working on a new service, triggered by the NEW_ARCHIVE_RECORD event, 
 that needs to read the record values of the some of the extraTemp captured 
by the GW10000. 

In this exemple :

class MyService(StdService):
   def __init__(self, engine, config_dict):
     super(MyService self).__init__(engine, config_dict)
            manager_dict = 
weewx.manager.get_manager_dict_from_config(config_dict, 'wx_binding')
     self.db_manager = weewx.manager.open_manager(manager_dict)
self.bind(weewx.NEW_ARCHIVE_RECORD, self.newArchiveRecord)

  def newArchiveRecord(self, event):
if event.record.get('extraTemp5') is not None:
loginf("record extraTemp5 is : %f " % (event.record['extraTemp5']))
else:
loginf("no extraTemp5 in record" )
if event.record.get('OutTemp') is not None:
loginf("record OutTemp is : %f " % (event.record['outTemp']))
else:
loginf("no outTemp in record" )

When this new service is running, I have always in the log "no extraTemp5 
in record"  ( the outTemp value is correctly logged) , but ultimately the 
value of extraTemp5 is written in the archive table of the database. So at 
the time weewx triggers a NEW_ARCHIVE_RECORD event, there is no data coming 
from the GW1000 in the archive record.

Does it means that the archive values of the parameters coming from GW1000 
service, and presumably generated by weewx since the GW1000 service is 
generating LOOP packets only, are inserted in the archive record after the 
NEW_ARCHIVE_RECORD event is triggered?

in weewx.conf, the services are as follows :
data_services = user.gw1000.GatewayService
process_services = weewx.engine.StdConvert, weewx.engine.StdCalibrate, 
weewx.engine.StdQC, weewx.wxservices.StdWXCalculate, 
user.sunduration.SunshineDuration, user.myservice.MyService

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/99eadb93-8622-4663-b511-cb2477d5c4fen%40googlegroups.com.

Reply via email to