Author Topic: Anyone using the XML driver?  (Read 754 times)

staze

  • Strong Breeze
  • ***
  • Posts: 215
    • CW9669
    • KORSPRIN10
    • Everybody Staze...
  • Station Details: Davis Vantage Vue, Weather Envoy, Meteobridge Nano SD, Mac Mini Server (2018)
Anyone using the XML driver?
« on: January 13, 2024, 09:19:26 PM »
Hi All,

I'm wanting to fire Weathercat back up, and feed it from my Meteobridge, which already is feeding loop data elsewhere... so was hoping to try to use the XML driver, but there's not much for documentation that I can see (all I see is the stuff on page 241 of the manual). Meteobridge's native XML is not formatted properly

<logger>
<TH date="20240113211655" id="th0" temp="-3.3" hum="96" dew="-3.8" lowbat="0"/>
<WIND date="20240113211721" id="wind0" dir="292" gust="0.0" wind="0.4" chill="-3.3" lowbat="0"/>
<RAIN date="20240113211715" id="rain0" rate="0.0" total="455.2" delta="0.0" lowbat="0"/>
<THB date="20240113211629" id="thb0" temp="22.7" hum="30" dew="4.2" press="984.7" seapress="1002.0" fc="2" lowbat="0"/>
<DATA date="20240113211700" id="data10" val="11.00" lowbat="0"/>
<DATA date="20240113211700" id="data11" val="569.79" lowbat="0"/>
<DATA date="20240113211700" id="data12" val="7.00" lowbat="0"/>
<DATA date="20240113211700" id="data13" val="48.00" lowbat="0"/>
<DATA date="20240113211700" id="data15" val="61.00" lowbat="0"/>
<DATA date="20240113211700" id="data16" val="1.00" lowbat="0"/>
</logger>

So was going to try to figure out a template, but was hoping someone had some actual examples rather than just blindly trying to figure it out.

Thanks!
"You mean, you'll put down your rock and I'll put down my sword and we'll try and kill each other like civilized people?"

elagache

  • Global Moderator
  • Storm
  • *****
  • Posts: 6494
    • DW3835
    • KCAORIND10
    • Canebas Weather
  • Station Details: Davis Vantage Pro-2, Mac mini (2018), macOS 10.14.3, WeatherCat 3
Would this thread be of help? (Re: Anyone using the XML driver?)
« Reply #1 on: January 13, 2024, 09:43:27 PM »
Dear staze and WeatherCat tinkerers,

I'm wanting to fire Weathercat back up, and feed it from my Meteobridge, which already is feeding loop data elsewhere... so was hoping to try to use the XML driver, but there's not much for documentation that I can see (all I see is the stuff on page 241 of the manual). Meteobridge's native XML is not formatted properly

Another WeatherCat user managed to get this to work properly if I remember correctly.  Is this thread the sort of information you are looking for?

https://athena.trixology.com/index.php?topic=3555.0

Edouard

staze

  • Strong Breeze
  • ***
  • Posts: 215
    • CW9669
    • KORSPRIN10
    • Everybody Staze...
  • Station Details: Davis Vantage Vue, Weather Envoy, Meteobridge Nano SD, Mac Mini Server (2018)
Re: Anyone using the XML driver?
« Reply #2 on: February 11, 2024, 08:38:02 PM »
Thank you! This helped. Though, I can't seem to get it to work... asking in other thread though!
"You mean, you'll put down your rock and I'll put down my sword and we'll try and kill each other like civilized people?"

iccb

  • Gentle Breeze
  • **
  • Posts: 71
    • S??tilanne Eurassa
  • Station Details: Mac Mini (late 2018), Davis Vantage Pro2
Re: Anyone using the XML driver?
« Reply #3 on: February 25, 2024, 02:17:43 PM »
These topics caught my attention...
Trying to get XML driver to work with my WeeWX controlled Davis Station...
I have done simple XML file to put real time data in XML format, but maybe the format is not right?
Here is to file: https://kauttua.net/rss.xml
I guess it's in rss format still, any hints anybody?

rpmik

  • Gentle Breeze
  • **
  • Posts: 22
    • F2476
    • KCAORLAN7
    • distortions.net
  • Station Details: Ambient WS-1401-IP w/Meteobridge. M2 Mac Studio.
Re: Anyone using the XML driver?
« Reply #4 on: February 25, 2024, 03:50:50 PM »
These topics caught my attention...
Trying to get XML driver to work with my WeeWX controlled Davis Station...
I have done simple XML file to put real time data in XML format, but maybe the format is not right?
Here is to file: https://kauttua.net/rss.xml
I guess it's in rss format still, any hints anybody?

I don't know the specifics behind the rss format, but that XML's <item> element, hypothetically, could throw things. I don't know how strict the WC's XML reader is. Otherwise the XML looks right.

As for data, I noticed your number localization uses commas instead of decimals. Perhaps WeatherCat isn't understanding the commas? If possible, for the data values it might be worth switching to decimals instead of commas.

iccb

  • Gentle Breeze
  • **
  • Posts: 71
    • S??tilanne Eurassa
  • Station Details: Mac Mini (late 2018), Davis Vantage Pro2
Re: Anyone using the XML driver?
« Reply #5 on: February 25, 2024, 04:30:41 PM »

I don't know the specifics behind the rss format, but that XML's <item> element, hypothetically, could throw things. I don't know how strict the WC's XML reader is. Otherwise the XML looks right.

As for data, I noticed your number localization uses commas instead of decimals. Perhaps WeatherCat isn't understanding the commas? If possible, for the data values it might be worth switching to decimals instead of commas.

The data format is told here: https://wiki.trixology.com/index.php?title=Release_Notes#V2.1.0_-_3rd_April_2015

Added a generic XML based station driver. This connects to your server via HTTP and expects to read the real time weather data as an XML document.
In the I.P. field of the Station Communications window in WeatherCat enter the URL to the document - typically something like myserver.com/my_weather.cgi?action=1
From the XML document received, the following keys will be decoded:
AirTemp_C, IntTemp_C, T1_C, T2_C, T3_C, T4_C - External, internal and 4 additional temperature sensors (°C)
RH, IntRH - External and internal relative humidity (0-100)
Solar - Solar radiation (W/M^2)
UVIndex
Barometer_hPa - barometer in hecto-pascals
WindSpeed_ms - windspeed in m/s
WindDirect_deg - wind direction in degrees
Rain_mm - rain in millimetres - can be accumulating rain or daily rain
The format of a data item in the document should be of the form:
<value>
<name>item name</name>
<data>item value</data>
</value>
for example:
<value>
<name>RH</name>
<data>52</data>
</value>
Notes:
1. The weather server is polled every 3 seconds.


but I really don't understand how this should work. There is reference for .cgi web page, and basic searching from web doesn't make me smarter with this..
I can modify the rss.xml file output and will try to change it decimals.