An apparatus in a facility connectable to the end of a pipe where water is flowing, the apparatus comprising: a generator configured to generate electric power from the water passing through the generator and means for storing electricity generated by the generator, a first sensor configured to measure the temperature of the water, a processing unit and a memory operationally connected to the processing unit; a wireless transceiver operationally connected to the processing unit; the processing unit being configured to receive power from the generator and control the transceiver to transmit data to and receive data from an external device and other similar apparatuses; wherein the processing unit is configured to detect that water starts flowing in the pipe at a first time instant on the basis of a signal from the generator; initiate after the detection reception from the first sensor information on the temperature of the water, determination of the amount of water flowing in the pipe from the amount of electricity generated by the generator, and measurement of the time elapsed since the first time instant; detect that fluid stops flowing in the pipe at a second time instant on the basis of a lack of signal from the generator; calculate the total amount of fluid that flowed through the pipe between the first and the second time instants; determine the temperature of the fluid between the first and the second time: instants; store the determined values and the time elapsed between the first and the second time instants as an entry in the memory; control the transceiver to receive information on the total volume or capacity of the warm water storage of the facility from the external device; if the apparatus is the only one using warm water, activate an indicator when the used amount of warm water approaches the capacity of the warm water storage, and if there are more than one apparatus in the facility, control the transceiver to communicate with said other apparatuses for exchanging information about the used amount of warm water and the capacity of the warm water storage. a generator configured to generate electric power from the water passing through the generator and means for storing electricity generated by the generator, a first sensor configured to measure the temperature of the water, a processing unit and a memory operationally connected to the processing unit; a wireless transceiver operationally connected to the processing unit; the processing unit being configured to receive power from the generator and control the transceiver to transmit data to and receive data from an external device and other similar apparatuses; wherein the processing unit is configured to detect that water starts flowing in the pipe at a first time instant on the basis of a signal from the generator; initiate after the detection reception from the first sensor information on the temperature of the water, determination of the amount of water flowing in the pipe from the amount of electricity generated by the generator, and measurement of the time elapsed since the first time instant; detect that fluid stops flowing in the pipe at a second time instant on the basis of a lack of signal from the generator; calculate the total amount of fluid that flowed through the pipe between the first and the second time instants; determine the temperature of the fluid between the first and the second time: instants; store the determined values and the time elapsed between the first and the second time instants as an entry in the memory; control the transceiver to receive information on the total volume or capacity of the warm water storage of the facility from the external device; if the apparatus is the only one using warm water, activate an indicator when the used amount of warm water approaches the capacity of the warm water storage, and if there are more than one apparatus in the facility, control the transceiver to communicate with said other apparatuses for exchanging information about the used amount of warm water and the capacity of the warm water storage.