• 25.06.2024, 13:13
  • Registrieren
  • Anmelden
  • Sie sind nicht angemeldet.

 

Lieber Besucher, herzlich willkommen bei: Aqua Computer Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

micpt

Junior Member

AQUAHost - LCDHost & Aquasuite2013 for Noobz

Sonntag, 7. April 2013, 15:14

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


Zitat von »Legend«

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:

Zitat

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

micpt

Junior Member

Sonntag, 14. April 2013, 00:21

Update


New template.xsl


[URL=http://depositfiles.com/files/fr6dwcwnt[/URL]


Changes the Outpu to (more complex Tags) :

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<logdata>
    <Date>2013-04-13</Date>
    <Time>20:48:29.411</Time>
    <Sensor1temperature>24.02</Sensor1_temperature>
    <Sensor2temperature>45.97</Sensor2_temperature>
    <aquaeroCPUtemperature>31.41</aquaeroCPU_temperature>
    <Flow1flow>158.9</Flow1_flow>
    <Flow2flow>146.7</Flow2_flow>
    <Fan2rpm>882</Fan2_rpm>
    <Fan3rpm>898</Fan3_rpm>
    <Fan4rpm>870</Fan4_rpm>
    <FullstandinPpercent>80</FullstandinP_percent>
    <Wassertemperaturtemperature>25.48</Wassertemperatur_temperature>
    <Pumpefrequency>88.079859072225489</Pumpe_frequency>
    <Pumpevoltage>12.163934426229508</Pumpe_voltage>
    <Pumpecurrent>0.584</Pumpe_current>
    <Pumperpm>5284.79154433353</Pumpe_rpm>
  </logdata>

Dieser Beitrag wurde bereits 3 mal editiert, zuletzt von »micpt« (14. April 2013, 01:59)

Montag, 18. November 2013, 23:14

That was a great job, my friend, but the links are broken

Could you please reupload them?

micpt

Junior Member

Sonntag, 24. November 2013, 00:16

hi there - sorry for the delay - wasnt here long time - check my last post (24/11/2013) Link to Thread for Files.

regards

P.S. Link fixed

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »micpt« (24. November 2013, 15:00)

Sonntag, 24. November 2013, 08:29

Ohhh, thank you very much, my friend! Link broken, but i can do Copy/paste.