to implement the project first start using a standard PC MQTT client to drive MQTTled.ino demo sketch
The demo esp8266 board
Setup the Hardware :
- One button from GPIO2 to Ground
- One led + resistor from GPIO0 to Ground
- Pull Up CH-PD pin
Upload MQTT_led_V1.06 demo sketch to the esp8266, (attached file below)
make sure you use your own router username and pass
const char* ssid = "Livebox-27C2"; // Your specific WiFi network credentials
const char* pass = "23456789";
const char* serverURI = "m20.cloudmqtt.com"; // Your specific MQTT broker parameters
const uint16_t port = 18084;
const char* user_name = "uqkfcjrz";
const char* password = "+++++++++";
const char* clientID = "MQTTkas"; // client ID
Credit to biobier for the Button management coding
MQTT broker
Choose and configure a mqtt broker (I use CloudMQTT)
MQTT test client
To test your setup, download and configure a standard MQTT client (I use MQTT-spy)
Make sure to subscribe to 'led' and 'feedback'
Installing the Android App
Finally get MQTT Commander App, and configure both Connection and Session pages,
You are now ready to go
>> Video <<
Android App and ESP8266 led are now fully synchronized
- the App button drives the board led
- a local led state change will be reflected on the Android device screen
I will post the Application on Google Play within a few weeks (as a free App)
In the meantime, to get it NOW, notify me here and drop me a Private Message including your email address.
Again, to make life easier, please make sure to have the system working with MQTT-spy, before trying MQTT Commander
This board is a proof of concept; I plan to replace the led by a 3V Opt coupler insulated relay
I am baffled by this new cute WiFi device, and may end up developing a joystick application similar to Joystick Bluetooth Commander
.