Speak EV - Electric Car Forums banner

1 - 20 of 27 Posts

·
Registered
Joined
·
137 Posts
Discussion Starter #1
Hello,

I've been browsing around both iOS and Android app stores recently looking for the best universal charge apps, there are lots of great applications out there individual providers like ChargeYourCar amongst others, however the most universal charge map (OpenChargeMap) that I know of has an almost useless mobile app but has a vast amount of data about charge points.

I am a final year Software Engineering student and I thought maybe I should take a shot at it. This would be my first full Android application outside of university study. I've popped a couple of hours into this so far and I just wanted to gauge opinions and see if you, as EV drivers, had anything you would like from a charge map application.

I've attached some early screen shots of the application which currently grabs data from the OpenChargeMap API and breaking it down into a viewable form (currently all chargers show as the Green Fast Charge icon however this will be changed to reflect the type of charge and status further down the line.


 

·
Registered
Joined
·
69 Posts
Hi Oliver,
I'm the developer behind most of Open Charge Map - the API & database, the website and 'almost useless' HTML5 app ;)

It's good to see more effort in producing OCM powered apps, nice work.

Currently there are a handful of android apps which use OCM but only go so far as plotting markers and providing very basic POI details when you tap on them. What's really needed (to fully use OCM) is to display full POI details (in a nicely formatted style including user comments/checkins and photos), authenticate the user, add comments and upload photos. As well as that it would be nice to be able to see routes between two or more points and to see charge points along a given route.

I've made some (shallow) efforts to produce native OCM powered apps on various platforms with a view to possibly replacing the current HTML5 app (see screenshots below). Would you be interested in open sourcing your Android efforts? I'm thinking of starting an OCM-Labs github repository where ideas/API/example/works in progress can go.

Windows 8:
Screenshot1.png


iOS:
iOS Simulator Screen shot 18 May 2014 02.32.37.png
 

·
Registered
Joined
·
8,106 Posts
It is great to see more apps coming on based on OCM.

I would like to see one with a full-text search onto name and address. This would allow searches like "all on M6" or "all IKEAs" etc :)

Any chance ;)
 

·
Registered
Joined
·
137 Posts
Discussion Starter #4 (Edited)
Hi Oliver,
I'm the developer behind most of Open Charge Map - the API & database, the website and 'almost useless' HTML5 app ;)

It's good to see more effort in producing OCM powered apps, nice work.

Currently there are a handful of android apps which use OCM but only go so far as plotting markers and providing very basic POI details when you tap on them. What's really needed (to fully use OCM) is to display full POI details (in a nicely formatted style including user comments/checkins and photos), authenticate the user, add comments and upload photos. As well as that it would be nice to be able to see routes between two or more points and to see charge points along a given route.

I've made some (shallow) efforts to produce native OCM powered apps on various platforms with a view to possibly replacing the current HTML5 app (see screenshots below). Would you be interested in open sourcing your Android efforts? I'm thinking of starting an OCM-Labs github repository where ideas/API/example/works in progress can go.

Windows 8: View attachment 886

iOS:
View attachment 887
I just want to say first of all, I really admire the amount of work that you've put into the API, database and the website. I should've worded that slightly better, such as I'm not a huge fan of the mobile HTML5 app.

All of the data is pulled down so far an instantiated into a Charger class so there should be no reason why I can have the data taken to a pretty looking view with the data for that particular charge point displayed and also have the photos linked in there.

Looking at the API parameters on the developer section I can see a way to retrieve photos (do you just use streetview at the Long/Lat? I also don't see any references to checkins in the API if you could point me in the right direction with that one I'm sure it could be implemented.

Route finding is something that's built into the Google Maps engine, I believe you just pass it start and end locations and any way points from what I've gathered.

User authentication for comments should again be possible, I'm not seeing any reference to that within the API that I've seen yet, do you used OAuth?

Once the code is clean and in a good state of course I will Open Source it, I am trying to build it in a way that it should be relatively easy to reimplement on iOS (and possible Windows phone down the line)

It is great to see more apps coming on based on OCM.

I would like to see one with a full-text search onto name and address. This would allow searches like "all on M6" or "all IKEAs" etc :)

