[Ovmsdev] OVMS App missing most charge points, detail info wrong

Mark Webb-Johnson mark at webb-johnson.net
Tue Jan 13 13:49:43 HKT 2015


Michael, Chris,

Regarding Chris's iOS pull request, it seems I missed it. Github is supposed to notify, but in that case it didn't. I've found it, and merged it in. Just a small change:

@@ -13,7 +13,7 @@
 #import "EntityName.h"
 
 #define NULL_TO_NIL(obj) ({ __typeof__ (obj) __obj = (obj); __obj == [NSNull null] ? nil : obj; })
-#define BASE_URL @"http://www.openchargemap.org/api/?output=json"
+#define BASE_URL @"http://api.openchargemap.io/v2/poi/?output=json&verbose=false"
 #define SWF(format, args...) [NSString stringWithFormat:format, args]
 
 //#define UPDATE_SEC 120.0

I'll make sure it gets included with the next build for iOS.

For Android, I still have my eclipse based build environment working. If anyone wants/needs me to build a test apk let me know.

Regards, Mark.

On 12 Jan, 2015, at 7:14 pm, Michael Balzer <dexter at expeedo.de> wrote:

> FYI
> 
> 
> -------- Weitergeleitete Nachricht --------
> Betreff:	Re: OVMS App missing most charge points, detail info wrong
> Datum:	Mon, 12 Jan 2015 18:30:38 +0800
> Von:	Christopher Cook (Open Charge Map) <christopher.cook at openchargemap.net>
> An:	Michael Balzer <dexter at expeedo.de>
> 
> Hi Michael,
> 
> I'm also currently trying to get my android dev setup working again (for 
> the OCM app). Not easy especially as they have now retired eclipse and 
> moved to the new gradle build system in Android Studio, so there's lots 
> of trial and error required to get things building again.
> 
> The API prefix is also wrong in both cases, it should be:
> http://api.openchargemap.io/v2/referencedata/ (for pulling the reference 
> data for dropdown lists etc)
> 
> And the POI query should really be of the form:
> http://api.openchargemap.io/v2/poi/?output=json&verbose=false&<filter 
> params>
> 
> Max results filter can be much higher (2500 etc) but will potentially 
> return more data (and take longer), my own preference would be to 
> default the search to a smaller distance. API docs are here: 
> http://openchargemap.org/site/develop/api
> 
> It's also wrong on iOS, I did submit a pull request a while back but I 
> don't think anything happened to it.
> 
> Chris
> On 12/01/2015 18:13, Michael Balzer wrote:
> > Hi Christopher,
> >
> > thank you for your help!
> >
> > From home this morning ( 51.263201, 7.150157 ) I had 494/495 stations 
> > on the map.
> > From office now ( 51.321685, 7.343394 ) I have 507 stations. The same 
> > stations are missing.
> >
> > The search radius according to the App should already be switchable to 
> > the vehicle range, but that switch has no effect on the number of 
> > stations.
> >
> > So this definitely looks like the 500 results limit.
> >
> > Search:
> > https://github.com/openvehicles/Open-Vehicle-Android/search?utf8=%E2%9C%93&q=openchargemap 
> >
> >
> > Seems to me it's this API call:
> > https://github.com/openvehicles/Open-Vehicle-Android/blob/81971beb45defd87e4c993027c00e0fa3e2b68ec/OpenVehicleApp/src/com/openvehicles/OVMS/ui/MainActivity.java#L140 
> >
> >
> > That also explains why the range switch has no effect, the distance is 
> > fixed in the call.
> >
> > There's another call in ui/FragMap, but that's fixed (some 
> > init/default maybe).
> >
> > I'll try to change the maxresults parameter, but I first need to get a 
> > working Android development environment -- haven't developed Apps up 
> > to now.
> >
> > Maybe the maxresults parameter should be user configurable.
> >
> > Regards,
> > Michael
> >
> >
> > Am 12.01.2015 um 01:57 schrieb Christopher Cook (Open Charge Map):
> >> Hi Michael,
> >>
> >> I'll download the code for the app from github and have a look, I 
> >> haven't developed any of the OCM integration myself and I think 
> >> (certainly in the case of iOS, not sure about Android) that 3rd party 
> >> developers were paid to deliver the integration. Presumably then the 
> >> hope is that the community will refine their efforts via github - I'm 
> >> assuming the path is very much clear for enthusiastic developers to 
> >> submit patches for these apps directly. I can help more on 
> >> integration questions like calling the OCM APIs etc (such as your 
> >> filtering question). I've held off contributing directly to the apps 
> >> because I'm limited for time with OCM and other projects.
> >>
> >> If I find a simple fix for the API request to OCM I'll submit a pull 
> >> request to github.
> >>
> >> For the example you've given, where is the center of your search 
> >> (lat/long if possible)? By default the app is search from your 
> >> current lat/long with a radius of 285 KM, max 500 results. Is it 
> >> possible there are more than 500 charging locations in your search area?
> >>
> >> Best regards,
> >> Christopher Cook
> >> Open Charge Map
> >>
> >> On 12/01/2015 00:36, Michael Balzer wrote:
> >>> Hi Christopher,
> >>>
> >>> I first posted this on the OVMS developer list (I'm the Twizy 
> >>> developer). J-C Saint-Po told me to forward this to you:
> >>>
> >>> I'm missing about 80% of all OCM charge stations on the OVMS map 
> >>> display (Android).
> >>>
> >>> I cannot find any criteria in the station data for this effect. 
> >>> Example:
> >>> visible: http://www.openchargemap.org/site/poi/details/32598
> >>> missing: http://www.openchargemap.org/site/poi/details/32607
> >>>
> >>> Both stations are from the same provider with identical capabilities.
> >>>
> >>> The connection filter does not affect this, neither does the range 
> >>> filter or clustering.
> >>>
> >>> Also the detail info on visible points is wrong.
> >>> See attached screen shots for the map label and detail info on 
> >>> #32598 as shown in the App.
> >>>
> >>> If I can help by more examples, tell me.
> >>>
> >>> This is no new issue, has been this way from the beginning.
> >>> I just decided to add some missing stations from my region and then 
> >>> discovered they are not really missing in the OCM database.
> >>>
> >>> Regards,
> >>> Michael
> >>>
> >>
> >>
> >
> >
> 
> 
> -- 
> Christopher Cook
> Open Charge Map
> 
> 
> 
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.teslaclub.hk
> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.teslaclub.hk/pipermail/ovmsdev/attachments/20150113/82a32483/attachment-0001.html>


More information about the OvmsDev mailing list