Using the "PULSETIME" command with the firmware Sonoff-Tasmota

3 minutes of reading
AIMS OF THE GUIDE
  • Learn to use the command "PULSETIME”Of the firmware Sonoff-Tasmota in order to drive an intelligent switch Sonoff in button / button mode (inching)
  • Difficulty level: basso
Concepts dealt with:
  • software configuration
Software components used:
  • firmware Sonoff-Tasmota installed on the switch to be configured
Physical devices used:
  • a home automation actuator ITEAD Sonoff Smart Home riproprogrammed Sonoff-Tasmota (here a MASTERGUIDE on proreimbursement orderproprogramming)
GUIDE best suited for:

All environments

Notes and disclaimer
  • qualsiasi eventuale modifica agli impianti domestici dev'essere progettata ed realizzata SOLO da personale qualificato;
  • any changes implemented in probefore is a propersonal responsibility as well as a profirst risk and danger (the contents of the present page are purely educational);
  • any changes implemented in proprior to a device it voids the guarantee, quality approvals and certifications.
Driving review: 1.1

ITEAD Sonoff Basic

The adoption of the firmware Sonoff-Tasmota on devices ITEAD Sonoff "Smart Home” enables a whole range of features that, by default, they would not be provided.

First of all, this approccio free these domotic devices from the "cage" indirectly imposed by the proditore in the exclusive use of proman app "EWeLink" to configure and control them; Furthermore, open to unexpected features (think, trivially, of the implementation of proMQTT tocollo) as well as very wide configuration possibilities, well beyond the factory ones.

The firmware Sonoff-Tasmota provides, in fact, a long list of commands which can be used to customize very punctually the behavior of the profirst device Sonoff, with different specificities from model to model (eg. it will not be possible to use the controls related to temperature and humidity management on models that do not offer these features).

ITEAD Sonoff BasicOn this occasion we will focus on the command "PULSETIME“, Which is typically appit is suitable for all models that offer the function of an intelligent switch, for example the puppy of the family, the Sonoff Basic.

"PULSETIME"Is extremely convenient also used in abbinamento a Sonoff Basic modified to "clean contact".

These devices I'm substantially able to, through manual intervention or timing (offered under "Configuration" / "Timer" of the firmware web interface) to open / close the output of the input current to the device (which can go from 90v to 220v).

The functionality is therefore that of simple intelligent switch, at the most timed.

But if we needed of a button?
A button, or button, we mean, that allows us to activate automatically the output current output for the duration of a given period of time? How can I - maybe in presence of actuator a clean contact - to do so that behaves like a button / button?

To realize this scenario, the command "comes to our aid"PULSETIME"Included in Sonoff-Tasmota, who absolves probefore this task. For the more technical, the method introduced by the command “PULSETIME"Corresponds to what in jargon is called" inching ".

The use of this command They are the following:

PulseTime<x>View the current setting in progress (default: 0)
PulseTime<x>0 / offDisables the pulsetime function for the <x> relay
PulseTime<x>1 111 ..Set the pulsetime function for the relay <x> in increments of 0,1 seconds, until 11 is set to total seconds (111)
PulseTime<x>112 64900 ..Set the pulsetime function for the relay <x> in increments of 1 second, starting from 12 seconds (add 100 to the desired interval in seconds eg. 113 = 13 seconds and 220 = 120 seconds). Nb In order for PULSETIME to work correctly, the duration of the TELEPERIOD set must be greater than the value set with PULSETIME.

La <X> rappit resets the channel number to be queried / configured, where the device in question has more than one. In case it is single channel, the value can be omitted.
The resolution of the pulse duration is 0,1 seconds up to total durations of 11 seconds; from 12 seconds up the resolution of the pulse duration is 1 second.

The command can be executed - both in interrogation and in setting - via MQTT, interface Web e via serial. More information on the command mode are available here.

To execute the command via MQTT it is sufficient to use a client connected to the same broker to which the device to be configured is connected or directly through his MQTT console present on the firmware web interface ("Console").

An example of querying the proproperty on Sonoff Basic:

cmnd/sonoff/PULSETIME

Nb. note how the value of the relay has been omitted as the Sonoff Basic is a single output channel switch.
To set a PULSETIME lasting two seconds, the command is:

cmnd/sonoff/PULSETIME 20

To set a PULSETIME lasting 30 seconds, the command is

cmnd/sonoff/PULSETIME 130

As 30 / 1 seconds = 30 + 100, as an effect of what explained above regarding the resolution of the pulse duration.

The implementation of this command will result in automatic behavior by the device that, regardless of the use made of it in home automation (via HUB personalprofirst interface, MQTT direct commands, etc.) with each activation automatically will carry out an impulse of the preset duration, to then go off.

This behavior will remain until the command is executed:

cmnd/sonoff/PULSETIME off
oppure
cmnd/sonoff/PULSETIME 0


ITEAD Sonoff BasicATTENZIONE: remember that there is on our FORUM community an ad hoc section dedicated to Sonoff (and more generally to devices ESP8266), for any doubt, question, information on the specific merit of these components.

inDomus telegram channel