This paper presents a monitoring, control, and management system that allows the interoperability of multiple smart gateways in a greenhouse to bolster automatic decision making on water supplied to the crops in real-time. The system consists of several sensor nodes interconnected by Zigbee to measure ambient and soil parameters to control the greenhouse irrigation process. In addition, a web service is included to help the system manager to visualize and operate the greenhouse on a web platform. The system also supports human decision making to cope with undesirable and unexpected environmental events. Smart gateways enable data reading, storage and edge computing using automatic rules to manage actions in the greenhouse, as well as data transmission for centralized processing in cloud services. The service communication system layer is supported by choreography middleware for messaging distribution, which enables agile scalability. This research proposes a hybrid scheme and compares to a centralized scheme. The latency times in the choreography system were analyzed to find a suitable solution adapted to infrastructure deployment features. Numerical results shows that such an adaptive deployment of the irrigation services among edge and fog layers can reduce the computational load on the gateways, improve system response times, and enhance device performance.