Replace sensor in _DASHBOARD

Discussion about generation of graphs and tables
Post Reply
gand
Posts: 12
Joined: Sat Apr 25, 2015 5:20 pm

Replace sensor in _DASHBOARD

Post by gand » Tue Apr 28, 2015 2:51 pm

Hi
I'm trying to define a new template using sensor t1 in the _DASHBOARD template. In Define Chart I have this:

template=http://www.meteoplug.com/dashboard.html
??
??
?

The question is the syntax for replacing th* with t1. I have have read the Define Chart WiKi, but it is still unclear to me, how to do this.

Thanks for your help.

Rgds
Gert

User avatar
admin
Site Admin
Posts: 332
Joined: Sun Feb 07, 2010 9:22 pm

Re: Replace sensor in _DASHBOARD

Post by admin » Thu Apr 30, 2015 4:58 pm

When you inspect dashboard.html you see that it calls "*t" graphic definition
for temperature graphs. So you have to change the "*t" chart definition
with your define chart function on Meteoplug server by replacing "th0"
by "t1". As it is just a pure temp sensor (t1) and not a temp-hum sensor (th0)
hum and dew lines need to be deleted.

gand
Posts: 12
Joined: Sat Apr 25, 2015 5:20 pm

Re: Replace sensor in _DASHBOARD

Post by gand » Thu Apr 30, 2015 7:41 pm

Hi

Is it possible you could help me a little bit more. I can find anything in the WiKI how to replace the th* with t1. In the Define Chart I have:

Template=http://www.meteoplug.com/dashboard.html
[actual_t1]

But that does not work.

Is it possible you could write the next line in order to replace th* with t1.

Thanks a lot

gand
Posts: 12
Joined: Sat Apr 25, 2015 5:20 pm

Re: Replace sensor in _DASHBOARD

Post by gand » Thu Apr 30, 2015 9:34 pm

Hi

If I look into the source of _DASHBOARD, I can't find any references to any sensors. What I'm missing?

Rgds
Gert

User avatar
admin
Site Admin
Posts: 332
Joined: Sun Feb 07, 2010 9:22 pm

Re: Replace sensor in _DASHBOARD

Post by admin » Mon May 04, 2015 12:24 am

Did you have a look at the "*t" chart definition, as I recommended?

My previous lines said everything you need. Did you inspect the referenced
"dashboard.html" file by looking at its source code? There you see
the "*t" reference.

gand
Posts: 12
Joined: Sat Apr 25, 2015 5:20 pm

Re: Replace sensor in _DASHBOARD

Post by gand » Mon May 04, 2015 3:07 am

Hi admin

I'm obviously looking at the wrong file. I have attached the file I'm looking at. Also the process of inspecting the file might be wrong. The steps:

1) From Meteoplug I go to Show Chart
2) Choose _DASHBOARD
3) Call Chart as URL
4) In the browser I choose View Source
5) Save the content with Notepad ++

Maybe you could explain the right process.

Sorry for these very basic questions, but I need to understand the process.

Rgds
Gert
Attachments
DASHBOARD.zip
DASHBOARD.html
(8.84 KiB) Downloaded 717 times

User avatar
admin
Site Admin
Posts: 332
Joined: Sun Feb 07, 2010 9:22 pm

Re: Replace sensor in _DASHBOARD

Post by admin » Sun May 10, 2015 7:43 am

you inserted the rendered dashboard.html, with the reference to your "t" charts already evaluated.

original dashboard.html:

Code: Select all

if (document.form1.gtype[0].checked)
        {
          if (document.form1.tscale[0].checked) { tfparm = "&timeframe=" + document.form1.dateday.value; resparm="&resolution=min5"; }
          if (document.form1.tscale[1].checked) { tfparm = "&timeframe=" + document.form1.dateweek.value; resparm="&resolution=min15"; }
          if (document.form1.tscale[2].checked) { tfparm = "&timeframe=" + document.form1.datemonth.value; resparm="&resolution=hour1"; }
          if (document.form1.tscale[3].checked) { tfparm = "&timeframe=" + document.form1.dateyear.value; resparm="&resolution=day1"; }
          frames['IFrameName'].location.href=baseURL + "?draw=[drawtoken_*t]&engine=[engine]" + tfparm + resparm;
        }
