Re: [weewx-user] Simplest method to read in an external data element and apply it to an existing Archive type

2020-04-13 Thread Thomas Keffer
I see. The schema is only used when the database is *created*. So, if you're using an existing database, it doesn't matter what you put there. If you do not have an existing database, then it will be used. However, because you're using a type that's already in the wview schema, leafTemp1, then

Re: [weewx-user] Simplest method to read in an external data element and apply it to an existing Archive type

2020-04-13 Thread Messy Potamia
I didn't have any problem reading the data in via my existing python code (although I suspect your sample may be cleaner, I'll try that too). What I was concerned with is the schema *** = schema *** + schema ***. Since I'm not extending this schema, I commented out that line. Added the

Re: [weewx-user] Simplest method to read in an external data element and apply it to an existing Archive type

2020-04-13 Thread Thomas Keffer
You want something like: with open('/path/to/file') as f: value = f.readline().strip() event.record['leafTemp1'] = float(value) if value != '' else None Or, use filepile , although that would require you to change the format of your data

[weewx-user] Simplest method to read in an external data element and apply it to an existing Archive type

2020-04-13 Thread Messy Potamia
I want to read in a single %2.2f from a file "special.dat" and store it in something I'll never otherwise use, "leafTemp1". My weewx is 3.6.2. I have read the suggestion to use a 2nd database, however I do not want to do that. I have written a custom .py before to read data from a 2-element