• How to install and test the Tastmota MQTT Smart Bulb


The MQTT Smart Bulb shall be configured as an "AiLight (27)" module.

The installation is done as for any other Tasmota device. However you need to be extremely careful when setting up the Wifi network, since there are no button to do a factory reset. Wrong SSID or password and the bulb is bricked! See how you can configure wifi to enable factory reset below.

To control light, you will normally use MQTT, but to test the basic functionality, it is described how to do this with the web console interface below.

Installation

For installation follow the standard procedure.

When the basic installation is done and the module is configured as AiLight you should see the following screen in your web browser:

Test the Light

Using the Toggle button will switch the white light on and off.

To test the colors press the "Console" button and test the light.

You can experiment with the commands color and dimmer. The color parameters are red, green, blue and white. Values are between 0 and 255. The dimmer is percentage with values from 0 to 100.

  • color 255,0,0,0
  • color 0,255,0,0
  • color 0,0,255,0
  • color 0,0,0,255
  • dimmer 50

WifiConfig to Enable Factory Reset

The bulb can be configured to go into AP mode if it can not find the configured Wifi network.

Go into the console and give the command

  • wificonfig 7

With this configuration it will start up in AP mode if it can not find the configured Wifi network. It will expose the network name "sonoff-xxxx". Attach to the network and in your web browser go to 192.168.4.1 to find the UI. Here you can do a "factory reset".

MQTT Setup

As a minumum configure MQTT host, user and password.

In the web browser UI go into "Configuration/Configure MQTT"

After configuring MQTT, the color command can be given on the topic cmnd/sonoff/color. E.g. to activate the green light publish the parameters 0,255,0,0

To get information from the device subscribe to "stat/sonoff/+"