Moderator: igrr
https://github.com/corbanmailloux/esp-mqtt-rgb-led
It allows you to control an RGB led strip/single led or a white led strip/single led via MQTT.
I tested it with home-assistant embedded MQTT and it worked without issue.
The project is also well documented on github (which is rare enough to be pointed out )
But after wifi successful connection
I get an error:
Attempting MQTT connection...failed, rc=2 try again in 5 seconds
I installed mosquitto
run it:
mosquitto -c "c:\Program Files (x86)\mosquitto\mosquitto.conf" -v
but I can't see any respond
can someone help here?
There are errors in the library and I can not get out
THESE ARE MY MISTAKES
sketch_feb07a: 38: error: 'WiFiClient' does not name a type
WiFiClient espClient;
^
sketch_feb07a: 39: error: 'espClient' was not declared in this scope
PubSubClient client (espClient);
^
C: \ Users \ andreal \ Documents \ Arduino \ sketch_feb07a \ sketch_feb07a.ino: In function 'void setup_wifi ()':
sketch_feb07a: 50: error: 'WiFi' was not declared in this scope
WiFi.begin (SSID, password);
^
sketch_feb07a: 52: error: 'WL_CONNECTED' was not declared in this scope
while (WiFi.status ()! = WL_CONNECTED) {
^
Over a library found for "ESP8266wifi.h"
Used: C: \ Users \ andreal \ Documents \ Arduino \ libraries \ ESP8266wifi-master
Not used: C: \ Users \ andreal \ Documents \ Arduino \ libraries \ ESP8266WiFi
exit status 1
'WiFiClient' does not name a type