[Ovmsdev] KML and the start of a web api

Mark Webb-Johnson mark at webb-johnson.net
Mon Apr 16 13:30:54 HKT 2012


I've deployed today a new feature for the ovms_server. It has already been committed to github and is now running live on both the tmc and www servers.

The feature is a web server running on port tcp/6868. The web server provides an api to the ovms system and allows remote clients to query it for data.

The first api released is 'group'. It works like this:

Issuing a web request for:

	http://tmc.openvehicles.com:6868/group?id=XXXXX

will return a KML document with place markers for all the cars in the specified group.

As an example, try:

	http://tmc.openvehicles.com:6868/group?id=DEMOCARS

Or as an even more impressive example, try:

	http://maps.google.com/
	(then put "http://tmc.openvehicles.com:6868/group?id=DEMOCARS" into the google maps search box)

Note that google maps has a nasty caching issue with it that you can get around by adding a "&random=<somerandomnumber>" on to the end of the url (to stop it caching old data).

You can try it with your own cars by defining a social group as parameter #11 of the ovms module in your car. You can only define one group per car, but many cars can belong to the same group. Fun for meet-ups.

This is also useful if you want to publicise the location of your car. You should be able to create a google (or whatever) map on your web site, and pull-in the kml to show your car location and details.

At the moment, this is basically workable, but needs some polishing. We want to get the base car image in from the apps, and show a nice little pop-up web page for the details (at the moment, it just shows speed and altitude, which is not very interesting).

Regards, Mark.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20120416/234fef7b/attachment.htm>


More information about the OvmsDev mailing list