EMQ – publish a message to singletopic
Publish a message to the system singlepubtopic
. singlepubtopic
is a predefined topic for single-subscription systems, where the host is not expected to register a publish topic with +EMQPUBOPEN
. The publish topic (singlepubtopic
) and QoS (singlepubtopicqos
) are defined in the configuration file. For more information, see the [MQTT] section,
Type | Syntax | Returned Result |
---|---|---|
Test | AT+EMQ=?
|
OK |
Read | AT+EMQ?
|
OK or ERROR |
Write |
where
AnyNet SMARTconnect™ handles
|
OK – command result
SEND OK – subsequent URC that is sent when publish occurs. This will not happen immediately if AnyNet SMARTconnect™ is offline. or ERROR |
Example
AT+EMQ="{\"BatteryPower\": \"Low\"}"
OK
SEND OK