On Mon, Jan 23, 2017 at 3:20 PM, Louis De Lange <[email protected]> wrote:
> > 1. The meteotemplate database uses a type datetime primary key, rather > than unix epoch. I could not get addRecord to work in that circumstance so > I ended up using a getsql function to write the record to meteotemplate. > > One option would be to augment the record with the datetime object that Meteotemplate needs. Then dateTime just gets carried along for the ride. Or, maybe I'm misunderstanding your architecture. > 2. I had to add a usUnit column to the meteotemplate database because > weewx does a unit check and wont allow to post a new record unless the > usUnits column match. This is not a big deal, but is there a way around > that? In particular, the individual records in the meteotemplate database > can be any combination of units - which makes a single unit indicator > irrelevant, apart from making the database write possible > You could subclass Manager, overriding function _check_unit_system() so it does not do the check, or does some other check. > > 3. The standard db_manager = self.engine.db_binder.get_ > manager(data_binding='name_of_binding', initialize=True) function > insists on adding day summary tables, and when I set initialize to false > and delete the unnecessary tables it gives an error that the tables are > missing. Is there a way to eliminate the creation of the day summary > tables? > Yes. Use class Manager, rather than DaySummaryManager. Hope this helps. -tk -- 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.
