The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

RE: Sql help, for electronic meter reading


  • Subject: RE: Sql help, for electronic meter reading
  • From: "aashram" <groups@xxxxxxxxxxx>
  • Date: Tue, 29 Mar 2005 14:07:04 +0100


I dont have my meter on my premises
is there a meter that I can insert at my
consumer box which will do the readings ? a sort of sub-meter
maybe an electronic one ? does such a thing exist ?


________________________________

From: Paul Smith [mailto:ukha@xxxxxxx]
Sent: Tue 29/03/2005 14:06
To: ukha_d@xxxxxxx
Subject: RE: [ukha_d] Sql help, for electronic meter reading




Hi Aashram,


I've installed mysql 4.1.10a

I've got a light sensor stuck on the meter and an very simply VB app
that counts the changes on the carrier detect pin of a serial port. Once
a minute it dumps the count into a database table.

Regards,

Paul


-----Original Message-----
From: aashram [mailto:groups@xxxxxxx]
Sent: 29 March 2005 13:46
To: ukha_d@xxxxxxx
Subject: RE: [ukha_d] Sql help, for electronic meter reading


what DB are you using ?

you need to use "group by"
first truncating the minutes of the date.

how are you getting the readings into you DB out
of interest ?

________________________________

From: Paul Smith [mailto:ukha@xxxxxxx]
Sent: Tue 29/03/2005 13:36
To: ukha_d@xxxxxxx
Subject: [ukha_d] Sql help, for electronic meter reading




Hi Guys,



I'm new to SQL and have so far managed to get this far.
Before I get carried away can anyone tell me if there is a better way of
doing this.





SELECT Sum(reading) AS Reading FROM `electric` where Date between
'2005-03-29 12:00:00' and '2005-03-29 13:00:00'



Which returns a sum of the readings between 12:00 and 13:00 What I want
to get is a complete list for the last 24 hrs. so I think I need to
create 24 sql statements. But was wondering if there was a better way.





Regards,



Paul





Paul Smith



Tel:-  0871 425 1236



This email and any attachments may be confidential and/or privileged.
Everything is intended for use of the addressee only. If you receive
this message in error then you must not print it or pass it on to anyone
else or use the information it contains.  Please inform Phoenix
Technology UK  of the error by email or by telephoning (+44)(0)871 425
1236.  Please then delete all copies from your system.
If you are not the intended recipient then you must not use the
information in the message or attachments or allow anyone else to do so.
Phoenix Technology UK reserves the right to copy and intercept all email
and other data sent over its networks. Phoenix Technology UK cannot
guarantee that this message has reached you complete and/or virus free
and advises you to carry out appropriate virus checks.  The Company does
not accept any liability for any statements made which are clearly the
sender's own and not made on behalf of the Company.





[Non-text portions of this message have been removed]






UKHA_D Main Index | UKHA_D Thread Index | UKHA_D Home | Archives Home

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.