Welcome to the new home of the Cumulus Support forum.

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3044 7 December 2018. See the Wiki for download

help

Discussion of version 3 of Cumulus, which runs on Windows, Linux, and OS X. All Cumulus MX queries in here, please.

Moderator: mcrossley

Post Reply
User avatar
dazza1223
Posts: 428
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Vue
Operating System: raspberry pi 3 +
Location: worthing
Contact:

help

Post by dazza1223 » Sun 04 Feb 2018 9:49 pm

hey i dont understand how lto to set the time on them <#RecentTS <#RecentOutsideTemp
have fun and keep learning

dazza :D

User avatar
mcrossley
Posts: 5234
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: help

Post by mcrossley » Mon 12 Feb 2018 7:13 pm

The Wiki seems pretty clear?
... giving data values from 1 minute ago, up to 1 week ago, in 1 minute intervals.
...
For example, <#RecentOutsideTemp m=1> will give the temperature one minute ago, <#RecentOutsideTemp h=1> will give the temperature one hour ago (as will <#RecentOutsideTemp m=60>), and <#RecentOutsideTemp d=1> will give the temperature one day ago. <#RecentOutsideTemp d=1 h=1 m=1> will give the temperature one day, one hour and one minute ago. All values supplied for parameters must be whole numbers.

User avatar
dazza1223
Posts: 428
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Vue
Operating System: raspberry pi 3 +
Location: worthing
Contact:

Re: help

Post by dazza1223 » Mon 12 Feb 2018 11:16 pm

yh i tried it and all im getting is not the right times im setting it to
have fun and keep learning

dazza :D

water01
Posts: 1487
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: WH1081
Operating System: Windows 7 64bit HP SP1
Location: Somewhere in the USA
Contact:

Re: help

Post by water01 » Mon 12 Feb 2018 11:53 pm

If you posted your settings and what you are expecting it might help as at the moment no one has the slightest clue what you are trying to do.

User avatar
dazza1223
Posts: 428
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Vue
Operating System: raspberry pi 3 +
Location: worthing
Contact:

Re: help

Post by dazza1223 » Tue 13 Feb 2018 12:28 am

so im trying to add Sparklines line but when i hover over the chrat

i want to to show

Temp in the period 14:37 to 23:34
11.2 °C

Is there a way to show the actual time of each recent data point?

ie


