Everybody Staze...

Nobody leavz...

  • Home
  • About Me
    • LinkedIn
    • Lab
  • Contact
  • Links
  • Reviews
  • Sitemap
  • Weather
You are here: Home / Archives for TED

First Google Visualizations API usage

2009/05/07 By staze

So, I finally did some basic Google Visualization stuff. On the sidebar, for my energy usage, you can now see a link for usage history. This will open a new window that shows daily KWH usage for my house. It’s an annotated timeline, though I’m not currently doing annotations.

It’s pretty simple, about 40 lines total, of which, 15 or so are php. Nothing too special. You’ll also find a link on that page to the “RAW” data, in all it’s “glory”.

More to post later, but for now, it’s all I got.

Here’s the page I used for how to structure the java output from php to make it work: http://code.google.com/apis/visualization/documentation/gallery/annotatedtimeline.html

Take care!

Filed Under: Coding, Energy Tagged With: API, google, KWH, PHP, TED, visualizations

Projects ahead…

2009/04/29 By staze

This weekend, Tara’s family are all coming back to town for Spamalot. Should be a lot of fun, but there will once again be about 9 people in the house (including Tara and I). So, that’s a lot. In preparation for that, I installed a new shower head in the guest bathroom that’s only 1.5GPM (a handheld Waterpik EcoFlow: here). It’s not a bad shower head, though I’m not sure about the usefulness of the “mist” setting. Either way, it’s better than the 5GPM of the old head. The funny thing is, the old head was marked as low flow… obviously that was before 1992 (when the Feds said showerheads had to be a max of 2.5GPM at 80PSI). Funny thing is, my current main shower head that we use daily seems to flow at about 4GPM instead of the stated 2.5GPM… Which comes to my next item…

We have high water pressure at the house. About 96psi static (no flow), which is the same pressure in the mains in my area (due to gravity because of the water tower/tank on the top of Kelly Butte above my house). The UPC (Uniform Plumbing Code) says the max is 80psi (minimum of 25psi). I thought we didn’t have a pressure regulator valve (PRV), but in fact we do, it’s just seemingly bad (it was installed with the house, and was buried under sod, and a few inches of dirt when I found it). So, I’m looking to replace that here soon. The pressure has been at it’s current level for at least the time we’ve been in the house, but I really worry about the wear and tear on our appliances and fixtures because of the high pressure. Currently, we get about 7.5-8GPM at the hose bibs, so I’m hoping that won’t be impacted too much by the drop in pressure. Some things I’ve seen indicate the flow might not change that much due to flow restriction caused by the “friction” of the water pressure and pipe walls. We’ll see. I’m hoping it’ll be an easy change out… I just need to finish unearthing the valve, and get it out. Biggest PITA is going to be “draining” the house (when I shut off the water at the street, and remove the valve, all the water in the house pipes is going to come running out). Here’s hoping a shopvac will take care of that.

On the water side, I’m also going to put a water expansion tank on the water heater after the PRV goes in. The valve will allow for pressure relief back to the city water mains if it climbs enough, but I’d rather not get those spikes (I believe it’ll keep the pressure from climbing above 10PSI greater than the supply pressure, so basically, it’ll keep it at or below 106PSI). A thermal expansion tank should prevent that completely. While I’m putting that in, I think I’m also going to wrap the water heater. It’s currently about R-16 (2″ foam), but adding a blanket would make that about R-26, which is about as good as you can do. Biggest pain is going to be moving the water heater, but, it shouldn’t be too bad once it’s drained. I also need to replace the front sillcock, but that’ll come later in the summer if I can’t figure out how to rebuild the stem (it’s a frost-free, so it’s got a long stem instead of a “normal” valve).

