Device (MC) for domestic or industrial heating boilers or thermic generators , the boiler or generator comprising an input pipe for water to be heated, and a heated-water output pipe , a fluid-fuel inlet pipe for heating the water, the device comprising sensors for measuring the water's flow rate and temperature in the input pipe . sensors for measuring the water's flow rate and temperature in the output pipe . a sensor for measuring the fluid-fuel's flow rate in the fluid-fuel input pipe , an electronic circuit connected to the sensors (22, 28, 32, 42, Z 48) configured to detect the data output thereof, the electronic circuit being configured to calculate from the output data two information or parameters, i.e. the potential energy-contribution of the fluid fuel within a unit of time, and the caloric energy transferred from the boiler to the outgoing water during that unit of time, characterized in that the circuit is interfaced with first means adapted to allow a manual release of the boiler , and second means for imposing a reduction of the working temperature of the boiler ; and the circuit is configured to - compare said two information, and - by means of mathematical or logic functions - calculate a deviation (S) thereof to compare it with preset or programmable thresholds, and, if the deviation (S) is greater than a threshold, to activate the second means for reducing the gas flow in order to bring the boiler to a desired condition of minimum operation, and to detect the condition of the first means to verify a user action thereupon, and if the circuit detects a user action, to restore the normal operation of the boiler by inhibiting the second means . an input pipe for water to be heated, and a heated-water output pipe , a fluid-fuel inlet pipe for heating the water, the device comprising sensors for measuring the water's flow rate and temperature in the input pipe . sensors for measuring the water's flow rate and temperature in the output pipe . a sensor for measuring the fluid-fuel's flow rate in the fluid-fuel input pipe , an electronic circuit connected to the sensors (22, 28, 32, 42, Z 48) configured to detect the data output thereof, the electronic circuit being configured to calculate from the output data two information or parameters, i.e. the potential energy-contribution of the fluid fuel within a unit of time, and the caloric energy transferred from the boiler to the outgoing water during that unit of time, characterized in that the circuit is interfaced with first means adapted to allow a manual release of the boiler , and second means for imposing a reduction of the working temperature of the boiler ; and the circuit is configured to - compare said two information, and - by means of mathematical or logic functions - calculate a deviation (S) thereof to compare it with preset or programmable thresholds, - compare said two information, and - by means of mathematical or logic functions - calculate a deviation (S) thereof to compare it with preset or programmable thresholds, and, if the deviation (S) is greater than a threshold, to activate the second means for reducing the gas flow in order to bring the boiler to a desired condition of minimum operation, and to detect the condition of the first means to verify a user action thereupon, and if the circuit detects a user action, to restore the normal operation of the boiler by inhibiting the second means . <EOS>