AQUAHost - LCDHost & Aquasuite2013 for Noobz
First of all : Thanks to the work of Phatboy69 - its the same procedere but with a diffrent Template.
Basics
The XML Output of Aquasuite ist too detailed.
LCDHost can read this xml only with a complex Datamap.
Making Datamaps is Pain in The A**.
We have to change original XML to a more LCDHost prefered Layout.
For that we have to use a XML-transformer - called XSLT(ransfomation).
This "converting" has to be done in Batch - means all 5-10 sec.
The converted File has all Data and uses a simple Datamap (or none).
What you need
a XSL Processor. I tested a few but libXSLT has the lowest CPU_Utilisation (about 2%, saxon has 10%) when transforming.
a template-file for the XSL processor
Aquasuite2013 XML export
Files & Links
libXLST - ready to use (978kb)
the Template File (681b)
LCDHost Datamap File
Saxon @ sourceforge.net
libXSLT
How it works
0. Make a new Folder under LCDHost\layouts\ (
Layout-Folder).
1. In Aquasuite2013 activate XML-Export and put some data in the XML (Temp. Flow,...).
I suggest to set the Output to your
Layout-Folder and the Name should be for this HowTo
Aquasite2012
2. Download the
libXLST - ready to use (978kb) File and unrar to your
Layout-Folder!
3. Download
the Template File (681b) and unrar it to your
Layout-Folder.
4. TESTING
open a cmd window (C:\Windows\system32\cmd.exe), change directory to your
Layout-Folder and type:
|
Quellcode
|
1
|
xsltproc.exe template.xsl Aquasite2012.xml
|
if you get a output like this - all is fine - you can see the transformed data from As2013. If not restart @
1. :
5. create a new file in your
Layout-Folder called transform.bat (or anything you want). Put this code in the File :
|
Quellcode
|
1
2
3
4
|
:top
xsltproc.exe template.xsl Aquasite2012.xml -o output1.xml
timeout 10
goto top
|
xsltproc.exe = the xsl processor
template.xsl = the template-file
Aquasite2012.xml = the file where Aquasuite stores the Data
-o output1.xml = the new transformed XML-File for LCDHost - you can choose also other names
timeout 10 = wait 10 sec.
goto top = repeat from top
When started, this Batchfile will repeat all 10 seconds the transformation of the As2012 File to output1.xml. Please keep in mind that this cost CPU-Time and Utilisation. My first test i started with the saxon processor and all 10 sec. my CPU utilisation rise up to 13%-15%. Not really good when running with you Squad trough Teheran and searching the Sniper to knife him (BF3 Gamer). XSLTproc is better - only 1% to 2% CPU utilisation.
6. Doubleclick the Batch-file in explorer, a cmd-window pops up and the batch starts to work.
Each 10 sec it transform/overwrite the output1.xml with the newest Data.
The cmd-windows must be open! Closing means stopping the transformation (CTRL-C stops also).
7. unrar the
LCDHost Datamap File to your
Layout-Folder.
8. Create a new Layout in LCDHost.
place a dataconnector on the Layout (Dynamic->Dataviewer->Data Connector)
Datamap is "aquero.datamap.txt"
Data Source is "output1.xml"
9. Finaly .. now you can use all Dataviewer-components to show Aquasuite Data.
Open the output1.xml in a Editor, copy the desired name of the Value:
|
Quellcode
|
1
2
3
4
5
6
7
8
9
10
11
12
|
<logdata><Date>2013-04-07</Date><Time>02:59:10.423</Time>
<Sensor1>26.25</Sensor1>
<Sensor2>45.45</Sensor2>
<aquaeroCPU>28.7</aquaeroCPU>
<Flow1>158.2</Flow1>
<Flow2>148.6</Flow2>
<Fan2>876</Fan2>
<Fan3>873</Fan3>
<Fan4>958</Fan4>
<FullstandinP>80</FullstandinP>
<Wassertemperatur>29.16</Wassertemperatur>
</logdata>
|
Now use a Data Text Element in LCDHost, and put the copied Name in {} under Data Template. Example: {Sensor1}
Repeat with all Values.
10. The Batchfile (transform.bat) has to be autostarted with Windows or manualy started by hand.
For Autostart you have to use the Windows TaskScheduler:
1. First run task scheduler (just type task scheduler on the windows 8 start screen and press enter and it should start)
2. Create a new task (right click "new task")
3. Change it to a system run task (click "change user or group" and type "System" under the object name and press enter)
4. Check the "Hidden" check box
5. Give the task a name such as XML batch
6. Set a New Trigger as "At System Startup" and make sure the enable check box is ticked (click the "trigger" tab and click "new" then choose the "at system startup" drop box
7. Set the action to start the xml.bat file (click "actions" tab and "new" button then choose "start a program" and browse to where the batch file is saved
8. Finally click on the "OK" button to save and finish.
9. You can now right click it to run it manually. Next time your system starts it should start automatically.
Bugs:
Sometimes LCDHost need a restart when working with Dataviewer. Try also save & reload the Layout.
ToDo´s
-Optimisation- Batch run minimized
-Optimisation- Batch runs on low priority to aviod conflicts with Games (lags) on smaller PC´s