Any chance ;)
I could have the searches ran again charge points already retrieved from the API (i.e. search the name for M6 after getting all the charge points around), I don't think there is a way to do text search against the API right now (unless someone can point me in the right direction with this too)

EDIT: Also currently the code is disgusting right now and required a bit of clean up but the source is available for what I've got https://bitbucket.org/ohemsted/charge-map-android/
 

·
Registered
Joined
·
69 Posts
@Oliver Hemsted you might want to adapt or update the Java OCM API Object Model at https://github.com/openchargemap/ocm-system/tree/master/API/OCM.Java then submit back to us for everyone to share (I see you've gone for simple public fields instead of get/set with backing store, does look much simpler). The java model we have is outdated compared to the C# one https://github.com/openchargemap/ocm-system/tree/master/API/OCM.Net/OCM.API.Model/Base. The benefit of having the whole object model is that you can then use a JSON serializer library to convert the JSON from the API directly to an in memory model in one line of code and you wouldn't need to parse manually as your doing now. We use JSON.Net in c#, I believe the Java equivalent would be Jackson?

If you have a full object model it also makes it easier to grab and use the Core Reference Data (dropdown values etc) from http://api.openchargemap.io/v2/referencedata/ - this object has a handy blank ChargePoint and UserComment object, these can be used by an app as a basis for submitting a new location or a new comment(checkin),you just HTTP post your new (JSON format) item to:
  • Add a Photo: api.openchargemap.io/v2/?action=mediaitem_submission
  • Add a POI: api.openchargemap.io/v2/?action=cp_submission&format=json
  • Add a Comment/Checkin: api.openchargemap.io/v2/?action=comment_submission&format=json
