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?
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?
Thanks for your purchase and the support of the project!
For a Home Assistant integration, you need to fill in the information below:
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:
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
Devices & Services
Devices
And Search TPLUG01, you should see it, example below:
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?
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.
Or into MQTT Explorer
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.
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.
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ā
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ā¦