Search found 8 matches

by tonlof
Mon Oct 08, 2007 7:27 pm
Forum: Bwired Forum
Topic: The Bwired electricity monitor
Replies: 41
Views: 58149

The Bwired electricity monitor

Thanks Pieter.

I think I am close the total solution.
First check in the database if there is any record at this hour.
select * from energi where hour(datum) = hour(CURRENT_TIMESTAMP()) and day(datum) = day(CURRENT_TIMESTAMP())

/Tony
by tonlof
Mon Oct 08, 2007 12:46 am
Forum: Bwired Forum
Topic: The Bwired electricity monitor
Replies: 41
Views: 58149

The Bwired electricity monitor

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">I also log my energy once a minute, but I'm not adding a record every minute in the database. I create one record for ...
by tonlof
Sun Oct 07, 2007 9:25 pm
Forum: Bwired Forum
Topic: The Bwired electricity monitor
Replies: 41
Views: 58149

The Bwired electricity monitor

Now I get the right outputs:) Last day... SELECT CONCAT(DATE_FORMAT(datum, '%Y-%m-%d %H'),':00') AS tid, sum(watt) FROM energi WHERE datum >=date_sub(current_date(),interval 1 day) GROUP BY DATE_FORMAT(datum, '%Y-%m-%d %H') ORDER BY DATE_FORMAT(datum, '%Y-%m-%d %H') ASC; 1 Month back... SELECT DATE_...
by tonlof
Sat Oct 06, 2007 8:53 pm
Forum: Bwired Forum
Topic: The Bwired electricity monitor
Replies: 41
Views: 58149

The Bwired electricity monitor

I'm having the logging function okey now. Saving every minute. But I have some problem to read out correct data from mysql. I want to list hourly data of the power consume. I am trying "SELECT Date, sum(watt)/1000, DAYNAME(Date) FROM energie GROUP BY hour(Date) asc" It give me wrong result...
by tonlof
Wed Aug 08, 2007 8:46 pm
Forum: Bwired Forum
Topic: The Bwired electricity monitor
Replies: 41
Views: 58149

The Bwired electricity monitor

Thanks, I will compare it later when we have moved in into that house that have this digital powermeter. I just try to make the program in advance:) Later I will make a HomeSeer Plugin. Thanks for all great idéas.
by tonlof
Wed Aug 08, 2007 5:26 pm
Forum: Bwired Forum
Topic: The Bwired electricity monitor
Replies: 41
Views: 58149

The Bwired electricity monitor

Am I on right way or is there any better way to do it? Not sure if I miss one watt when every time when the counter reset. Dim latest As Integer = 0 Dim counter_value As Integer = 0 Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Kontrollera.Tick counter_v...
by tonlof
Wed Aug 08, 2007 1:37 am
Forum: Bwired Forum
Topic: The Bwired electricity monitor
Replies: 41
Views: 58149

The Bwired electricity monitor

Thanks Pieter, my brain was not with me;)
The solution was to easy...
/Tony
by tonlof
Wed Aug 08, 2007 12:55 am
Forum: Bwired Forum
Topic: The Bwired electricity monitor
Replies: 41
Views: 58149

The Bwired electricity monitor

Keep in mind that the 1-Wire TAI8585 only can count to 65535 before it resets to zero. As there are 480 flashes in 1 KWh the pulse counter will reset after counting 136KWh. I read the 1-Wire once every minute and store about 60 readings in one hour. Do you reset the counter every minute after stori...

Go to advanced search