<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>For some time now I've wanted to offer an HTTP API for OVMS. The existing car<->server and server<->app protocol is cool, but requires going through some hoops (perl, whatever) to handle the encryption and protocol level stuff. An HTTP API would make this much easier to externally script, and would be great for pulling down logs and other such things.</div><div><br></div><div>I've now completed work re-factoring the ovms_server.pl code to add the framework to support this:</div><div><br></div><div><ol class="MailOutline"><li>Switched to using the AnyEvent::HTTPD cpan module for the base framework.</li><li>Implemented an HTTP server on tcp/6868.</li><li>Implemented an HTTPS server on tcp/6869.</li><li>Support serving of arbitrary files (in httpfiles directory) for HTTP and HTTPS.</li><li>Implemented syncing of Drupal user accounts (and password hashes) to new ovms_owners table.</li><li>Extended the protocol to support syncing owners and well as vehicle records.</li><li>Support syncing ovms_owners table to connected OVMS servers.</li><li>Moved ovms_utilisation to ovms_historicalmessages as type '*-OVM-Utilisation", with records 0 (car_rx), 1 (car_tx), 2 (app_rx) and 3 (app_tx).</li></ol></div><div><br></div><div>The above work has just been PUSHed to github.</div><div><br></div><div>So, the framework exists. Now for the fun stuff.</div><div><br></div><div>My thinking is:</div><div><br></div><div><ul class="MailOutline"><li>Authenticate to a vehicle either by vehicle + serverpass, or OVMS username+password.</li><li>You can get a list of vehicles by providing your OVMS username+password.</li><li>Use cookies to maintain a session - and time sessions out after a few minutes of inactivity (or on demand logout).</li><li>Basic functions to retrieve current vehicle status, and historical data.</li><li>Function to 'connect' to a live vehicle - just like an App, it will keep the connection open for as long as the session lasts, then tell the vehicle you have disconnected.</li><li>Control functions - just like the apps - start/stop charge, homelink, etc.</li><li>Support for OVMS protocol, so can convert the data messages to actual real-world JSON.</li></ul></div><div><br></div><div>Does anyone want to work with me on this? In particular, anyone with RESTful or other HTTP API experience? </div><div><br></div><div>Regards, Mark.</div><div><br></div></body></html>