dashboard.html rendered for your account:

Code: Select all

if (document.form1.gtype[0].checked)
        {
          if (document.form1.tscale[0].checked) { tfparm = "&timeframe=" + document.form1.dateday.value; resparm="&resolution=min5"; }
          if (document.form1.tscale[1].checked) { tfparm = "&timeframe=" + document.form1.dateweek.value; resparm="&resolution=min15"; }
          if (document.form1.tscale[2].checked) { tfparm = "&timeframe=" + document.form1.datemonth.value; resparm="&resolution=hour1"; }
          if (document.form1.tscale[3].checked) { tfparm = "&timeframe=" + document.form1.dateyear.value; resparm="&resolution=day1"; }
          frames['IFrameName'].location.href=baseURL + "?draw=5a5d525f4b1a444b08050b0e&engine=" + tfparm + resparm;
        }
As you can see in the first snippet "*t" chart is called. Default "*t" chart definition looks like this:

Code: Select all

timeframe=1D    # set total time frame of today
zoom=MAX            # select actual day 

gtitle=Temp/Hum    # name of graph
gheight=450       # height in pixels of graph
gwidth=700         # width in pixels of graph
glunit=°C            # unit of left y-axis
grunit=%            # unit of right y-axis 
gtype=line          # type of graph
gtrim=0              

sid0=th* sname0=temp ssel0=temp      # sensor 0, temperature
sid1=th* sname1=dew ssel1=dew         # sensor 1, dew point
sid2=th* syaxis2=r  sname2=hum ssel2=hum   # sensor 2, humidity
# sid3=wind* sname3=chill ssel3=chill
# sid4=th* sname4=heat ssel4=heat
"th*" advises to use the primary th sensor (the one also defined for being used for
weather network sending"). You can change that to "th1" and store "*t" definition
for your account.

Code: Select all

timeframe=1D    # set total time frame of today
zoom=MAX            # select actual day 

gtitle=Temp/Hum    # name of graph
gheight=450       # height in pixels of graph
gwidth=700         # width in pixels of graph
glunit=°C            # unit of left y-axis
grunit=%            # unit of right y-axis 
gtype=line          # type of graph
gtrim=0              

sid0=th1 sname0=temp ssel0=temp      # sensor 0, temperature
sid1=th1 sname1=dew ssel1=dew         # sensor 1, dew point
sid2=th1 syaxis2=r  sname2=hum ssel2=hum   # sensor 2, humidity
# sid3=wind* sname3=chill ssel3=chill
# sid4=th1 sname4=heat ssel4=heat
As said some posts ago, just adapt your "*t" definition!

gand
Posts: 12
Joined: Sat Apr 25, 2015 5:20 pm

Re: Replace sensor in _DASHBOARD

Post by gand » Tue May 12, 2015 9:36 am

Hi

Thanks for trying to help me out here.

Now I have this in Define Chart:

template=http://www.meteoplug.com/dashboard.html
sid0_0=t1 ssmooth0_0=1 sname0_0=Temp scolor0_0=880000 sfill0_0=10 ssel0_0=temp
sid0_1=t1 ssmooth0_1=1 sname0_1=Temp_Max scolor0_1=FF0000 sline0_1=40 ssel0_1=tempmax
sid0_2=t1 ssmooth0_2=1 sname0_2=Temp_Min scolor0_2=8800FF sline0_2=40 ssel0_2=tempmin

But that did't not work either. I still have the values for for th* in my graphs.

Any ideas?

Rgds
Gert

gand
Posts: 12
Joined: Sat Apr 25, 2015 5:20 pm

Re: Replace sensor in _DASHBOARD

Post by gand » Wed Jun 17, 2015 5:29 pm

Hi

Yes, at last I found out, how to use the template and the different sensors.

Rgds
Gert

Post Reply