Good Afternoon folks...

42 views
Skip to first unread message

Mike Beattie

unread,
Nov 22, 2009, 7:11:46 PM11/22/09
to Powershop Developers
Hey all.

My name is Mike, and I'm an alcho.... wait, wrong group.

Suppose I'll kick this off - I'm planning on building two applications
to use the PowerShop API - first and foremost, an iPhone application
to allow updating your meter reading with your iPhone easily (rather
than navigating the website on that small screen), and in the future,
I'll enhance it to include the purchase of topups.

Secondly, I'll be building a very small, and very customised
application that will simply update my meter reading automatically
using the output gathered from a microcontroller that's monitoring the
pulse output of a check meter in my meter box.

So - what have I discovered so far? the OAuth library I'm using for
the iPhone is hideously over-engineered.. but it'll be usable after
cleaning it up, but I'll probably investigate another library I found
last night. The biggest problem I've discovered is that a UIWebView
will happily load the user authorization URL, but Mobile Safari will
not - even if it's manually entered. I consistently get a "Cannot
download this file" error, yet if I mistype the oauth_token, the error
is displayed correctly. Opening the account page is fine - just the
user auth page is not. Looking at headers in HttpFox on my desktop,
there's no difference between those of the auth page, and the account
page (/unit_balance).

If anyone else has seen this before, or knows what it could be, then
please, drop me a line!

(Also let me know if you're planning on writing an iPhone app... I'd
rather not duplicate effort if it's not required)

Cheers,
Mike.

Matt Dillon

unread,
Nov 22, 2009, 7:53:25 PM11/22/09
to Powershop Developers
Hi Mike

This just through from the API developers:
Move mime type register_alias call into initializers directory to fix
iphone oauth authorization bug

Cheers
Matt

Ari Sargent

unread,
Nov 22, 2009, 8:03:54 PM11/22/09
to Powershop Developers
Thanks for 'breaking the ice' Mike.

Sounds like you've been gagging for a power company to finally feed
the inner (or maybe outer) geek in you - we'll take no responsibility
for any other groups that you may need to join as a consequence - "Hi
my name is Mike and I count kilowatt-hours to get to sleep' ;)

I reckon the update meter reading app will quickly become the 'Hello
World' of the Powershop environment ;) When you get your code running
it would be good if you could post it here.

Turns out there was a bug in the API that has now been resolved.


On Nov 23, 1:11 pm, Mike Beattie <mike.zl...@gmail.com> wrote:

Mike Beattie

unread,
Nov 22, 2009, 8:14:59 PM11/22/09
to Powershop Developers
On Nov 23, 2:03 pm, Ari Sargent <ari.sarg...@powershop.co.nz> wrote:
> Thanks for 'breaking the ice' Mike.

No worries ;)

> Sounds like you've been gagging for a power company to finally feed
> the inner (or maybe outer) geek in you - we'll take no responsibility
> for any other groups that you may need to join as a consequence - "Hi
> my name is Mike and I count kilowatt-hours to get to sleep' ;)

I've been waiting a while for the API to appear, yes. I'm really
really really slack about entering my meter reading - I'm looking
forward to the microcontroller app doing all the work for me.

> I reckon the update meter reading app will quickly become the 'Hello
> World' of the Powershop environment ;) When you get your code running
> it would be good if you could post it here.

I'm planning on releasing it to the App Store when I've got something
functional, but I can certainly post bits of relevant code once I get
there.

> Turns out there was a bug in the API that has now been resolved.

Yep - that sorted the issue, Mobile Safari will now successfully open
the authorization page (Matt's about to post my screenshot).

(oh, and sorry for all the crufty request tokens I'm leaving littered
through your database)

Cheers,
Mike.

Matt Dillon

unread,
Nov 22, 2009, 8:20:28 PM11/22/09
to Powershop Developers
Nice work Mike

Can't seem to upload an image. Suffice to say it works (and looks
pretty good on the iPhone screen).

Nice one.

Matt Dillon

unread,
Nov 22, 2009, 8:28:23 PM11/22/09
to Powershop Developers

Bruce Fitzsimons

unread,
Nov 22, 2009, 11:00:50 PM11/22/09
to Mike Beattie, Powershop Developers

