1 post / 0 new
Bruce Brentlinger
MQTT commands to OVMS

There is a lot of different information online about how to send a command to the OVMS and get it to do something or at least generate a response (much of it is very old).  But I have not been able to get anything to work.

I get metrics from the OVMS, but as far as sending commands I am stuck.

My car is a nissan leaf 2012 SV

OVMS box firmware 3.3.005-3-g4f3f7688/ota_1/main (build idf v3.3.4-851-gfa4f07fb3b Sep 7 2025 08:02:51) using dexters-web.de.

I am using MQTT explorer to listen to traffic.  It only sees the commands, and I don't see any responses there.

Also the web console ovms shell shows no response to mqtt commands.

I have tried using the ovms integration and plain yaml.

Here are some automations that I have tried for testing.

let's assume my prefix is "ovms" and my vehicle ID is "828Longan25" command to test "wifi".

Then:

alias: "Test OVMS WiFi Command every 10s"
description: "Send the 'wifi' command to OVMS every 10 seconds for testing"
trigger:
  - platform: time_pattern
    seconds: "/10"  # runs every 10 seconds
action:
  - action: mqtt.publish
    data:
      topic: "ovms/client/828Longan25/command/test"
      payload: "wifi"
mode: single

Another try:

alias: "Test OVMS WiFi Command every 10s"
description: "Send 'wifi' command to OVMS every 10 seconds"
trigger:
  - platform: time_pattern
    seconds: "/10"
action:
  - service: ovms.send_command
    data:
      vehicle_id: 828Longan25
      command: wifi
      timeout: 10   # optional, defaults to integration’s setting
mode: single

Another try:

alias: "Test OVMS WiFi Command MQTT"
description: "Send wifi command to OVMS v3 module every 10 seconds"
trigger:
  - platform: time_pattern
    seconds: "/10"
action:
  - variables:
      cmd_id: "{{ now().timestamp() | int | string | replace('.', '') }}"  # unique ID
  - service: mqtt.publish
    data:
      topic: "ovms/client/828Longan25/client/rr/command/{{ cmd_id }}"
      payload: '{"command":"wifi"}'
      qos: 1
mode: single


Can anyone here help?
Thank you.

randomness