<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div><br></div>Reviewing our current apps, and server v2 protocol, I’m seeing a problem.<div><br></div><div>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.</div><div><br></div><div>Examples include:</div><div><br></div><div><ol class="MailOutline"><li>Does the vehicle have the ability to pre-heat / pre-cool?</li><li>Custom OVMS v2 protocol commands > 200 haven’t been documented anywhere (but seem to be used in at least the Android App).</li><li>In general, does a particular vehicle type support a particular feature?</li></ol></div><div><br></div><div>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.</div><div><br></div><div>In protocol v2, we do (did?) have a car capabilities message:</div><div><br></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><h2 style="box-sizing: border-box; margin-top: 0px; font-family: "Roboto Slab", ff-tisa-web-pro, Georgia, Arial, sans-serif; font-size: 24px; margin-bottom: 24px; color: rgb(64, 64, 64); font-variant-ligatures: normal; orphans: 2; widows: 2; background-color: rgb(252, 252, 252); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">Car Capabilities message 0x56 “V”<a class="headerlink" href="https://docs.openvehicles.com/en/latest/protocol_v2/messages.html#car-capabilities-message-0x56-v" title="Link to this heading" style="box-sizing: border-box; color: rgb(41, 128, 185); text-decoration: none; cursor: pointer; display: inline-block; font-weight: normal; font-width: normal; font-size: 14px; line-height: 1; font-family: FontAwesome; font-size-adjust: none; font-kerning: auto; font-variant-alternates: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-position: normal; font-feature-settings: normal; font-optical-sizing: auto; font-variation-settings: normal; text-rendering: auto; -webkit-font-smoothing: antialiased; opacity: 0; margin-left: 0.5em;"></a></h2><p style="font-size: 16px; box-sizing: border-box; line-height: 24px; margin: 0px 0px 24px; color: rgb(64, 64, 64); font-family: Lato, proxima-nova, "Helvetica Neue", Arial, sans-serif; font-variant-ligatures: normal; orphans: 2; widows: 2; background-color: rgb(252, 252, 252); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">This message is sent <cartoserver> “C”, or <servertoapp> “s”, and transmits the vehicle capabilities. It was introduced with v2 of the protocol.</p><p style="font-size: 16px; box-sizing: border-box; line-height: 24px; margin: 0px 0px 24px; color: rgb(64, 64, 64); font-family: Lato, proxima-nova, "Helvetica Neue", Arial, sans-serif; font-variant-ligatures: normal; orphans: 2; widows: 2; background-color: rgb(252, 252, 252); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><data is comma-separated list of vehicle capabilities of the form:</p><ul class="simple" style="font-size: 16px; box-sizing: border-box; margin: 0px 0px 24px; padding: 0px; list-style: outside; line-height: 24px; color: rgb(64, 64, 64); font-family: Lato, proxima-nova, "Helvetica Neue", Arial, sans-serif; font-variant-ligatures: normal; orphans: 2; widows: 2; background-color: rgb(252, 252, 252); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"><li style="box-sizing: border-box; list-style: outside; margin-left: 24px;"><p style="box-sizing: border-box; line-height: 24px; margin: 0px;">C<cmd> indicates vehicle support command <cmd></p></li><li style="box-sizing: border-box; list-style: outside; margin-left: 24px;"><p style="box-sizing: border-box; line-height: 24px; margin: 0px;">C<cmdL>-<cmdH> indicates vehicle will support all commands in the specified range</p></li></ul></div></blockquote><div>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).</div><div><br></div><div>Unless anyone has any better ideas, I suggest we:</div><div><br></div><div><ol class="MailOutline"><li>Extended vehicle.{h, cpp} to provide a callback for vehicles to provide their capabilities.</li><li>Extend ovms_server_v2 to generate the ‘V’ message from those capabilities.</li><li>Create a standard metric to store these capabilities (for v3 mqtt protocol apps).</li><li>Extend the apps to support the ‘V’ message and behave appropriately.</li><li>Update each of the existing v3 firmware vehicle support code to set capabilities appropriately.</li><li>Document (in v2 protocol guide) the custom commands.</li><li>Perhaps consider what other things could be provided in these messages apart from ‘C’ (OVMS v2 protocol commands). For example, TPMS.</li></ol><div><br></div></div><div>Regards, Mark.</div><div><br></div></body></html>