Hi
How can I add lines instead of overwriting the line, so I have lines for
each interval.
Gert
On Sunday, October 21, 2018 at 12:57:27 AM UTC+2, Herwig Diessner wrote:
>
> Thank you Thomas, that did the trick - working like a charm. Thank you
> again!
>
> Am Donnerstag, 18. Oktober 2018 02:36:35 UTC+2 schrieb Thomas Keffer:
>>
>> This is very easy to do in WeeWX. You certainly do not need to write SQL
>> statements.
>>
>> Create a file called mydata.txt.tmpl in the skins/Standard directory.
>> Inside it, put
>>
>> $current.dateTime.format("%Y-%m-%d
>> %H:%M:%S"):$current.barometer.mbar:$current.outTemp.degree_C
>>
>> In your skin configuration file, skin.conf, under the [[ToDate]] section,
>> include the template file name. It should look something like this:
>>
>> [[ToDate]]
>> # Reports that show statistics "to date", such as day-to-date,
>> # week-to-date, month-to-date, etc.
>> [[[mytemplate]]]
>> template = mydata.txt.tmpl
>>
>> [[[day]]]
>> template = index.html.tmpl
>>
>> ... (as before)
>>
>> When WeeWX runs it will fill out the template and put it in your HTML
>> directory.
>>
>> -tk
>>
>> On Wed, Oct 17, 2018 at 8:03 AM <[email protected]> wrote:
>>
>>>
>>>
>>> On Wednesday, October 17, 2018 at 8:40:55 AM UTC-4, Herwig Diessner
>>> wrote:
>>>>
>>>> Hello all,
>>>>
>>>> I need to export only 3 pieces of data from weewx into a file.
>>>> The file should contain a single line of text in the following format:
>>>> date;pressure;temperature
>>>>
>>>> The date is in the format "yyyy-MM-dd HH:mm:ss".
>>>> The pressure and temperature are expressed in hPa and °C, respectively
>>>>
>>>> I tried to use the CSV extension and succeeded in
>>>> - single line
>>>> - time-format
>>>>
>>>> However, all sensor data is exported and the delimiter is fixed to ,
>>>> instead of the required ;
>>>>
>>>> Is there any chance to succeed using the CSV extension (e.g. options to
>>>> define the delimiter as ; instead of , - and options which sensor data is
>>>> to be exported)?
>>>> Or do I need another extension, or is there even another way?
>>>>
>>>> My searches on "export" and "csv" didn't bring any clues.
>>>>
>>>> In case of interest, this is my use case:
>>>> I want to use temperature and pressure data to calculate "refraction"
>>>> data for astrophotography using a 10micron telescope mount.
>>>> This mount allows to calculate refraction data automatically if fed
>>>> with a text file with the specifications above.
>>>> Probably there are more users who might make use of this.
>>>>
>>>> Thank you for any hint,
>>>>
>>>> Herwig
>>>>
>>>
>>>
>>> The following mysql select statement gave me the results you wanted.
>>> 2016-02-21 19:10:24;29.92;52.34
>>> My database isn't metric but you can convert if necessary. If you use
>>> sqllite i'm sure someone will convert for you.
>>>
>>> select timestampadd(second, dateTime, '1970-01-01'),barometer,outTemp
>>> into outfile 'test.csv' fields terminated by ';' from archive limit 5;
>>>
>>> --
>>> 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.
>>>
>>
--
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/80047c9e-2f38-45e1-8f0d-150dfb3f0c94%40googlegroups.com.