HI all
I have a arduino running as a motion sensor for some lights outdoors and to trigger my security cameras
Last night I tested it and it worked perfectly, but on my way to work in the morning I noted the lights didnt turn on when i went past my sensor
I had a look at the logs and around 3am the arduino supposedly lost connection with the mqtt server and never re-connected
I tested my code again, and loaded just the basic mqtt example code, but neither of them would connect
I get an IP address, and I can ping that IP from my computer, so I know the ethernet is working somewhat properly
but all I get is the RC:-2 error when It tried to connect to the mqtt server
my server is ok as I have other devices connected to it and sending / receiving messages
Does anyone have any ideas?
Code past here: (stripped out the extra code minus the MQTT stuff, as i did that while testing and it still didnt work)