Appearance
Motor (function 7)
An electric propulsion motor and its controller. It reports what it is doing — driving, regenerating, or holding a speed or power setpoint — along with voltage, current, temperature and a signed RPM where a negative value means turning the other way. The command selects the mode and its setpoint.
stateenum:off,regeneration,drive,regulator-speed,regulator-power,error.
Published
device/7/<i>/life
metadata adds counter; expireAfterSec: 30.
data field | Type | Unit | Description |
|---|---|---|---|
state | string | — | Motor state (enum) |
stateCode | int | — | Raw state |
voltage | number (1 dec) | V | Voltage |
current | number (1 dec) | A | Current (signed) |
temperature | int | °C | Temperature |
rpm | int | rpm | Motor RPM (signed; negative = reverse/regen) |
json
{
"data": {
"state": "drive",
"stateCode": 2,
"voltage": 48.6,
"current": 85.2,
"temperature": 52,
"rpm": 2400
},
"metadata": {
"rxdate": "2026-06-17T14:30:45.123Z",
"rxTimestamp": 1781793045,
"expireAfterSec": 30,
"counter": 4
}
}bash
mosquitto_sub -h 127.0.0.1 -t 'device/7/+/#' -vCommand — device/7/<i>/command
Regex ^device/7/([[:digit:]]+)/command$. Exactly one mode flag is expected: if no flag is set the motor is turned off; if more than two flags are set the command is forced to off and setpoint cleared.
| Field | Type | Description |
|---|---|---|
requestOff | bool | Stop motor |
requestDrive | bool | Drive |
requestRegeneration | bool | Regenerative braking |
requestRegulatorSpeed | bool | Speed regulation |
requestRegulatorPower | bool | Power regulation |
setpoint | int | Setpoint (speed or power, per mode) |
bash
mosquitto_pub -h 127.0.0.1 -t 'device/7/0/command' -m '{"requestDrive":true,"setpoint":1000}'
mosquitto_pub -h 127.0.0.1 -t 'device/7/0/command' -m '{"requestRegeneration":true}'
mosquitto_pub -h 127.0.0.1 -t 'device/7/0/command' -m '{"requestOff":true}'