Procedure to install Tasmota FOSS firmware on Tuya lightbulbs, configure them and set them up for use with FHEM
- Flash Tasmota firmware to lightbulb using this procedure.
- If something goes wrong during the flashing process, and lightbulb presents a "vtrust-recovery" WiFi access point, follow this procedure (connect to AP and then surf to http://10.42.42.42/undo)
- After flash is complete and lightbulb has rebooted, the bulb will present a WiFi AP named "tasmota-XXXX" or similar. Connect to the AP and surf to http://192.168.4.1 to connect to the Tasmota web interface of the bulb.
- On the web interface, click on "Configuration", then "Configure WiFi" - enter AP details of the router. Bulb restarts and connect to the router AP
- Look for the bulb's IP number in the list of DHCP leases on the router's web interface
- Surf to the bulb IP in a web browser (using http://) and continue configuration.
- Apply Template:
- Go to this page and find the type of lightbulb
- In the web interface, click on "Configuration", then "Configure Other" - copy the configuration string found in the previous step into the "Template" field, check "Activate" and save. See here for details of the procedure.
- Configure MQTT: In the web interface, click on "Configuration", then "Configure MQTT"
- Enter the local hostname of the server running FHEM (or other MQTT application). Enter port number 1883.
- Copy and paste string from "Client" to "Topic" as described here and here
- The bulb will be added by FHEM as a a device automatically
- Set Default On: In the bulb's web interface, go to the Main Menu, then "Console". Enter the following PowerOnState command: "PowerOnState 1"
This will make the lightbulb switch on by default when powered on. This allows for normal manual on/off operation of the bulb with a mechanical switch - Also enter "SetOption0 0" - this stops the bulb from saving the power state when restarting (bulb will always be in "off" state after a restart)