Data export of non-weather data

Discussion of the Meteohub software package

Moderator: Mattk

Post Reply
Mr_Tomtom
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: Fri Apr 13, 2012 11:25 pm

Data export of non-weather data

Post by Mr_Tomtom »

Hi

i export my weather data values with the WsWin function to import in a mysql-db. Thats works fine.

Now, i collect some other non-weather datas, e.g. current power consumtion, in data1-data20 values.

How can i export this values in a CSV-formatet file, that i can import in mysql-db?

Any ideas?

Regards
Thomas
stefferber
Senior Boarder
Senior Boarder
Posts: 44
Joined: Sun Sep 25, 2011 7:48 pm

Re: Data export of non-weather data

Post by stefferber »

This is no big difference between the different data types (weather or no weather) within meteohub. You just need to select the right data stream name. e.g. I push xml files this way. Store this file here /graphs/pachube-energy-template.html

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<eeml xmlns="http://www.eeml.org/xsd/0.5.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="0.5.1" xsi:schemaLocation="http://www.eeml.org/xsd/0.5.1 http://www.eeml.org/xsd/0.5.1/0.5.1.xsd">
  <environment>
    <data id="0">
      <current_value>[actual_data0_value_num]</current_value>
      <unit type="derivedSI" symbol="kW">kilo Watt</unit>
    </data>
    <data id="1">
      <current_value>[actual_data1_value_num]</current_value>
      <unit type="derivedSI" symbol="kWh">kilo Watt hour</unit>
    </data>
    <data id="2">
      <current_value>[actual_data5_value_num]</current_value>
      <unit type="derivedSI" symbol="kW">kilo Watt</unit>
    </data>
    <data id="3">
      <current_value>[actual_data7_value_num]</current_value>
      <unit type="derivedSI" symbol="kWh">kilo Watt hour</unit>
    </data>
    <data id="4">
      <current_value>[actual_data8_value_num]</current_value>
      <unit type="derivedSI" symbol="kW">kilo Watt</unit>
    </data>
    <data id="5">
      <current_value>[actual_data9_value_num]</current_value>
      <unit type="derivedSI" symbol="kWh">kilo Watt hour</unit>
    </data>
  </environment>
</eeml>

meteohub will replace the place holder like [actual_data_9_value_num] with the real value in the file /myweb/uploads/pachube-energy.xml

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<eeml xmlns="http://www.eeml.org/xsd/0.5.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="0.5.1" xsi:schemaLocation="http://www.eeml.org/xsd/0.5.1 http://www.eeml.org/xsd/0.5.1/0.5.1.xsd">
  <environment>
    <data id="0">
      <current_value>240.00</current_value>
      <unit type="derivedSI" symbol="kW">kilo Watt</unit>
    </data>
    <data id="1">
      <current_value>56.24</current_value>
      <unit type="derivedSI" symbol="kWh">kilo Watt hour</unit>
    </data>
    <data id="2">
      <current_value>0.00</current_value>
      <unit type="derivedSI" symbol="kW">kilo Watt</unit>
    </data>
    <data id="3">
      <current_value>11506.79</current_value>
      <unit type="derivedSI" symbol="kWh">kilo Watt hour</unit>
    </data>
    <data id="4">
      <current_value>50.00</current_value>
      <unit type="derivedSI" symbol="kW">kilo Watt</unit>
    </data>
    <data id="5">
      <current_value>851.97</current_value>
      <unit type="derivedSI" symbol="kWh">kilo Watt hour</unit>
    </data>
  </environment>
</eeml>
In order to tell meteohub this you need to specify the template, timing, and output file in the meteohub "graph uploads" menu.

As I do not use the .csv export I don't know the details. But it cannot be that different.
Post Reply