Tweak to wiki entry to show new UI, and clarify some of the information.

Matt D 2019-08-20 20:26:15 +00:00
parent 40290ef10f
commit 8765040fb7
1 changed files with 43 additions and 7 deletions

@ -6,7 +6,10 @@ Recently I bought a very nice and compact *Smart Plug* (UK variant) from Aliexpr
Another good thing is that it is built around a ESP8266 module, which gives us the possibility to change its firmware and install Tasmota.
## Open the case
There are no visible screws, however it is not that difficult to open the case using some sharp plastic pry tool and a heat gun (hair dryer on max setting will probably also work). Heat the edge of the plug a bit, then work your way slowly, pry from the middle of each side. Then slowly slide the tool towards the corners and the case will ease enough eventually - open it with a gentle pull.
There are no visible screws, however it is not that difficult to open the case using some sharp plastic or metal pry tool and a heat gun (or hair dryer on max setting also works - hold on each side for about 20-30 seconds). Heat the edge of the plug a bit, then work your way slowly and pry from the middle of side with the button, slowly moving the tool towards the corners. It can be quite tough - **be careful and keep your fingers away from the tool you are using!**
Once you have got through the layer of adhesive you can lever the case open to dislodge the adhesive on the other sides. Be careful not to accidentally knock off the PCB supports in each corner.
Once the case is open, the top side of the PCB will be exposed:
@ -41,19 +44,52 @@ Failed to identify the module, I had remove the metal shielding cap to find the
|**13** |*Vdd* |- ||- |*GND* |**14** |
## Serial Connection
For programming you need to solder 4 jumper wires to pins *11*, *12*, *13* and *14* (*Rx*, *Tx*, *Vdd* and *GND*). Connect the other end of the wires to your USB-to-serial adapter and make sure the supply voltage selected is 3.3V. Shorting pin *7* (GPIO0) to ground while plugging the serial adapter into the computer's USB port will bring the module into UART firmware upload mode.
For programming you need to solder 4 jumper wires to pins *11*, *12*, *13* and *14*:
|Pin | Function |
|-----|----------|
|11 | Rx |
|12 | Tx |
|13 | Vdd |
|14 | Ground |
In this picture Yellow is Tx, Orange is Ground, Grey is Rx and White is Vdd:
![Jumper wires attached](https://i.imgur.com/pIHzDkg.png)
Connect the other end of the wires to your USB-to-serial adapter and make sure the supply voltage selected is 3.3V.
Shorting pin *7* (GPIO0) to ground while plugging the serial adapter into the computer's USB port will bring the module into UART firmware upload mode.
## Reassembly
Screw the PCB back to the housing, and place the PCB back into the other half of the socket. Apply a small 1mm bead of super glue around the edges and firmly clip the two halves back together again, and hold firmly for about 30 seconds to allow the glue to cure.
If you've done everything right you should have a fairly clean looking plug still with just a small amount of cosmetic scratches on the bottom side of the unit where you used the pry tool.
## Configuration
Once *Sonoff-Tasmota*'s WebUI configuration interface is loaded in the browser, you can change many settings using the menu options. Console window is where you can change almost all configuration parameters.
Enroll your plug back onto your wifi as usual for Tasmota (i.e. join the wifi network started by the plug, give it your wifi details, then restart it).
Head straight to the *Configure Module* menu, selected *'Generic'* for *'Module type'*. Here are the settings that I selected on that screen:
Once *Sonoff-Tasmota*'s WebUI configuration interface is loaded in the browser, you need to configure the template type:
![tasmota-generic-configuration](https://znanev.github.io/images/hyleton-313/tasmota-generic-configuration.jpg "Tasmota Generic configuration")
1. Go to "Configuration"
1. Go to "Configure template"
1. Create a new template that looks like this one and save it:
![Tasmota configuration](https://i.imgur.com/8lfHqhU.png)
Once you have saved the template:
1. Wait for the device to restart
1. Go to "Configuration"
1. Go to "Configure module"
1. Select the new template you just created and save.
### Note on LEDs
*Sonoff* devices usually have a bi-colour LED, but just one of the colours can be controlled directly. The other colour is usually tied together with the relay, so it cannot be controlled independently. I think that is the reason why the *Sonoff-Tasmota* firmware by default controls just *Led1* when a single relay is configured. In the configuration above, only the blue LED will be used (tied to *GPIO2*). But if you prefer the red LED, just change the values for *Led1i* and *Led2i* (select *Led1i* for *GPIO0* and *Led2i* for *GPIO2*).
### Details
If you want to read the detailed project log, you can do so on my [GitHub Blog page](https://znanev.github.io/Hyleton-313-Smart-Plug/).
## Additional Details
If you want to read a detailed project log that uses this plug, you can do so at [GitHub Blog page](https://znanev.github.io/Hyleton-313-Smart-Plug/), although some of the information is now out of date.