Great example have it all connected and ticking.
My ESP loses connection I think this could be my router drops from time to time.
Does the current SDK build sort out a dropped connection, I know that in the new SDK they have addressed this problem. The Arduino IDE currently uses 9.5 sdk, do you know when it will be updated to 1.0 sdk compliant?
I will add some extra code in the void loop to check connection to client first, if not try and simply re connect without logging back in to the router, if this does not work I will re connect back to router and establish a client connection.
This should tell me if it is a router dropped connection issue or simply client has lost connection. If you have any other ideas please let me know.
PS: Is there any example of receiving a message from the broker and turning on an led if it recognizes a specific message? this would be great.
Big thanks Dans