Recently I purchased a Blitzwolf SHP5 (EU smart plug with 2*USB outputs).
Blitzwolf SHP5 (Aliexpress)
I believe these steps would also work or be very similar for products from Teckin, Gosund and other Tuya plug suppliers. I wanted one because the USB outputs can be controlled independently (as a pair) of the power socket. After a couple of weeks of waiting, they arrived at my door step.
First thing I did was fire up OTA Tuya Convert (I didn’t want to use the Tuya platform) and proceeded to flash the plug directly with Tasmota. For those of you who don’t know how to do that, you can search here for good instructions from Travis/Digiblur on Youtube. I didn’t connect the plug to the smartlife app, as I didn’t want to risk a possible firmware upgrade which might block my ability to overwrite the firmware without soldering.
All went as planned, and pretty shortly, I was running a tasmota’ized SHP5.
I used the template from here to configure the plug.
https://templates.blakadder.com/blitzwolf_SHP5.html
Next, it was time to bring this into Home-Assistant (Hassio).
In my switches.yaml folder, I added the following code for both the power socket, and the USB sockets (just to clarify- despite there being 2 separate USB ports, you can only switch them both On or Off together).
As this plug will be going into our dressing area in the bedroom, I labelled the mains socket “Dressing” and the USBs “Dressing USB”.
I needed to search online to get the MQTT topics for triggering the USB. After a discussion with someone on facebook, they pointed me in the right direction, and I included “Power2” as the USB identifier.
Once this was complete, I then checked the configuration in home-assistant and restarted the server. Once it came back online, i went to the UI and added the required sensors and switches. N.B. am only using a few of these, but I’ve included all of them in the diagram so you can see exactly what you can work with:
Next as always, I headed for Node-red. Using the MQTT node I set up both the main socket and the USB sockets directly and began to test. You can see them below in the diagram. For the inject nodes I set the message type to boolean and set them to true and false respectively.
MQTT set up in Node-red
Once I confirmed these were working, I then left them there. I intend at some point to include automations but as of now, I just wanted to have smart plugs to control a lamp, as well as a couple of USB outlets to control some electrical devices we have such as ebook readers and headphones etc. I will probably add entities for these to be controlled via Alexa as and when, as I did in my previous blog post for the humidifer.
Let me know in the comments if this was useful or you’d like any more details or examples of what I am doing with my smarthome.
Andy
Share this:
- Click to email a link to a friend (Opens in new window)
- Click to share on Twitter (Opens in new window)
- Click to share on Facebook (Opens in new window)
- Click to share on WhatsApp (Opens in new window)
- Click to share on Reddit (Opens in new window)
- Click to share on Telegram (Opens in new window)
- Click to share on Pocket (Opens in new window)
- Click to print (Opens in new window)