Method for controlling a home automation installation comprising: - at least a transmitter device comprising: - a detection means, - a control means, - a transmission means, said transmitter device being able to be connected electrically in series to a first electric circuit comprising a monostable switch or a bistable switch, which make it possible to change the state of said first circuit from an open state to a closed state and vice versa, said transmitter device being able to function in a first chain of steps and being able to detect the change of state of said first circuit from the open state to the closed state and vice versa, - at least one receiver device able to be connected electrically in series by a connecting means to a second electric circuit comprising at least a one electric consumer unit, the method comprising at least one first chain of steps comprising: - a step of detecting (a) a change from the open state to the closed state of said first circuit, this step being performed by said detection means; - a step of generating (b) a first command of a first type, this step being performed by said control means; - a step of transmitting (c) the first command from the transmitter device to the receiver device, this step being performed by said transmission means; the method being characterised in that the first chain of steps also comprises: - a step of measuring (d) in time a period of variable duration, during which said first circuit is in its closed state, this step being performed by said control means; - a step of comparing (e) said variable duration with a predetermined fixed duration, this step being performed by said control means; - a step of generating (f) a second command of a second type when the variable duration is greater than or equal to said predetermined fixed duration and when a change from the closed state to the open state of said first circuit is detected, this step being performed by said control means; - a step of transmitting (g) the second command from the transmitter device to the receiver device, this step being performed by means of said transmission means; - a step of creating (h) a table of data in a memory, this step being performed by means of a memory unit of said transmitter device prior to the detection step (a) and; - a step of saving (i) successively in the table, for each generation of said first command and for each generation of said second command, a piece of data characterising the type of command generated, i.e. either of the first type or of the second type, this step being performed by means of said memory unit. - at least a transmitter device comprising: - a detection means, - a control means, - a transmission means, said transmitter device being able to be connected electrically in series to a first electric circuit comprising a monostable switch or a bistable switch, which make it possible to change the state of said first circuit from an open state to a closed state and vice versa, said transmitter device being able to function in a first chain of steps and being able to detect the change of state of said first circuit from the open state to the closed state and vice versa, - at least one receiver device able to be connected electrically in series by a connecting means to a second electric circuit comprising at least a one electric consumer unit, - a step of detecting (a) a change from the open state to the closed state of said first circuit, this step being performed by said detection means; - a step of generating (b) a first command of a first type, this step being performed by said control means; - a step of transmitting (c) the first command from the transmitter device to the receiver device, this step being performed by said transmission means; - a step of measuring (d) in time a period of variable duration, during which said first circuit is in its closed state, this step being performed by said control means; - a step of comparing (e) said variable duration with a predetermined fixed duration, this step being performed by said control means; - a step of generating (f) a second command of a second type when the variable duration is greater than or equal to said predetermined fixed duration and when a change from the closed state to the open state of said first circuit is detected, this step being performed by said control means; - a step of transmitting (g) the second command from the transmitter device to the receiver device, this step being performed by means of said transmission means; - a step of creating (h) a table of data in a memory, this step being performed by means of a memory unit of said transmitter device prior to the detection step (a) and; - a step of saving (i) successively in the table, for each generation of said first command and for each generation of said second command, a piece of data characterising the type of command generated, i.e. either of the first type or of the second type, this step being performed by means of said memory unit.