On 23/11/2009, at 1:11 PM, Mike Beattie <mike....@gmail.com> wrote:

>
>
>
> (Also let me know if you're planning on writing an iPhone app... I'd
> rather not duplicate effort if it's not required)
>

I was planning on it, but you're already on the way...there are only a
few things I want to be able to do.

One feature I would like is "dumb metering" where we could self-read
and take&send a photo for proof. I don't know if this would satisfy
Powershops regulatory responsibilities though?

It would certainly reduce Powershops costs while avoiding the need for
me to open the door/move my meterboard.

Cheers,
Bruce

Ari Sargent

unread,
Nov 22, 2009, 11:19:22 PM11/22/09
to Powershop Developers
Bruce - we are looking at ways of meeting the regulatory meter reading
requirements without the need for a real meter reader to go to a
property - primarily for remote areas where the meter reader needs to
drive an hour to get there (this is very expensive). One avenue we are
exploring is the use of a password/token that you hold up to the meter
when you take the photo - that gives us an audit trail and timestamp.
We'll continue to explore this and keep you posted and depending on
where we get to update the API accordingly.



On Nov 23, 5:00 pm, Bruce Fitzsimons <br...@pinxit.co.nz> wrote:

Mike Beattie

unread,
Nov 22, 2009, 11:19:15 PM11/22/09
to Bruce Fitzsimons, Powershop Developers
Ooo, nice idea. Yep, once I get a good framework put together I'll
look into that.

Mike.
--
mike....@gmail.com

Mike Beattie

unread,
Nov 22, 2009, 11:34:55 PM11/22/09
to Ari Sargent, Powershop Developers
Nice... I can see that becoming a 'killer feature' for joining
PowerShop, when all your Customer Reads have the potential to be
official reads (or some of them - perhaps you'll want to put a limit
on it, 1 a week or something, otherwise you'll have to hire someone to
validate all the reads...).

If you can go down that route though, the natural progression is to
allow submission of images with a new API call.

Mike.

Bruce Fitzsimons

unread,
Nov 23, 2009, 1:01:03 AM11/23/09
to Powershop Developers

On 23/11/2009, at 5:19 PM, Ari Sargent wrote:

>
> Bruce - we are looking at ways of meeting the regulatory meter reading
> requirements without the need for a real meter reader to go to a
> property - primarily for remote areas where the meter reader needs to
> drive an hour to get there (this is very expensive). One avenue we are
> exploring is the use of a password/token that you hold up to the meter
> when you take the photo - that gives us an audit trail and timestamp.
> We'll continue to explore this and keep you posted and depending on
> where we get to update the API accordingly.
>

Nice Ari, it sounds almost like a ransom demand situation -- how about using the newspaper? :-)

More seriously you might be able to get by with MMS-quality video of the meters and your website. A moving meter would be harder to fake. It's all about the standard of proof I guess, which is between yourselves, the regulator and the lawyers inbetwixt. Even reducing real reads to once-per-year would be a huge win/win.

Back on topic, it is good to know you're working on it, and will extend the API if/when you can. I'll have to have a think about what else I want to use the API for now; perhaps weighted-average cost analysis and computerised unit buying based on previous usage curves or somesuch.

Thanks for the API :)

Cheers,
Bruce

Ari Sargent

unread,
Nov 23, 2009, 1:27:34 AM11/23/09
to Powershop Developers
Of course the real killer app is sending an iPhone to an OCR server
and updating the reading based on just the photo.

We did think of using the newspaper, but using a token combined with
an API image upload call we can automate pretty much everything except
typing in the numbers (until someone does the OCR app).

Other thoughts we've had around use of the API are to create a
facebook app and build a community around energy efficiency, dollar
savings or whatever. You could also pole for 'steal-a-deal' to appear
in your area :) But the really great thing about having an API is
that we don't have to come up with all of the ideas, that's where you
guys come in!

Steve

unread,
Nov 26, 2009, 4:26:05 AM11/26/09
to Powershop Developers
Hey all,

Hi Mike, I'm very interested in your external meter monitoring.
Anyway what's a "check-meter" when it's at home.
I assume that it's different to the leased meter from the lines
company.
... and how much does one of these beasties cost?

