I could not find a build in way in metehub to upload data to http://www.pachube.com.
Did I miss the information? Is there a plan for this?
Upload to pachube
Moderator: Mattk
-
- Senior Boarder
- Posts: 44
- Joined: Sun Sep 25, 2011 7:48 pm
Re: Upload to pachube
Looks like nobody has a solution yet. Here is what I would propse and maybe you give me a feedback before I start implementing.
The goal is to produce an xml file accorinding to this style sheet http://www.eeml.org/ and send it to http://www.pachube.com feed. Pachube offers both push and pull.
The goal is to produce an xml file accorinding to this style sheet http://www.eeml.org/ and send it to http://www.pachube.com feed. Pachube offers both push and pull.
- As I could not find a configurable "http push" in meteohub I will use the ftp upload mechanism.
- Putting a html file at "/graphs/pachube-template.html"
- Graph Uploads selecting "pachube-template *" every 5 Minutes with the target filename "pachube.xml"
- Configuring my web-page for FTP in "Set up Push services"
- Configuring the pachube feed to fetch the "pachube.xml" file from my web-site
-
- Senior Boarder
- Posts: 44
- Joined: Sun Sep 25, 2011 7:48 pm
Re: Upload to pachube
Today I finished the above implementation. Below you find one template file for this feed https://pachube.com/feeds/2056:
I have one problem left. How to change the formatting of the date-time string and time-zone in meteohub to the pachube format? Here is one example:
has to become
Any ideas?
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_thb0_temp_c]</current_value>
</data>
<data id="1">
<current_value>[actual_th1_temp_c]</current_value>
</data>
<data id="6">
<current_value>[actual_t6_temp_c]</current_value>
</data>
<data id="7">
<current_value>[actual_thb0_hum_rel]</current_value>
</data>
<data id="8">
<current_value>[actual_th1_hum_rel]</current_value>
</data>
<data id="13">
<current_value>[actual_thb0_sealevel_hpa]</current_value>
</data>
<data id="14">
<current_value>[actual_wind0_speed_kmh]</current_value>
</data>
<data id="15">
<current_value>[actual_wind0_dir_deg]</current_value>
</data>
<data id="16">
<current_value>[hour1_rain0_total_mm]</current_value>
</data>
</environment>
</eeml>
Code: Select all
Meteohub: "20111223173934"
Code: Select all
Pachube: "2011-12-23T16:39:34.894650Z"
-
- Senior Boarder
- Posts: 44
- Joined: Sun Sep 25, 2011 7:48 pm
Re: Upload to pachube
Pachube can be triggered to send messages e.g. for twitter. Here is my first "debugging" event from my weather station. Really fun! Check out yourself at
https://twitter.com/#!/Stefferber
https://twitter.com/#!/Stefferber
Re: Upload to pachube
stefferber wrote: I have one problem left. How to change the formatting of the date-time string and time-zone in meteohub to the pachube format? Here is one example:
has to becomeCode: Select all
Meteohub: "20111223173934"
Any ideas?Code: Select all
Pachube: "2011-12-23T16:39:34.894650Z"
Code: Select all
[actual_date0_year_local]-[actual_date0_month_local]-[actual_date0_day_local]T[actual_date0_hour_local]:[actual_date0_min_local]:[actual_date0_sec_local].894650Z
-
- Senior Boarder
- Posts: 44
- Joined: Sun Sep 25, 2011 7:48 pm
Re: Upload to pachube
Thanks a lot "wfpost"! This explain my syntax question very well.
But leads to the next question: Which time is measured here?
The difference between t0 and t3 could be 12 Min!
But I want to have time t0 in this file. How do get this information?
But leads to the next question: Which time is measured here?
- Let's assume a sensor captures a value at time t0.
- The sensor transmitts data later to its console at time t1 (+ 2 min).
- The console sends data to meteohub at time t2 (+ 5 min).
- Meteohub publishes data to weather network at time t3 (+ 5 min).
The difference between t0 and t3 could be 12 Min!
But I want to have time t0 in this file. How do get this information?