Hi,

If I understand you correctly you want WeeWX to produce an xml format file 
(as per the example given) for use with your home automation system. You 
have attempted to use the WeeWX csv service 
<https://github.com/weewx/weewx/wiki/csv> to generate such a file by 
configuring the csv service to produce a file name ending with .xml rather 
than .csv. If this is the case I suspect you will be doomed to failure 
without significant rewriting of the csv extension to meet you needs. The 
main problem is that the csv service simply creates a string of values 
separated by commas on a single line; it has not idea how to structure an 
xml file with xml tags. You could certainly use the csv service as a bare 
bones from which to create an xml service to suit your needs, but it will 
take a significant effort and python skills and you seem to indicate you do 
not have the skills.

I would go back a step and ask what is you real requirement? The csv 
service emits a file every loop packet or archive record. If you can live 
with an updated file being generated once per archive interval as opposed 
to each loop packet, then why not just create a new WeeWX report in a new 
or existing skin to produce the xml file? The xml example you give could be 
easily put together as a WeeWX report with just a few bits of text and some 
WeeWX tags. It will be much easier to do, will involve essentially no 
python skills and you can easily do it yourself - waiting for someone else 
to write an xml service to meet your specific needs might see you waiting a 
long time.

Gary

On Friday, 10 August 2018 05:52:54 UTC+10, jahfly1000 wrote:
>
> Hello,
> I'm trying to generate an xml file with the extension csv but is not in 
> the format that I want. I would like it to be in this form:
> Saisissez le code ic
> <current>
>  <lastupdate>2016-11-15 10:48:27</lastupdate>
>  <temperature>18.9</temperature>
>  <pressure>1001</pressure>
>  <humidity>87</humidity>
>  <dewpoint>11.4</dewpoint>
>  <windchill>18.9</windchill>
>  <wind>
>   <direction>288</direction>
>   <speed>0.4</speed>
>  </wind>
>  <gust>
>   <direction>125</direction>
>   <speed>0.6</speed>
>  </gust>
>  <rain>
>   <rainrate>0.26</rainrate>
>   <rain>0.00</rain>
>  </rain>
> </current>
> i...
>
>
> because I want to use it to be able to integrate it into my home 
> automation system.
> I also do not find the options to put it in overwrite and not have the date
>
> I just managed to install the extension and change the creation path of 
> the file in weewx.conf by putting .xml instead of .csv.
>
> sorry for my little skills
> thanks in advance
>

-- 
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.

Reply via email to