HowTo: Tasmota - Switch on socket delayed with switch on delay

In order to be absolutely sure that I have really switched off all devices (soldering iron, etc.) after leaving my workplace/desk, I have been switching the consumers at my desk via a central socket for years.

Unfortunately, this has become an annoying problem over time. Because a few consumers are connected to this central socket, which draw a very high current at the moment they are switched on. That's not necessarily always a problem. In my case, however, it is problematic because the fuse that protects the circuit on my desk is very sensitive and the associated circuit is correspondingly busy.

This means that when the central socket is switched on, the associated fuse sometimes also blows.

This is of course not further tragic since the line is not permanently overloaded. However, I was looking for an easy way to fix this problem.

The solution is a socket programmed with the Tasmota firmware, which is configured in such a way that it switches on the built-in relay with a slight delay. After switching on the power supply, this socket waits a few seconds until the connected consumers are switched on.

This socket is connected to the central socket in such a way that it is only supplied with energy after the central socket has been switched on. At the same time, I have shifted some of the consumers at my workplace/desk to the socket configured with the switch-on delay.

So if I now switch on the central socket, some of the consumers on my desk are switched on and the configured Tasmota socket is supplied with energy. This then switches on the rest of the consumers at my desk about two seconds later. As a result, the high inrush current that triggered my fuse is distributed over two switching operations and the fuse no longer triggers. 🙂

This article describes how you can configure a Tasmota socket with a switch-on delay.


Safety instructions

I know the following notes are always kind of annoying and seem unnecessary. Unfortunately, many people who knew "better" have lost eyes, fingers or other things due to carelessness or injured themselves. Data loss is almost negligible in comparison, but even these can be really annoying. Therefore, please take five minutes to read the safety instructions. Because even the coolest project is not worth injury or other trouble.
https://www.nerdiy.de/sicherheitshinweise/

Affiliate links/advertising links

The links to online shops listed here are so-called affiliate links. If you click on such an affiliate link and make a purchase via this link, Nerdiy.de will receive a commission from the relevant online shop or provider. The price does not change for you. If you make your purchases via these links, you support Nerdiy.de in being able to offer other useful projects in the future. 🙂 


Requirements

Helpful articles:
Before you can use this feature, you should have your Tasmota device installed and configured to access it over your WiFi. How to do this is described in the following articles.

In the following lists you will find all the parts you need to implement this article.

Required tool:

umberLink
1x Dupont cable  Buy at Amazon
1x USB to TTL serial adapter  Buy at Amazon

Required material:

NumberLink
1xSONOFF S26 smart socket  Buy at Amazon


How it works and the required settings

Unfortunately, there is not “one” command in Tasmota with which you can implement a switch-on delay.

However, the Tasmota firmware allows you to define your own rules. With its help, various behaviors and also a switch-on delay can be defined. Below is an explanation of a possible solution.

First, the socket is configured in such a way that the relay of the socket is always switched off after plugging it in or switching on the power supply.

To do this, you need to run the following command in the console of your Tasmota device.

PowerOnState 0

Next, you need to enable rule execution.

To do this, you need to run the following command in the console of your Tasmota device.

rule 1

Now the actual rule has to be configured.

This consists of a simple line, which, however, defines two actions that are carried out on certain events.

The first action is in the section

on system#boot do ruletimer1 3

defines and configures the socket so that as soon as the system#boot event occurs, the “ruletimer1” is set to the value 3. The ruletimer1 now runs like a stopwatch in the background and counts from three down to 0.

As soon as the timer has reached the value one, another event is triggered, which is described in section

on Rules#Timer=1 do power on endon

is defined. This causes the relay to be switched on (“power on”) when the event “Rules#Timer=1” occurs.

You must now set this rule.

To do this, you need to run the following command in the console of your Tasmota device.

rule on system#boot do ruletimer1 3 endon on Rules#Timer=1 do power on endon

You can also see the entered commands in the history of the console after entering them.


Testing the switch-on delay

To test the set rule, it is sufficient to pull the configured Tasmota plug out of the socket and plug it in again.

The socket should switch on by itself approx. 3 seconds after plugging it in. 🙂


Have fun with the project

I hope everything worked as described for you. If not or you have questions or suggestions please let me know in the comments. I will then add this to the article if necessary.
Ideas for new projects are always welcome. 🙂

PS Many of these projects - especially the hardware projects - cost a lot of time and money. Of course I do this because I enjoy it, but if you think it's cool that I share the information with you, I would be happy about a small donation to the coffee fund. 🙂

Buy Me a Coffee at ko-fi.com       

2 comments

  1. Can you bring the switch-on delay together with the schedule? The switch-on delay should also relieve the fuse, but the device to be switched is subject to a schedule. Now my device always turns on when tasmota boots even if the device is scheduled not to turn on. Do you have a solution for this?

Kommentar hinterlassen

Your email address will not be published. Erforderliche Felder sind mit * markiert

This site uses Akismet to reduce spam. Learn how your comment data is processed.