Theengs Plug - BLE Gateway 90 devices supported + Smart plug + Energy consumption

I wanted to open a thread about this as I see other threads dedicated to Smart Plugs.

The first product powered by OpenMQTTGateway out of the box.

The plug is available for North American customers and can:

  • Act as a Bluetooth Gateway to retrieve data from more than 70 sensors
  • Be controlled remotely
  • Measure the energy consumption of the plugged device

Theengs Plug hardware is UL certified with a one-year warranty.
Price: 39.90USD

The plug and the BLE devices are auto-discovered by HA, and YAML configuration is not required

Plug controls and sensors:

Example of sensor retrieved by the plug

image

image

Feel free to ask here, by PM, or email [email protected] if you have any questions.

1 Like

hi @1technophile ! I was thinking of using Theengs Plug - ESP32 BLE MQTT gateway outside HA.
More specifically, using vanilla MQTT to control it after the initial setup. Is there any documentation or codebase I could look at in order to know how to do that? I am just looking for basic pub that would allow me to toggle on/off of power on what I have plugged into it.

I suspect it supports OTA, right? Any info on how to do that as well?

Thanks!
ā€“flaviof

1 Like

Hi @flaviof

The plug uses the codebase of OpenMQTTGateway, if you are not using HA you can use these commands:
ON

mosquitto_pub -t home/112233445566/commands/MQTTtoONOFF -m '{"cmd":1}'

OFF

mosquitto_pub -t home/112233445566/commands/MQTTtoONOFF -m '{"cmd":0}'

The plug will report back the status to:

home/112233445566/ONOFFtoMQTT
{"cmd":0}

Yes it supports OTA with the following methods:

  • With version 1.5.0 and above, directly from HA as a device Control
    image

  • From the wifi configuration portal, you can click on Update on the first page and choose a new binary

  • With an MQTT command

  • With PlatformIO, if you are on the same network

Hi. thanks for this topic.
I have a theengs plug i purchased some time ago but never did anything with itā€¦ until now!

I donā€™t know much about HA; I had set it up just recently to control a midea air conditioner and that seems to work fine, using georgezhao2010ā€™s midea_ac_lan custom integration.
The particular model of ac i have does not have any power consumption or monitoring data; so remembering i have theengs plug; it seems like i should be able to use that and have both integrated into HA.

I have installed the MQTT broker on my raspberry pi 3 following these instructions, and created a user/password.
I believe I have configured theengs plug by putting it into AP mode, connecting to it, and filling in my ssid, etc. [as seen in the quick start guide here]. Theengs appears to be connected to my LAN (i can ping it). There are some other fields in the configuration i didnā€™t put anything in (something about certs, iirc), i left unchecked the checkbox relating to security

I added MQTT to HA, and gave it the ip address and username/password.
I am now unsure how to proceed or what to do with HA?

Hello,

Thanks for your purchase and the support of the project! :grinning:

For a Home Assistant integration, you need to fill in the information below:

image

  • SSID: Your wifi access point name
  • Password: Your Wifi access point password
  • mqtt server: the IP address of Home Assistant
  • mqtt port: can remain at 1883
  • mqtt user: a user created into Home Assistant
  • mqtt password: the password of the user created above

The rest is not necessary for a standard installation.

Once you have done this, you tap Save, and after around 10 seconds, the plug network LED should switch from orange to green, blinking blue:

image

If not the case, it is likely due to incorrect settings entered or an issue with the Home Assistant configuration.
You can reset the plug with a long press and retry.

If you have the green LED, you are connected!!

You can now go to HA ā†’ Settings

image

Devices & Services

image

Devices

image

And Search TPLUG01, you should see it, example below:

Click on it, and you will have access to the Device controls and information:

You can add this to a dashboard or leverage the information into automation.

If you have Bluetooth devices recognized by the plug (list below):

You will find those devices in the same Devices section:

image

Let me know if it helps, or if you have more questions, do not hesitate.

For more information, here is the user manual link:
https://tplug01.theengs.io/#all-in-one-smart-plug-easy-setup-guide

Thx. i will go back and force the plug into setup mode and re-do ā€“

