-->
Page 1 of 25

MQTT Commander - an Android Application

PostPosted: Wed Jul 08, 2015 7:43 am
by kas
This simple App can switch a light bulb or any appliance from anywhere in the world, using an Android smartphone

Image
to implement the project first start using a standard PC MQTT client to drive MQTTled.ino demo sketch


The demo esp8266 board

Image
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
Code: Select allconst 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

:idea: Credit to biobier for the Button management coding :idea:


MQTT broker
Choose and configure a mqtt broker (I use CloudMQTT)
Image

MQTT test client
To test your setup, download and configure a standard MQTT client (I use MQTT-spy)
Image
Make sure to subscribe to 'led' and 'feedback'


Installing the Android App
Finally get MQTT Commander App, and configure both Connection and Session pages,
Image
You are now ready to go ;)


Image>> 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
Image

I am baffled by this new cute WiFi device, and may end up developing a joystick application similar to Joystick Bluetooth Commander

.

Re: MQTT Commander - an Android Application

PostPosted: Wed Jul 08, 2015 8:13 am
by j0hncc
Where do you get the Android MQTT Commander? I don't find it on the google app store.

Re: MQTT Commander - an Android Application

PostPosted: Wed Jul 08, 2015 8:31 am
by kas
j0hncc wrote:Where do you get the Android MQTT Commander? I don't find it on the google app store.

Hi j0ncc
Just re read my post, the answer is there ;)

Re: MQTT Commander - an Android Application

PostPosted: Wed Jul 08, 2015 8:45 am
by j0hncc
Ok, I will be looking forward to the release of your app! I would be happy to help beta test it as well...

Cheers,
John