Senin, 08 Desember 2014

Bristol Digest, Vol 580, Issue 1

Send Bristol mailing list submissions to
bristol@mailman.lug.org.uk

To subscribe or unsubscribe via the World Wide Web, visit
https://mailman.lug.org.uk/mailman/listinfo/bristol
or, via email, send a message with subject or body 'help' to
bristol-request@mailman.lug.org.uk

You can reach the person managing the list at
bristol-owner@mailman.lug.org.uk

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Bristol digest..."


Today's Topics:

1. Re: DyGraph on a Pi (Chris)


----------------------------------------------------------------------

Message: 1
Date: Sun, 07 Dec 2014 16:16:16 +0000
From: Chris <cshorler@googlemail.com>
To: Bristol and Bath Linux User Group <bristol@mailman.lug.org.uk>,
Peter Hemmings <peter@hemmings.eclipse.co.uk>
Subject: Re: [bristol] DyGraph on a Pi
Message-ID: <2FCED89C-8503-4C12-8E70-05BF4A01604B@googlemail.com>
Content-Type: text/plain; charset=UTF-8

On 6 December 2014 23:21:39 GMT+00:00, Peter Hemmings <peter@hemmings.eclipse.co.uk> wrote:
>Hi,
>
>I have not got up to displaying graph on a local webpage (DHT11 sensor)
>
>using the information:
>
>https://chrisbaume.wordpress.com/2013/02/10/beer-monitoring/
>
>I have installed apache2, and DyGraph. A cron job is running OK with
>O/P's going to a temp.log in my home directory.
>
>Checked I have dygraph-combined.js in /var/www/.
>
>I have made a symlink to it from /var/www/ and checked that works
>works
>OK but get the following on the webpage (and temp.html):
>
> ? ? function? addZero(num) ? ? { ? ? ? ? var? s=num+"";
>? ? ? ? if? (s.length? <? 2)? s="0"+s; ? ? ? ? return? s; ? ? }
>? ? function? dateFormat(indate) ? ? {
>? ? ? ? var? hh? =? addZero(indate.getHours());
>? ? ? ? var? MM? =? addZero(indate.getMinutes());
>? ? ? ? //var? ss? =? addZero(indate.getSeconds());
>? ? ? ? var? dd? =? addZero(indate.getDate());
>? ? ? ? var? mm? =? addZero(indate.getMonth()+1);
>? ? ? ? var? yyyy? =? addZero(indate.getFullYear());
>? ? ? ? return? dd+'/'+mm+'? '+hh+':'+MM; ? ? } ? ? g? =? new? Dygraph(
>
>? ? ? ? document.getElementById("graphdiv"), ? ? ? ? "temp.log",
>? ? ? ? { ? ? ? ? ? ? xValueParser:? function(x)? {
>? ? ? ? ? ? ? ? var? date? =? new? Date(x.replace(
>? ? ? ? ? ? ? ? ? ? /^(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/,
>? ? ? ? ? ? ? ? ? ? '$4:$5:$6? $2/$3/$1' ? ? ? ? ? ? ? ? ));
>? ? ? ? ? ? ? ? return? date.getTime(); ? ? ? ? ? ? },
>? ? ? ? ? ? axes:? { ? ? ? ? ? ? ? ? x:? {
>? ? ? ? ? ? ? ? ? ? ticker:? Dygraph.dateTicker,
>? ? ? ? ? ? ? ? ? ? axisLabelFormatter:? function(x)? {
>? ? ? ? ? ? ? ? ? ? ? ? return? dateFormat(new? Date(x));
>? ? ? ? ? ? ? ? ? ? },
>? ? ? ? ? ? ? ? ? ? valueFormatter:? function(x)? {
>? ? ? ? ? ? ? ? ? ? ? ? return? dateFormat(new? Date(x));
>? ? ? ? ? ? ? ? ? ? } ? ? ? ? ? ? ? ? } ? ? ? ? ? ? },
>? ? ? ? ? ? labelsDivWidth:? 310, ? ? ? ? ? ? rollPeriod:? 30,
>? ? ? ? ? ? strokeWidth:? 2.0,
>? ? ? ? ? ? labels:? ['Date','Humidity? (%)','Temp? (?C)'] ? ? ? ? } ?
>? );
>
>This is just the code with lots of A circumflex's, what have I
>forgotten to do or is not mentioned in the instructions!?
>
>Could it be due to me cutting and pasting again!?
>

I'd say so.


>Will have another play tomorrow, but can now use it to monitor my
>loft.
>
>Regards





------------------------------

_______________________________________________
Bristol mailing list
Bristol@mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/bristol

End of Bristol Digest, Vol 580, Issue 1
***************************************

Tidak ada komentar:

Posting Komentar