In this paper, a sensor network architecture is presented. This work proposes an early warning system for river overflows. The sensor network consists of a river level sensor node that measures the distance between the sensor and the mass of water using a precision ultrasonic sensor. The recorded information is transmitted to a receiving node by radio frequency (915 MHz) using LoRa modulation. The receiving node is implemented in a Raspberry Pi, it processes the information in real time and publishes the alert using a social network (Twitter). Finally, a prototype of the river level node was tested, obtaining a measurement range from 20 cm to 2 m. The receiving node was located 500 m away from the sensor node, that received the data packets sent without loss of data.