You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Thanks for amazing code, wanted to adapt it to my arduino uno r3 and fallen to first problem. How can i add username and password to MQTT broken connection inside your code? Tried:
client.connect("randomNAME", mqttUser, mqttPassword ) with no luck.
Thanks in advance.
The text was updated successfully, but these errors were encountered:
fixed it, had to change the code to:
client.setServer(mqttServer, mqttPort);
client.setCallback(callback);
while (!client.connected()) {
Serial.println("Connecting to MQTT...");
if (client.connect("RandomNAME", mqttUser, mqttPassword )) {
Serial.println("connected");
} else {
Serial.print("failed with state ");
Serial.print(client.state());
delay(2000);
}
}
Now i need to figure out how to set rules in openHAB for button presses to toggle sonoff tasmota. Cannot achieve that yet, toggle action does not work from the rules. :/
No toggle.. Had to create two rules for one switch, one with command ON, second with command OFF. For every relay two rules in openHAB.. Maybe will need to try to learn NodeRED, i think there I should need to create double rules for one relay..
Hi,
Thanks for amazing code, wanted to adapt it to my arduino uno r3 and fallen to first problem. How can i add username and password to MQTT broken connection inside your code? Tried:
client.connect("randomNAME", mqttUser, mqttPassword ) with no luck.
Thanks in advance.
The text was updated successfully, but these errors were encountered: