Tell us about yourself!
A Simple MQTT Pub/Sub Node With Arduino UNO and W5100 Ethernetshield
Dear diy_blokeThank you again for the work you've done on this instructable, it's been a massive help in getting my devices on my Home Assistant and I've finally managed to resolve the mqtt issues I was having before. In an attempt to reduce the wifi in my house I am looking to move more devices over to ethernet. I have tried to add more relays to your code but have had some strange results where both relays turn on/off and flash etc. I tried to paste the code earlier but it didn't work.
Thanks, I will look into doing so. I have included a println statement under the "if (mqttClient.connect(CLIENT_ID))" line and the serial monitor prints it so I'm assuming the connection is being made but for some reason the arduino is not talking to the Home Assistant on the Raspi. I will have to put this on the backburner for now as I'm away for 3 weeks and I'll revisit this on my return. I'll let you know how I get on....or give up if it drives me too insane!
Thanks for looking into this for me. I think I know what the problem is...I am using a local mqtt server but the IDE code does not include the "username" and "password".I have added them to your client connect line:if (mqttClient.connect(CLIENT_ID),"username", "password")not sure if this is correct as I haven't got it to work yet?