but tell me, is there a key to the color/behavior of the light on the unit?

my light is doing this, timing is approximate:
on (yellow, it looks like to me) for 5 seconds; off for 15 seconds ; repeats forever (apparently!).

I know itā€™s on my LAN because i can ping it, so i know the ssid and wifi password are correct.

Yes, here is the signification of the LED
https://tplug01.theengs.io/advanced/advanced.html#led-indicator-guide

From what you describe, you are connected to the Wifi but not to the broker/HA. Your best chance is, indeed to reset it and make sure your HA/broker information is correct.

yes are correct; I just realized i was in fact putting in the wrong IP address for the broker. Dā€™oh.
Problem solved! green light on plug.

so itā€™s all working ā€“ thanks for your help

by the way:
ā€œOrange (5 seconds on, 5 seconds off); The plug is disconnected from the MQTT brokerā€
In reality itā€™s off for more like 25 seconds, though; maybe a typo in the Plug documentation?

Great! Glad to hear it works. Do not hesitate if you have any other questions

Thanks for the feedback. Let me check that.

On another topic, not sure of which version you have but if you are <1.5.0 I would advise to update to a newer version:

Here is the link of the 1.6.0
https://github.com/1technophile/OpenMQTTGateway/releases/download/v1.6.0/theengs-plug-firmware.bin

There were a lot of enhancements done from the 1.3.0, and once you have a newer version the update will be easier (you will be able to do it directly from the HA interface)

ah, yes, i have v1.3.0
I see there are three options (not counting resetting it into AP mode) mentioned at that link; and that since i have the older version i cannot use either 1st or 2nd option.

I was hoping to learn something about mqtt, so used mqtt explorer to try the third option, doing the MQTT commands.
This seems to have worked fine/ except i noticed afterward i did a bad cut/paste in the topic (i duplicated ā€˜commandā€™) ā€“
home/C8F09EB946F0/commands/commands/SYStoMQTT/firmware_update

is that bad? as i said, it seems to be working ok w/HA

To verify, you can check into HA on the device panel. The version is displayed.
image

Or into MQTT Explorer
image

You can also use this option from your mobile phone as an alternative to update the firmware:
From the WifiManager portal, by uploading a binary directly to the plug

yes, definitely reporting v1.6.0
And things appear to be working fineā€¦

however, i canā€™t get this new feature to work:
" Go to your gateway IP and type admin/OTAPASSWORD."
there is nothing at port 80, i just get ā€œthe site canā€™t be reachedā€ from a web browser.

Indeed, WebUI is not available for the plug yet as indicated in the release note

I already had a couple of switchbot temp/humidty sensors.
I was impressed/amazed/suprised that the Plug simply found them, and HA magically started to display the data without any further configuration.

2 Likes

The beauty of autodiscovery :grinning: , same behavior with the 70s other sensors supported!

3 Likes

I am excited for them to come back in stock!

1 Like

the main reason I started using the Plug was itā€™s ability to monitor power (watts, at the moment) to whatever is plugged into it.
Thatā€™s working great ā€“ graphs over time. Very slick.
But how do i get HA to tell me energy consumed, i.e. how many kWhrs per day or whatever period

ā€œwatts measure the power it takes for a device to function and watt-hours measure the energy consumed by that device over a certain period of timeā€

1 Like

got it. yes, that Riemann sum is what i was looking for. Thx!

Hi!
I got a couple (more) switchbots.
These are indoor/outdoor w/o display.
However they havenā€™t been ā€œAuto discoveredā€ by HA.
They are showing up just fine looking at mqtt explorer.

I would have imagined I would be able go to the devices page for the Plug, and add a device. However when I do that, it just says ā€œAlready configured. Only a single configuration possibleā€ā€¦ So Iā€™m doing something wrongā€¦

How do I get these new devices to pop up in HA?

https://www.amazon.com/SwitchBot-Hygrometer-Thermometer-Bluetooth-Refrigerator/dp/B0BVLYPYT1

P.S. the link here https://www.theengs.io/ thatā€™s supposed to lead to the list of 70 devices is 404.