[<#RecentOutsideTemp h=0 m=61>,<#RecentOutsideTemp h=0 m=56>,<#RecentOutsideTemp h=0 m=51>,<#RecentOutsideTemp h=0 m=46>,
<#RecentOutsideTemp h=0 m=41>,<#RecentOutsideTemp h=0 m=36>,<#RecentOutsideTemp h=0 m=31>,<#RecentOutsideTemp h=0 m=26>,
<#RecentOutsideTemp h=0 m=21>,<#RecentOutsideTemp h=0 m=16>,<#RecentOutsideTemp h=0 m=11>,<#RecentOutsideTemp h=0 m=6>];


i haven't got a page yet as im trying to get me heard around this

i made a temp page

http://www.davisworthing.co.uk/new/one.php
have fun and keep learning

dazza :D

User avatar
beteljuice
Posts: 2516
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: help

Post by beteljuice » Tue 13 Feb 2018 1:39 am

As far as I can see your values ARE been populated in your code:

Code: Select all

   /* <![CDATA[ */
   $(function() {
      /* temperature sparkline() function */
      var recent_outside_temp = [5.8,5.7,5.7,5.7,
                        5.7,5.7,5.6,5.6,
                        5.6,5.6,5.6,5.6];
      $('.temperature').sparkline(recent_outside_temp, {
         type: "line",
         tooltipSuffix: " &#176;C",
         width: 60,
         tooltipChartTitle: 'Temperatures in the period<br/>12:32 to 01:27'
      });

   // Insert a second/subsequent sparkline function here

   });
   /* ]]> */
... but only 'the last man standing' is being displayed. That suggests there is something not right for the sparkline / tooltip code.
Image
......................Imagine, what you will KNOW tomorrow !

sfws
Posts: 462
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Customised mix of Fine Offset
Operating System: Tempermental Win. 10 PC
Location: UK

Re: help

Post by sfws » Tue 13 Feb 2018 8:14 am

dazza1223 wrote:Is there a way to show the actual time of each recent data point?
As Mark says, is the Wiki not clear enough?
<#RecentTS> Takes parameters like the 'recent data' web tags (e.g. <#RecentOutsideTemp>) and gives the timestamp of the data that will be returned for those web tags with the supplied parameters (it may not have the data for the exact time specified). Format can be specified in the usual way with the 'format' parameter.

User avatar
dazza1223
Posts: 428
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Vue
Operating System: raspberry pi 3 +
Location: worthing
Contact:

Re: help

Post by dazza1223 » Tue 13 Feb 2018 9:59 am

ok i will carry on reading lol thanks guys
have fun and keep learning

dazza :D

User avatar
beteljuice
Posts: 2516
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

Re: help

Post by beteljuice » Tue 13 Feb 2018 10:38 am

Afterthought - excuse the old beteljuice ignorance, but aren't sparklines some sort of graph ?
In which case no y-axis (timeline) has been defined !
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
dazza1223
Posts: 428
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Vue
Operating System: raspberry pi 3 +
Location: worthing
Contact:

Re: help

Post by dazza1223 » Tue 13 Feb 2018 11:13 am

yh it is mate and ive seen on some one site that when u hover over it it will show u the right time not like this

tooltipChartTitle: 'Temperatures in the period<br/><#RecentTS h=0 m=61 format=hh:mm> to <#RecentTS h=0 m=6


ie

10.54
13.c
11.15
12c
12.15
9c
and so on
have fun and keep learning

dazza :D

User avatar
jdc
Posts: 135
Joined: Tue 19 Jun 2012 8:51 pm
Weather Station: Davis VP2 : Instromet
Operating System: Win 10 : Win XP
Location: Berwick-upon-Tweed, England.
Contact:

Re: help

Post by jdc » Tue 13 Feb 2018 11:34 am

To get that effect (and I have no idea if this is the 'best' way to do it) I created two sets of variables using webtags

Code: Select all

<!-- Temp -->
var temp = [2.1,1.8,1.3,1.2,1.5,2,2,2.2,2,2,2.2,2.5,2.3];
var temptime = ['05.15','05.45','06.15','06.45','07.15','07.45','08.15','08.45','09.15','09.45','10.15','10.45','11.15'];
Then I basically superimposed two graphs, one for 'temp' and one for 'time'.
The time graph is completely the background colour ('#bed8bf')

Code: Select all

$(function() {
      	   $('.temp').sparkline(temptime, {
    		type: 'line',
    		lineColor: '#bed8bf',
    		fillColor: '#bed8bf',
    		spotColor: '#bed8bf',
    		minSpotColor: '#bed8bf',
    		maxSpotColor: '#bed8bf',
			numberFormatter: function(y) {return (('0000'+(y.toFixed(2))).slice (-5));},
            width: 60,
			tooltipClassname: 'spark',
			tooltipPrefix: 'Time: ',
			tooltipFormat:'<span style="color: {{color}}"></span> {{prefix}}{{y}}{{suffix}}',
			tooltipChartTitle: 'Temperature Today.'
      });
      	$('.temp').sparkline(temp, {
			composite: true,
	        type: 'line',
    		lineColor: '#008000',
    		fillColor: '#bed8bf',
    		spotColor: '#00007f',
    		minSpotColor: '#007fff',
    		maxSpotColor: '#ff0000',
			tooltipClassname: 'spark',
			tooltipFormat:'<span style="color: {{color}}"></span>{{prefix}}{{y}}{{suffix}}',
			tooltipPrefix: 'Temp: ',
            tooltipSuffix: " &deg;C",
            width: 60
      });
   });
The Sparkline website is very helpful.
https://omnipotent.net/jquery.sparkline/#s-docs

User avatar
dazza1223
Posts: 428
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Vue
Operating System: raspberry pi 3 +
Location: worthing
Contact:

Re: help

Post by dazza1223 » Tue 13 Feb 2018 12:03 pm

var temptime = ['05.15','05.45','06.15','06.45','07.15','07.45','08.15','08.45','09.15','09.45','10.15','10.45','11.15'];.......... so like this yh??
[<#RecentOutsideTemp h=5 m=15>
<#RecentOutsideTemp h=5 m=45>
[<#RecentOutsideTemp h=6 m=15>
[<#RecentOutsideTemp h=6 m=45>
[<#RecentOutsideTemp h=7 m=15>
[<#RecentOutsideTemp h=7 m=45>
[<#RecentOutsideTemp h=8 m=15>

and so yh plz say im right :bash:
have fun and keep learning

dazza :D

User avatar
jdc
Posts: 135
Joined: Tue 19 Jun 2012 8:51 pm
Weather Station: Davis VP2 : Instromet
Operating System: Win 10 : Win XP
Location: Berwick-upon-Tweed, England.
Contact:

Re: help

Post by jdc » Tue 13 Feb 2018 12:57 pm

I'm using php webtags so here is a section of how I did it:

Code: Select all

$temp0	  			  ="<#RecentOutsideTemp h=0 m=0>";
$temptime0			  ="<#RecentTS h=0 m=0 format=HH.mm>";
$temp1	  			  ="<#RecentOutsideTemp h=0 m=30>";
$temptime1			  ="<#RecentTS m=30 format=HH.mm>";
$temp2	  			  ="<#RecentOutsideTemp h=1>";
$temptime2			  ="<#RecentTS h=1 format=HH.mm>";
$temp3	  			  ="<#RecentOutsideTemp h=1 m=30>";
$temptime3			  ="<#RecentTS h=1 m=30 format=HH.mm>";
$temp4	  			  ="<#RecentOutsideTemp h=2>";
$temptime4			  ="<#RecentTS h=2 format=HH.mm>";
$temp5	  			  ="<#RecentOutsideTemp h=2 m=30>";
$temptime5			  ="<#RecentTS h=2 m=30 format=HH.mm>";
HTH

User avatar
dazza1223
Posts: 428
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Vue
Operating System: raspberry pi 3 +
Location: worthing
Contact:

Re: help

Post by dazza1223 » Tue 13 Feb 2018 1:01 pm

ok thank u so much i will give it a try later mate and i will let u know ok !
have fun and keep learning

dazza :D

User avatar
dazza1223
Posts: 428
Joined: Sun 25 Jan 2015 8:41 pm
Weather Station: Davis Vantage Vue
Operating System: raspberry pi 3 +
Location: worthing
Contact:

Re: help

Post by dazza1223 » Wed 14 Feb 2018 10:21 am

hy just want to say a big thank to u all helping me and even a bigher thank to jdc for showing me the php file and puting me on the right tracks


jdc,beteljuice,sfws,water01,mcrossley
have fun and keep learning

dazza :D

Post Reply