It would be nice to have direct access to the data from the smart
meters themselves, after all we are leasing them..

Steve

Bruce Hoult

unread,
Jan 1, 2010, 1:14:00 AM1/1/10
to Powershop Developers
On Nov 23 2009, 7:01 pm, Bruce Fitzsimons <br...@pinxit.co.nz> wrote:
> More seriously you might be able to get by with MMS-quality video
> of the meters and your website. A moving meter would be harder to
> fake. It's all about the standard of proof I guess, which is between
> yourselves, the regulator and the lawyers inbetwixt. Even reducing
> real reads to once-per-year would be a huge win/win.

I don't know about anyone else, but after a few months of monthly
readings, my frequency of actual official Powershop readings has
dropped off. My last two were 29 Aug and 11 Nov, so that's 10.5 weeks
and now 7 weeks so far this time.

I'm also interested in working on iPhone apps, and/or something in the
"cloud" that adds something that Powershop don't do themselves.

My current frustration is that there isn't a download option for the
Products Purchased page. I'm about to grab the API specs, but as I
understand it you can't access the real data yet?

Bruce Hoult

unread,
Jan 1, 2010, 1:33:42 AM1/1/10
to Powershop Developers
On Jan 1, 7:14 pm, Bruce Hoult <bruce.ho...@gmail.com> wrote:
> My current frustration is that there isn't a download option for the
> Products Purchased page. I'm about to grab the API specs, but as I
> understand it you can't access the real data yet?

Ah .. and there's no API for historical purchase or use data anyway :-
(

Ari Sargent

unread,
Jan 1, 2010, 1:52:42 AM1/1/10
to Powershop Developers
Bruce - I am not sure what is happening with your meter reading
frequency. You should be on a 20 business day cycle. I'll get someone
to take a look at what's going on.

I can now send you API Consumer Key/Secret for production, so I'll do
that for you now.

You are correct, we don't currently supply a historic purchase feed,
but we're happy to look at this in future. We do supply historic meter
reading data, so you can track your usage.

Bruce Hoult

unread,
Jan 1, 2010, 2:02:40 AM1/1/10
to Powershop Developers
On Jan 1, 7:52 pm, Ari Sargent <ari.sarg...@powershop.co.nz> wrote:
> Bruce - I am not sure what is happening with your meter reading
> frequency. You should be on a 20 business day cycle. I'll get someone
> to take a look at what's going on.

Hey .. it's fine by me.

I'd assumed that Powershop was simply happy with the frequency and
accuracy of my self-reads.

And you've indicated you'll be able to get me onto a smart meter in
the next month or so anyway (and I ran into my landlord in the airport
on boxing day and he said "sure, go for it")

Ari Sargent

unread,
Jan 1, 2010, 2:07:10 AM1/1/10
to Powershop Developers

On Jan 1, 8:02 pm, Bruce Hoult <bruce.ho...@gmail.com> wrote:
> On Jan 1, 7:52 pm, Ari Sargent <ari.sarg...@powershop.co.nz> wrote:
>
> > Bruce - I am not sure what is happening with your meter reading
> > frequency. You should be on a 20 business day cycle. I'll get someone
> > to take a look at what's going on.
>
> Hey .. it's fine by me.
>
> I'd assumed that Powershop was simply happy with the frequency and
> accuracy of my self-reads.

We are - but still keen to find out what's going on.

>
> And you've indicated you'll be able to get me onto a smart meter in
> the next month or so anyway (and I ran into my landlord in the airport
> on boxing day and he said "sure, go for it")

Great :)

Bruce Hoult

unread,
Jan 1, 2010, 2:08:37 AM1/1/10
to Powershop Developers
On Jan 1, 7:52 pm, Ari Sargent <ari.sarg...@powershop.co.nz> wrote:
> You are correct, we don't currently supply a historic purchase feed,
> but we're happy to look at this in future.

If it's easier, then adding a download option to the Products
Purchased page (as is already present on the "Account Statement" and
"Meter Readings" pages) would be fine for the moment.

Or, adding "Available from" and "Expiry date" fields to the existing
"Account Statement" csv would be OK too. (number of units would be
nice too, but it can be calculated from the existing data)

Reply all
Reply to author
Forward
0 new messages