Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
172c9bf
Server V3 (MQTT): AWS IoT Core support
shadowguardian507-irl Mar 27, 2026
763dc09
Fix line endings for client certificate and key in server v3 configur…
shadowguardian507-irl Apr 7, 2026
5adab09
atomic fix - defaults correction
shadowguardian507-irl Apr 7, 2026
92dda5d
atomic fix- store mtls cert/key to files
shadowguardian507-irl Apr 7, 2026
8c0c1d7
atomic fix - remove cert post processing
shadowguardian507-irl Apr 7, 2026
baa718a
atomic fix - remove unneeded defensive coding on cert load flow
shadowguardian507-irl Apr 7, 2026
6193f22
atomic fix - trim descriptions for retain and keepalive
shadowguardian507-irl Apr 7, 2026
0a529dc
atomic fix - remove cert/key length dynamic readout
shadowguardian507-irl Apr 7, 2026
2331f24
atomic fix - mtls section clarity correction
shadowguardian507-irl Apr 7, 2026
60d7a4f
atomic fix - reduce complexity of docs
shadowguardian507-irl Apr 7, 2026
1b0fcec
atomic fix - add note on mTLS/ TLS client auth
shadowguardian507-irl Apr 7, 2026
88d7020
atomic fix - add note on mTLS to ssltls docs
shadowguardian507-irl Apr 7, 2026
7d162cc
atomic fix - move AWS IoT Core settings to dedicated section in serve…
shadowguardian507-irl Apr 11, 2026
d090b2f
atomic fix - update AWS IoT Core configuration details and remove kee…
shadowguardian507-irl Apr 11, 2026
ec4b4a2
atomic fix - simplify retain depth limit status message in server output
shadowguardian507-irl Apr 11, 2026
6ff1cfa
atomic fix - enhance help text for client key input and add title on …
shadowguardian507-irl Apr 11, 2026
4f77083
atomic fix - remove unnecessary JavaScript for input length validatio…
shadowguardian507-irl Apr 11, 2026
429f388
atomic fix - remove redundant comment related to retain depth limit f…
shadowguardian507-irl Apr 11, 2026
fc76813
atomic fix - further attempt at making the docs style match existing …
shadowguardian507-irl Apr 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs/source/userguide/commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,22 @@ More info on the general OVMS MQTT topic scheme can be found
`on the developer mailing list <http://lists.openvehicles.com/pipermail/ovmsdev/2018-July/005297.html>`_.


TLS client certificate commands
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If the broker needs a client certificate (mTLS)::

OVMS# server v3 tlsclient import <cert_path> <key_path>
OVMS# server v3 tlsclient status
OVMS# server v3 tlsclient info
OVMS# server v3 tlsclient check
OVMS# server v3 tlsclient reload
OVMS# server v3 tlsclient clear

Files are stored under ``/store/tls/``. Use ``check`` to validate the cert/key pair,
``reload`` to reconnect and apply changes.


------------------
Custom Server APIs
------------------
Expand Down
31 changes: 31 additions & 0 deletions docs/source/userguide/components.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,37 @@ Send all ``v.b`` metrics except ``v.b.soc``::
OVMS# config set server.v3 metrics.include v.b.*
OVMS# config set server.v3 metrics.exclude v.b.soc

^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Broker compatibility options
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Some brokers have additional requirements:

- ``retain.depth.limit`` (default: ``no``) — omits the RETAIN flag on topics deeper than 8 path segments. Needed for AWS IoT Core, which silently drops retained publishes on topics deeper than 8 levels.

Example::

OVMS# config set server.v3 retain.depth.limit yes

.. note:: AWS IoT Core requires the MQTT keepalive to be 1200 seconds or less.
Set ``updatetime.keepalive`` accordingly::

OVMS# config set server.v3 updatetime.keepalive 1200

These options can also be set from the **Config → Server V3 (MQTT)** web page.

^^^^^^^^^^^^^^^^^^^^^^^^^
TLS client authentication
^^^^^^^^^^^^^^^^^^^^^^^^^

The module supports client certificate authentication (mTLS) for brokers that need it.
Paste the PEM certificate and key into the **Config → Server V3 (MQTT)** web page,
or use the CLI::

OVMS# server v3 tlsclient import /sd/client.crt /sd/client.key

See :doc:`commands` for the full list of ``tlsclient`` commands.

-------------------------------
Upgrading from OVMS v1/v2 to v3
-------------------------------
Expand Down
4 changes: 4 additions & 0 deletions docs/source/userguide/ssltls.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ These trusted certificate authorities are used by the various module in the OVMS
establishing SSL/TLS connections (in order to verify the certificate of the server being
connected to).

.. note:: For MQTT brokers that require **client certificate authentication** (mTLS),
see the :doc:`Server V3 configuration <components>` section on TLS client authentication
and the ``server v3 tlsclient`` :doc:`commands <commands>`.


----------------------------------
How to get the CA PEM for a Server
Expand Down
22 changes: 22 additions & 0 deletions vehicle/OVMS.V3/changes.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
Open Vehicle Monitor System v3 - Change log

????-??-?? ??? ??????? OTA release
- Server V3 (MQTT): AWS IoT Core compatibility fixes:
- mTLS client certificate authentication: the module now supports X.509 client
certificates for MQTT broker authentication (required by AWS IoT Core and other
brokers that use mutual TLS instead of username/password).
The client certificate and private key are stored in server.v3 config and managed
via the web UI (Config -> Server V3: "TLS client authentication" section) or CLI:
server v3 tlsclient import <cert_path> <key_path> -- load PEM files from storage
server v3 tlsclient status -- show cert/key status
server v3 tlsclient info -- show certificate metadata
server v3 tlsclient check -- validate cert/key pair
server v3 tlsclient clear -- remove cert and key
server v3 tlsclient reload -- reconnect to apply changes
- Fixed MQTT CONNECT: empty username/password strings are now sent as absent (NULL)
rather than empty, matching broker expectations for certificate-only authentication.
- New config param retain.depth.limit (bool, default no):
When enabled, metric topics with more than 8 path segments are published without the
MQTT RETAIN flag. AWS IoT Core silently rejects retained publishes on topics deeper
than 8 segments; this guard ensures all other metrics remain retained while deep topics
still reach live subscribers. Disable for brokers that support retained messages on
arbitrarily deep topics.
Exposed in the web UI (Config → Server V3: "Limit retain to 8-segment topics") and
shown in CLI output of 'server v3 status'.
- Server V3: the MQTT client ID to use can now be configured. While not normally necessary, changing the
client ID may be necessary to discard an existing MQTT server session when changing the username.
New configs:
Expand Down
Loading