Skip to main content

Tasmotify a Bneta/Qualitel Smart plug

ยท 3 min read
David Bezuidenhout
Maintainer of Linuxgeek.za.net blog

Let's start.

๐Ÿ”ฉ Componentsโ€‹

You will need the following components:

This is the plugโ€‹

๐Ÿ”ฉ Flashing Tasmotaโ€‹

First up, let's program our new controller. I am using my ESP8266 development board here because it works, however I am using the pins as you can do with any other usb ttl device.

Soldering before we can program:

The programmer:

Using the esptool from Github, this is the command I used after downloading the Tasmota firmware binary.

esptool.py --port /dev/cu.usbserial-A9UD533R write_flash 0x00000 Downloads/tasmota.bin

Configurationโ€‹

I used the following template to configure the device for Tasmota:

{"NAME":"BNETA WifiPlug","GPIO":[0,288,0,32,2688,2656,0,0,2624,544,224,0,0,0],"FLAG":0,"BASE":18}

Calibrationโ€‹

The power metering also needs to be calibrated. The Tasmota documentation cover power monitoring calibration in detail, however I found that using a greasemonkey script in Tampermonkey to really fine tune this perfectly and basically, automates the calibration process apart from a few stemps, which I will quickly outline.

  1. Install tamper monkey in Chrome.
  2. Install the greasemonkey script in Tampermonkey
  3. Modify this script to whatever you will use. For example my bulb is rated 70w at 240v. So I had to put this into the script. The calibration is done based on this and the readings it get, real time.
  4. Have a way to read your current voltage from your power provider as accurate as possible. I read it from my solar inverter.
  5. Run these commands on the tasmota device in the console
    VoltageSet 233.3
    PowerSet 70.0
    Backlog VoltRes 3; WattRes 3; CurrentSet 300.171526586620926

ps. VoltageSet is the voltage you read from your meter. So sometimes I type in 235.2 or 237.8 depending on whatever eskom is pushing into the house or if you on solar what the inverter is pushing into your house. The other commands are also in the script telling you what to do. pps. You need to work out the CurrentSet according to whatever you are using. There is a formula in the script.

  1. I then click on the calibrate button and wait for it to do it's thing. Usually done within less than 2-3 minutes.

Have fun and enjoy automating!