[ST Edge] •• Tasmota Edge •• for Sonoff, Tuya & many other ESP WiFi & HTTP devices - over 2000 Tasmota supported devices

Hello @hongtat. For the SR04 sensor setup. Is there a script that I can run so that the output on the WebUI and ST is as follows:


The outputs on the WebUI and ST look like this :point_down::

I was looking for a script to make the output with the above formula look something like this :point_down::

I found this on the Tasmota webpage but it did not help much. I could not figure out how this rule can be run.

Thank you in advance for your help.

hi have you tried copying the rule and pasting it to the console in tasmota ie- (from Rule1 to the last ENDON) then (Rule1 1 )to activate the rule.

Hello @montyfert. Thank you for the feedback. Yes I have run the rule in the console. The output in the console shows that it is running fine and it is giving accurate results. Please find the screenshot from the console.

On the other hand, the reading on the WebUI and ST still show distance only without a percentage.

Am I missing anything here?


Hi im new to tasmota so am unable to help with that im afraid .

This only changes the value on the event dynamically, and not the value in Tasmota WebUI, which is read by the Tasmota Edge driver.

I’ll take a look on how to implement that in the Tasmota Edge driver.

1 Like

Hello @hongtat and community members. The issue with the WebUI is kind of, sort of resolved. I found a work around with the help of Eddy from EddyD’s SmartHome channel. He has been lots of help.

The workaround was to add a rule to display the percentage or liters on a virtual button on the WebUI.

I would like to share the rules with the community for the general benefit.

In this example I have used the following parameters. 2000 Liter tank, with the sensor 30cm away from the level of the tank when it is full. The total height of a full tank is 250cm.

First rule (display the percentage of level):

ON tele-SR04#distance DO Backlog var1 %value%; event checklimit=%value%; event senddistance ENDON
ON event#checklimit>280 DO var1 280 ENDON
ON event#checklimit<30 DO var1 30 ENDON
ON event#senddistance DO Backlog SCALE1 %var1%, 280, 30, 0, 100; event pubdata ENDON
ON event#pubdata DO WebButton1 %var1%% ENDON

Second rule (display how many liters there is):

ON tele-SR04#distance DO Backlog var1 %value%; event checklimit=%value%; event senddistance ENDON
ON event#checklimit>280 DO var1 280 ENDON
ON event#checklimit<30 DO var1 30 ENDON
ON event#senddistance DO Backlog SCALE1 %var1%, 280, 30, 0, 2000; event pubdata ENDON
ON event#pubdata DO WebButton1 %var1% Liters ENDON

1 Like

On January 1, 2024, the one-time contribution fee for the ‘Pro’ edition will increase from USD$20 to USD$35 for each hub. ‘Free’ tier will be limited to 3 device creation. The ‘Pro’ edition includes unlimited devices, all features and future updates.

If I have 5 devices currently, after Jan 1, If any device has any issues, would I be able to delete and re-add the device?

You will not be able to add or re-add, if you have reached the 3 device limit on January 1, 2024 on the “Free tier”.

Hi @hongtat thanks for this awesome capability. I have a few switches configured (4 for now) and I forgot how to add a new device/IP. Looking at your instructions in the OP, I just scan for near-by devices but I don’t see a new Tasmota device show up for me to customize, etc. I just upgraded to the newest Tasmota as of today and it obviously works. I’m wondering if you/others are experiencing the same thing or do you truly see your new Tasmota edge device show up every time you scan for new devices. I obviously have Tasmota Edge device and that hub is enrolled. I do have other Tasmota switches working well w/o issues just can’t add a new one. Thanks again!

On my Smartthings the Tasmota Edge dont conect to my tasmota devices… But all devices work with IP and MQTT… Just happen this week, and I reinstall the driver but still the same…

Strange Thing :grin:

Hello @hongtat and community members. Does anyone have an idea if this driver can be configured to setup a shutter device for the following setup.

If yes, and to add some complexity. Can it be added as a shutter device along with 2 relays to control lights for example?

To add even more and more complexity. Can we build an 8 module relay to control 4 shutters for example?

Thank you.

Go to Tasmota Edge device to create a new Tasmota device.

Any network/router/IP changes? Is the IP address correct?

Sorry i may have been unclear @hongtat… this is a brand new Sonoff S31 plug that im trying to add. So no router changes. Tasmota works on it by itself w/o issues. I just cant add it via Tadmota Edge. Please see the screenshot and let me know where specifically I can add the new device. Your OP days to usa add device via ST and scan nearby (instead of using Tasmota Edge). I also dont see anything in Tasmota Edge to be able to add per the screenshot. Thanks again!

I removed Tasmota Edge and readded it. Now I see the gear and can add devices. Unfortunately it removed all of my old configured devices. Any way to change that gateway IP w/o having to reinstall Tasmota Edge and losing all old devices?

Does Tasmota Edge work with OpenBK7231T_App? It should emulate Tasmota. I have a RGBW programmed but it does not seem to able to control it from driver. OpenBK7231T_App uses the same web interfaces as Tasmota.

(GitHub - openshwprojects/OpenBK7231T_App: Open source firmware (Tasmota/Esphome replacement) for BK7231T, BK7231N, BL2028N, T34, XR809, W800/W801, W600/W601 and BL602)

This step is not necessary. Removing Tasmota Edge will remove all tasmota devices.

There is a bug in the ST app that will cause that incorrect view. You will have to clear cache/data for the ST app for it to show the correct view.

No. It doesn’t support OpenBK.

@hongtat thanks a bunch for everything! You obviously made sense and I should have thought of that myself :slight_smile: thankfully I only had like 4 devices that aren’t too hard to set back up.

Service like yours sure makes me think of buying your offering. Thanks again!


I have a ESP8266 setup to respond to GET commands as an HTTP end point. I’m using it as an RF bridge to an Arduino based RFLink, to control legacy 433Mhz switches.

I have multiple HTTP devices setup under the Edge driver (5 devices). Each device instance sends a GET request to the ESP server, with a channel number, indicating which RF command should be sent to the RFLink. Each device works reliably on their own, but if I put them in a routine (or scene), some devices do not switch on, or off.

It is random in nature. When I debug the code, it seems that the ST hub is not sending out all HTTP requests when they are in a routine/scene.

I’ve stripped back the ESP code so that it only logs GET requests (no RFLink activity) - when activated as a single device, the request comes through, when multiple devices are combined in a routine/scene then requests are missed, again seemly random. Sometimes all get though, sometimes only 1.

I’ve excluded the ESP8266 and pointed the driver to a dummy server on a laptop and look at the HTTP traffic. Same issue. When activated as a single control, the request comes through, when combined in a routine/scene then requests are missed, again seemly random.

Any ideas ?