ESP-Easy and Home assistant

Hi, I am having real problems in setting this up. Does any one have a guide at all? I am using my own mqtt. I can provied more details later to see what its not working, but was wondering if anyone has a guide. I am using a NODEMCU. The commands send, but never apper in the console, and no change of state.

I currently have a LED installed on D6 and GND (with a resistor) but it never comes on.

Would someone mind helping me. :slight_smile:

I also use ESPEasy / nodemcu / MQTT

Your biggest help will come from using an app that monitors / sends MQTT messages. It will let you know what is being sent and where.
If you use Chrome, give MQTT lens a go.

By default ESPEasy uses the format

/Unit name/device name/value name

As a very basic test to check your config, you should be able to toggle the nodemcu onboard led by sending 0 to
/Your device name/gpio/2
and 1 to turn it off.

Thanks for you reply.

Thats what i have in my config. nodemcu/GPIO/2 then the 1 and 0 to turn off and on, however nothing happens, or appears in the comm log. I tried mqtlens, but it always displays as disconnected.

also. My nodemcu is called “nodemcu” is that the deivce name or unit name. I feel im so close!

Sounds like you’ve got issues connecting to your MQTT broker.
Restart the nodemcu then check the log under advanced tab to see if it is connecting.
Are you using a username & password on your broker ? Are you using the default port number ?
Are you sure the broker is running ?

Could it be that you just need the / in front of nodemcu. ESPeasy needs that.

Doesn’t need it, but set up that way by default, so yes it’s needed unless you change the format.

But if mqttlens isn’t connecting to your broker you have other issues.

What is odd is that if i check the comm on boot up of the Node is says connected to broker. which is the RPI running homeassistant.

In the config file i just have

mqtt:

Does this mean you are using a separate MQTT broker, and not the one built into HA?
If that’s the case then simply adding mqtt: to the HA configuration file is not sufficient. That line activates the built in MQTT broker. So, it sounds as if the ESP device is now talking to one broker while HA is listing to the other.
Please have another look at the documentation to connect HA to the MQTT broker that the ESP device is connected to.

Hi, I use the one that’s built into the HA. I have had an embarrassing realization that i might have installed the LED incorrectly anyway.
I thought D4,D5 etc was GPIO 4,5. So i think i should set the this correctly first.