Internet of Things (IoT) technologies represent the future challenges of computing and communications. They can also be useful to improve traditional farming practices worldwide. Since the areas where agricultural land is located in remote places, there is a need for new technologies. These technologies must be suitable and reliable for communication over long distances and, at the same time, consume little energy. In particular, one of these relatively new technologies is the LoRa communication protocol, which uses long waves to work over long distances. This is extremely useful in agriculture, where the communicating areas are broad fields of crops and greenhouses. This study developed a greenhouse monitoring system based on LoRa technology, designed to work over long distances. The edge computing paradigms with a machine learning mechanism are proposed to analyze and control the state of the greenhouse, and in particular, to reduce the mount of data transmitted to the server. © 2020, Springer Nature Switzerland AG.