We don't currently have a sandbox api to play with, so I need to set one up. I'm thinking we need to start enforcing API keys though (currently it's not required).

To get attachments to POIs (comments/checkins and mediaitems(photos)) you currently need to pass includecomments=true as a parameter to the poi API url. In the next version of the api we'll probably split out the flags but for now the one flag does both. To do a (contains) keyword search on the 'AddressInfo.LocationTitle' you add &locationtitle=ASDA (for instance), that doesn't include the address lines though, just the Title which is supposed to be a descriptive title that sums up the location,as opposed to the postal address.

Submission to the API can currently be anonymous. If the user is authenticated then we can associate the submission with them which mean Edits by recognised editors get approved automatically etc. Authentication is currently pretty clunky because we rely on other OAuth providers instead of holding username/passwords in the OCM database, then the only auth that we currently have implemented is a messaging method for the HTML app to work when embedded on mobile devices. You take the user to a brower/webview pointing to http://openchargemap.org/site/loginprovider/?_mode=silent&_forceLogin=true&_redirectURL=AppLogin?redirectWithToken=true then when they've finished signing in you end up at the http://openchargemap.org/site/loginprovider/applogin page where cookies for the OCMSessionToken and Username are set, these then get passed to the API in subsequent calls to act as the authenticated user. Its up to the calling application to then read these by whatever means,we could also set an HTTP header of some kind or adopt an equivalent standard. Apps capable of calling javascript within the webview can call the getSignInResult() method on the AppLogin page to get an object with these values. Refinements to that process are up for discussion by anyone interested (as is the whole API).

Hmm, I think I need to copy and paste some of this into the docs page.
 

·
Registered
Joined
·
340 Posts
these apps all come crashing down because the location is useless if you don't have the providers details and membership requirements. I would not turn up at an unfamiliar charge point on the off chance that I already have a card for that provider...
 

·
Registered
Joined
·
307 Posts
these apps all come crashing down because the location is useless if you don't have the providers details and membership requirements. I would not turn up at an unfamiliar charge point on the off chance that I already have a card for that provider...
Be a part of the solution and send in the information.
Quite a simple mod to the charger object to add the provider and fee fields.
 

·
Registered
Joined
·
340 Posts
aaah thats the catch - I'd be happy to but I wouldn't drive to the chargepoint just to see who the provider was and until I do I couldn't update.
For example I was in Manchester this weekend 100's of miles from home so beforehand I tried to plan a charge but gave up. I could locate charge points but not who the provider was or what the membership scheme was. After that I got on with my w/e I didn't drive round them to check - do you see what I mean?
 

·
Banned
Joined
·
3,715 Posts
do you see what I mean?
Absolutely!

Unfortunately, none of the network operators will share this information willingly and therefore you either have to subscribe to every network and check every map, or help the community document this in an open way so that we all benefit :cool:

We've made a good start and automated data capture is just around the corner...

http://openchargemap.org/site/
 

·
Registered
Joined
·
2,155 Posts
aaah thats the catch - I'd be happy to but I wouldn't drive to the chargepoint just to see who the provider was and until I do I couldn't update.
For example I was in Manchester this weekend 100's of miles from home so beforehand I tried to plan a charge but gave up. I could locate charge points but not who the provider was or what the membership scheme was. After that I got on with my w/e I didn't drive round them to check - do you see what I mean?
Doesn't Zap Map already provide this information? (Click on the charger, then the (i) symbol).
 

·
Registered
Joined
·
69 Posts
Doesn't Zap Map already provide this information? (Click on the charger, then the (i) symbol).
Zap Map does provide this information, where they know it (or can guess it); Likewise Open Charge Map does the same. The difference is that Zap Map currently keep their data to themselves and doesn't share it with others (like Open Charge Map for instance), so you have to visit their website, whereas Open Charge Map tries its best to spread the information to everyone that needs/wants it in as many ways as possible

@derekb while I think everyone can see your point, it's one of those things where you either accept defeat or you steadily work towards fixing it. It's 3.50am where I am and I'm replying to your message, so from my point of view Open Charge Map isn't really in the 'accept defeat' camp and probably never will be, until such a time as the location of your nearest charging location becomes irrelevant.
 

·
Registered
Joined
·
69 Posts
these apps all come crashing down because the location is useless if you don't have the providers details and membership requirements. I would not turn up at an unfamiliar charge point on the off chance that I already have a card for that provider...
Would it help if we provided a cross reference to other sites when viewing a location, so you could check further details? I'm thinking for instance we could hyperlink to PlugShare, possibly ZapMap etc so you can check what they say about the same location.
 

·
Registered
Joined
·
137 Posts
Discussion Starter #15 (Edited)
@Oliver Hemsted you might want to adapt or update the Java OCM API Object Model at https://github.com/openchargemap/ocm-system/tree/master/API/OCM.Java then submit back to us for everyone to share (I see you've gone for simple public fields instead of get/set with backing store, does look much simpler).
  • Add a Photo: api.openchargemap.io/v2/?action=mediaitem_submission
  • Add a POI: api.openchargemap.io/v2/?action=cp_submission&format=json
  • Add a Comment/Checkin: api.openchargemap.io/v2/?action=comment_submission&format=json
We don't currently have a sandbox api to play with, so I need to set one up. I'm thinking we need to start enforcing API keys though (currently it's not required).

To get attachments to POIs (comments/checkins and mediaitems(photos)) you currently need to pass includecomments=true as a parameter to the poi API url. In the next version of the api we'll probably split out the flags but for now the one flag does both. To do a (contains) keyword search on the 'AddressInfo.LocationTitle' you add &locationtitle=ASDA (for instance), that doesn't include the address lines though, just the Title which is supposed to be a descriptive title that sums up the location,as opposed to the postal address.

Submission to the API can currently be anonymous. If the user is authenticated then we can associate the submission with them which mean Edits by recognised editors get approved automatically etc. Authentication is currently pretty clunky because we rely on other OAuth providers instead of holding username/passwords in the OCM database, then the only auth that we currently have implemented is a messaging method for the HTML app to work when embedded on mobile devices. You take the user to a brower/webview pointing to http://openchargemap.org/site/loginprovider/?_mode=silent&_forceLogin=true&_redirectURL=AppLogin?redirectWithToken=true then when they've finished signing in you end up at the http://openchargemap.org/site/loginprovider/applogin page where cookies for the OCMSessionToken and Username are set, these then get passed to the API in subsequent calls to act as the authenticated user. Its up to the calling application to then read these by whatever means,we could also set an HTTP header of some kind or adopt an equivalent standard. Apps capable of calling javascript within the webview can call the getSignInResult() method on the AppLogin page to get an object with these values. Refinements to that process are up for discussion by anyone interested (as is the whole API).

Hmm, I think I need to copy and paste some of this into the docs page.
I've moved the entire app over to Object Model, I thought I was doing it a very long winded way but didn't find the class definitions you've got there. I've also made some adjustments to the way the icons are rendered on to the map so that it doesn't crash out when it decides to reload the charge point data over and over again. I'm planning on making the charge points in the list as well as selectable from the map to bring up a more detailed overview similar to the detailed view on the OCM website at the moment, this will be where I implement the adding comments, images and POI.

I was considering having it run through a setup style wizard when the application first starts where you can pick the types of connections you and your car can use and what networks you're part of so that it can have a preferred chargers list and then hide any charge points that aren't relevant to you as a driver. Would this be something that people would like when first opening the application or would you prefer to dig down into preferences to set this kind of stuff?

@Oliver Hemsted - one other thing you might consider is offering to download all points for the users chosen country to a local cache, then periodically refresh that when on WiFi. That way all your filtering can be local.
With this I can't being it too much of a problem currently it creates an arrayList of ChargePoints but I'm sure I could find a way to store that to SD or internal storage and then have it check every now and again. Currently I can pull down the entire charge base in a couple of megabytes but I could see the use for this. I will take a look at it.

Also to add to the discussion of not having access to the charge networks I've always found the list of operators pretty complete on OCM. Although I would much prefer a ZeroNet world without cards.

I did have another though the other week, if my car is communicating with the charge point about the state of charge and other stats, surely it also at some point sends an identifier to the post to say I am this car. Could I not register that unique identifier to the operators and use that instead of a charge card, this way I could plug in and go and they would still be able to identify it as me using the car. This is especially useful if you car share (as I have in the past).
 

·
Banned
Joined
·
3,715 Posts
I was considering having it run through a setup style wizard when the application first starts where you can pick the types of connections you and your car can use and what networks you're part of so that it can have a preferred chargers list and then hide any charge points that aren't relevant to you as a driver. Would this be something that people would like when first opening the application or would you prefer to dig down into preferences to set this kind of stuff?
The Open Vehicles app has a configuration page that allows you to select the options you discuss and it's invaluable. When driving I don't want to see Charging Stations out of range or those using RFID cards or connectors that I don't have. That said, I would want this a configuration option because when I'm planning the trip I want to see lots more info than when I'm driving.

With this I can't being it too much of a problem currently it creates an arrayList of ChargePoints but I'm sure I could find a way to store that to SD or internal storage and then have it check every now and again. Currently I can pull down the entire charge base in a couple of megabytes but I could see the use for this. I will take a look at it.
Caching the data locally is critical... I've undertaken many trips where the cell phone network is unavailable and it's a pain to lose the charging database.

Could I not register that unique identifier to the operators and use that instead of a charge card, this way I could plug in and go and they would still be able to identify it as me using the car.
Absolutely! Today we are building complexity and cost into Charging Stations which would be much better suited to cars... unfortunately the vendors in this space want to keep things complex and expensive to justify government support :(
 

·
Registered
Joined
·
307 Posts
Caching the data locally is critical... I've undertaken many trips where the cell phone network is unavailable and it's a pain to lose the charging database.
Simple job to write the charge point objects to a local txt file. This should be read in if there is no internet connection.
 

·
Registered
Joined
·
69 Posts
On a complete tangent, for those interested (app developers and the like) I've started on an OCM Mirror/Cache API - this theoretically would let you run a read only copy (or subset) of the OCM API on your own server (any major OS) which can be made to automatically refresh itself. Typical API response times on my laptop avg 24ms, which is nice. More to come on that in the future.

https://github.com/openchargemap/ocm-labs/tree/master/API/NodeAPI
 

·
Registered
Joined
·
137 Posts
Discussion Starter #20
@Oliver Hemsted can you also ensure the app works nicely on different device resolutions? I want to use it on a Parrot Asteroid Smart :)

View attachment 908
I have recently tested the application on a friends 10" tab and it scaled up absolutely beautifully, there were some minor UI tweaks that could be made, i.e. making the menu a bit more fluid but it was very usable and very clear. It's all based around the Google Maps engine so far so it scales great, I will try and make the list views a bit more scale friendly with different panels so you can dig down into data.
 
1 - 20 of 27 Posts
Top