My other project I’m really looking forward to working on is more of my power graphing/monitoring. A site called energycircle.com (http://www.energycircle.com/) built their own “Google Powermeter” using the Visualizations API. I’m hoping to get ahold of their code to do the same. At the least, I think I’m going to switch my data collection to a mysql backend, as that will really allow for better report generation. We’ll see. I’d really also love to build one of these so that I can have a computer monitor my TED, and put the actual receiving unit I got with the TED in another room, more easily viewable. Bitch is, I don’t know a whole lot about building circuitry from diagrams, or programming MCs. Maybe I’ll pick up that Make microcontroller set at some point… =/

Also, I found this just now off that site above, which looks awesome. Wireless, web configurable, and will look at RSS feeds. I’d love to pick one of these up… I have a couple places it’d work great. Maybe in the hall where there is a giant hole at this point, or in the living room, or bedroom, etc. They have an 8″ version too, but it’s only like $20 cheaper… it’s certainly worth that for 2″ more! I’ll post some about work crap later, but at this point, there’s not a lot to discuss.

More in a couple days!

Filed Under: Energy, Home Ownership, Plumbing Tagged With: GPM, PRV, PSI, Spamalot, TED

Bringing it all together…

2009/04/08 By staze

So, I’ve been asked by a friend on facebook about jpgraph and my home energy use. Here’s kind of a “here’s how I did it” and an example.

Back a few weeks ago, I purchased a TED for my home. The Energy Detective has a piece that installs in my electrical panel around my main power feed (both phases), and then reads total load on my panel. It then sends that information over household wiring to the receiver in my office. It gets new info every second. It’s accurate to about 10W.

Okay, so every minute, my home server polls the TED, gets current KW use, and total KHW for the day, and writes that to a file along with date and time. Also, it grabs the current outdoor temp from my weather station and writes that to the same file. I don’t grab indoor temp because the weather station console is mounted somewhat close to the output of my server rack, so it pretty much constantly reads 68F (though, that is what I keep my house at).

Then the question is, what to do with this data? I have been messing with it in Numbers.app, but it’s slow dealing with 1400 rows of data (60 * 24 data points). And I hate excel. Plus, I’d like to make it automated. So looking around online, I found a few php suites that’ll do graphing. One uses google’s graphing API, but it’s kinda broken in that if you try to pass it 1400 data points, it breaks. =P This seems to be a problem with the google API because they’re all pushed as a HTTP GET. =/ Out of all of them, the best seemed to be jpgraph. It uses GD (which meant I had to install a copy of PHP on my server that was actually complied with GD support (thanks Apple for giving us semi-crippled software, again) (see my links for a link to the PHP install). Once that was going, I read up on jpgraph, and looked at the examples. They seem pretty cut and dry, so I pasted in a bunch of data, and lo-and-behold, it works! So, now I need to make it dynamic (you pass it a date, and it parses the energy use for that date). I got that done yesterday.

So now, you can go: http://www.staze.org/powergraph.php?date=20090407, and see a nifty graph of my power usage on the 7th of April, 2009, as well as the temperature for that time. I still need to make a page that acts as a kind of interface for this. Something that lists available dates, links to the graph, etc. I also hope to allow easy graphing of whole months, years, etc. But, that’ll take some time.

All this really came about because I’ve been graphing and tracking my energy use on a monthly basis by inputting the data off my Utility bills. Now I just have more granularity!

So, things left to do with this project are: Make an interface, get monthly graphing working (it would be a daily granularity) with average temp for that day graphed, and work out a long term file structure for the data. Right now it’s all just sitting in a directory that every night, a cronjob takes the previous day, grabs the total KWH use, and logs that and the date to a monthly file, then compresses the daily log (speaking of which, who knew there was a gzfile operator in PHP!?!)). Um, maybe change the image format from PNG to jpg, and probably make it so the image wasn’t necessarily recreated every time (check to see if it exists, and if it does, serve that up, if not, create it, and save it for next time). While I don’t see my energy logs getting a lot of traffic, it’s just good coding.

All of this REALLY makes me want to get a 3PH equivalent for work, so we can watch energy usage in the building. But, that’ll have to wait. =P

Oh, and let me know if you want raw data… I can post some. I’m also more than happy to post my PHP that’s parsing and graphing, as well as post my scripts that log the data, or the ajax I use to update the sidebar (though, those last ones you can get by viewing my page source).

Links:
jpgraph: http://jpgraph.net/
Real PHP install file: http://www.entropy.ch/software/macosx/php/
TED: http://www.theenergydetective.com/index.html
Python script that I based by query off of: http://www.staze.org/static/code/scripts/ted5.py (local mirror: http://www.staze.org/static/code/scripts/ted5.py)

Filed Under: Energy, Sys Admin Tagged With: jpgraph, KWH, TED

« Previous Page
Next Page »

Weather

Categories / Archives

  • Apple
  • Coding
  • Electronics
  • Energy
  • Home Ownership
  • Miscellany
  • Politics
  • Prius
  • Sys Admin
  • Travel
  • Uncategorized
  • Work
  • June 2026
  • April 2026
  • August 2025
  • April 2025
  • January 2024
  • February 2021
  • July 2020
  • January 2020
  • April 2019
  • March 2018
  • February 2018
  • June 2017

Copyright © 2026 · Staze On Genesis Framework · WordPress · Log in