Hi there,
in order to send data via MQTT to the node, you should publish to topic
dwm/node/<node_id>/downlink/data
The format of data must be
{“data”:“ASNFZ4mrze8=”,“overwrite”:false}
Where “ASNFZ4mrze8=” is the data in base64 format.
A simple shell function to send data can look like this:
mqtt_data_pub() { if [ "$#" -ne 4 ] then echo "mqtt_data_pub: missing argument" return 1 fi ARGC=$# MQTT_HOST=$1 MQTT_PORT=$2 NODEID=$3 MSG=$4 MQTT_PUB=mosquitto_pub MSG_BASE64=`echo -n $MSG | base64` MSG_JSON="{\"data\":\"$MSG_BASE64\"}" echo $MSG_JSON | \ $MQTT_PUB \ -h $MQTT_HOST \ -p $MQTT_PORT \ -t "dwm/node/$NODEID/downlink/data" \ -l }
Cheers,
TDK