Reviewing our current apps, and server v2 protocol, I’m seeing a problem.
We never completed implementing the vehicle capability system, and feature creep seems to have added a bunch of things dependent on specific vehicles with specific capabilities (some standard and some custom). Not all of these are documented.
Examples include:
Does the vehicle have the ability to pre-heat / pre-cool?
Custom OVMS v2 protocol commands > 200 haven’t been documented anywhere (but seem to be used in at least the Android App).
In general, does a particular vehicle type support a particular feature?
It seems that only option the apps have at the moment are to either include custom vehicle specific code in the app (acceptable when the particular function is only ever implemented by one specific vehicle, but imho a problem when it is generic enough that it starts applying to more than one vehicle type), or to just show the UI, fire off the command when the button is pressed, and handle the ‘not implemented’ response. It is pretty ugly to provide someone a button, but then give them a nasty error message when they press it.
In protocol v2, we do (did?) have a car capabilities message:
Car Capabilities message 0x56 “V” <https://docs.openvehicles.com/en/latest/protocol_v2/messages.html#car-capab…>
This message is sent <cartoserver> “C”, or <servertoapp> “s”, and transmits the vehicle capabilities. It was introduced with v2 of the protocol.
<data is comma-separated list of vehicle capabilities of the form:
C<cmd> indicates vehicle support command <cmd>
C<cmdL>-<cmdH> indicates vehicle will support all commands in the specified range
But it seems never implemented in the v3 module firmware, not supported at all in MQTT, and not exposed to the vehicle.{h, cpp} at all. The old PIC based firmware did support it (with default being "C1-6,C40-41,C49” from what I can see in the old firmware).
Unless anyone has any better ideas, I suggest we:
Extended vehicle.{h, cpp} to provide a callback for vehicles to provide their capabilities.
Extend ovms_server_v2 to generate the ‘V’ message from those capabilities.
Create a standard metric to store these capabilities (for v3 mqtt protocol apps).
Extend the apps to support the ‘V’ message and behave appropriately.
Update each of the existing v3 firmware vehicle support code to set capabilities appropriately.
Document (in v2 protocol guide) the custom commands.
Perhaps consider what other things could be provided in these messages apart from ‘C’ (OVMS v2 protocol commands). For example, TPMS.
Regards, Mark.
I’m trying to compile a full list of public OVMS servers, and in particular their capabilities.
Here is what I would like to collect:
Title
Location
Intended geographic coverage
Access policy
Access domain name
User Registration URL
V2 offered?
V2 Type
V2 Version
V2 standard service port (if offered)
V2 SSL server port (if offered)
V2 HTTP API standard service port
V2 HTTPS API standard service port
V2 is WebSocket available on HTTP/HTTPS API service port?
V3 offered?
V3 Type
V3 Version
V3 MQTT authentication
V3 MQTT standard service port
V3 MQTT SSL service port
V3 MQTT websocket standard service port
V3 MQTT websocket SSL service port
Notifications supported?
APNS (Apple IOS) supported?
GCM (Android firebase) supported?
MAIL (eMail) supported?
EXPO supported?
Notes/comments
Grateful if you could reply to this eMail with details of any public OVMS servers that you operate, use, or know-of. Obviously best if the operators could reply directly as they know the capabilities best.
As an example, for api.openvehicles.com <http://api.openvehicles.com/> here are the corresponding details:
Title: Open Vehicles
Location: Hong Kong
Intended geographic coverage: Globally available
Access policy: unrestricted public access for OVMS use only
Access domain name: api.openvehicles.com <http://api.openvehicles.com/>
User Registration URL: https://www.openvehicles.com/
V2 offered?: yes
V2 Type: https://github.com/openvehicles/Open-Vehicle-Server/tree/master/v3/server
V2 Version: master head, unmodified (currently 3.0.001-74-gb19aaac)
V2 standard service port (if offered): tcp/6867
V2 SSL server port (if offered): tcp/6870
V2 HTTP API standard service port: tcp/6868
V2 HTTPS API standard service port: tcp/6869
V2 is WebSocket available on HTTP/HTTPS API service port?: yes
V3 offered?: yes
V3 Type: mosquitto
V3 Version: 1.6
V3 MQTT authentication: same username+password as #6
V3 MQTT standard service port: tcp/1883
V3 MQTT SSL service port: tcp/8883
V3 MQTT websocket standard service port: not available
V3 MQTT websocket SSL service port: tcp/8083
Notifications supported?: Yes
APNS (Apple IOS) supported?: Yes
GCM (Android firebase) supported?: Yes
MAIL (eMail) supported?: Yes
EXPO supported?: Yes
Notes/comments: none
Thanks, and Regards,
Mark