-
• #2
This is a subscription to the topic :) Learn English!:)
-
• #3
mqtt.subscribe("test/espruino");
?Also, I've tended to put a leading slash on all the topics I use (eg
mqtt.subscribe("/test/espruino");
) which might help.If you want anything beginning with
test
then you need wildcards:mqtt.subscribe("test/#");
-
• #4
Is it possible to make a secure connection SSL or TLS?
-
• #5
Yes - if you buy an Espruino WiFi board, or potentially an ESP32. It isn't possible with the ESP8266 since it doesn't have enough RAM to handle TLS as well as Espruino
How to subscribe to a MQTT topic?
ESP sends messages, but does not accept.
code:
var server = "m14.cloudmqtt.com";
var options = {
};
var mqtt = require("MQTT").create(server, options);
var wifi = require("Wifi");
function onInit() {
wifi.stopAP();
}
wifi.save();
save();