MQTT commands to the service

Important: the app must be active to receive the MQTT commands, so at least the “charge log” must be active, or the device must be a remote control server in order to have the background service running.

And an MQTT publisher must be set up in the app (Settings > MQTT publisher).

The MQTT Client ID is “wallbox_control_<device-product-ID>”. The product ID is the ID of the Android device, manufacturer specific – and you can see it right away in the MQTT publish. For Samsung S5 this is “gts4lvwifieea”, so for me the client ID is “wallbox_control_gts4lvwifieea”.

Topic is “<client-id>/command“, the command is JSON formatted.

So sending a command is publishing like (here: FHEM “set <broker> publish <topic> <payload>”):

set myMQTT2Broker publish wallbox_control_gts4lvwifieea/command { “cmd”: “mode”, “param”: { “mode”: “manual”, “active”: true, “current”: 9, “energy”: 8 }}

Set the mode (Manual or PV Surplus)

{ "cmd": "mode", { "mode": <mode> }}

“<mode>” can be one of:

  • “pv”: sets PV mode
  • “manual”: sets manual mode

By default: just setting the mode deactivates the process (for PV, that is “inactive”, for manual charging the wallbox is locked).

  • “pv” optionally can be passed with arguments in the format:
    { “mode”: “pv”, “active”: true, “energy”: 5.5 }
    – “active” is a boolean value, default false,
    – “energy” in kWh, default 0 (unlimited).
  • and “manual” optionally can be passed in the format:
    { “mode”: “manual”, “active”: true, “current”: 10, “energy”: 5 }
    – “active” is a boolean value, default false,
    – “current” is in A, default 6,
    – “energy” in kWh, default 0 (unlimited).

So a complete command looks like

{ “cmd”: “mode”, { “mode”: “manual”, “active”: true, “current”: 10, “energy”: 5 }}

To change a “current” or “energy” parameter, just change the value, but “mode” and “active” must be supplied.

{ “cmd”: “mode”, { “mode”: “manual”, “active”: true, “current”: 16 }}

publish wallbox_control_gts4lvwifieea/command { "cmd": "mode", "param": { "mode": "manual", "active": true, "current": 10, "energy": 5 }}