Wireless sensor network (WSN) is applied in agriculture for collection sensor data and control devices. WSN allows deployment in multiple climatic different conditions and dangerous. We are successful integration this technology into this project. The sensor nodes and gateway were designed in which able to collect data and control electrical devices inside a greenhouse throughout wireless network. The proposed gateway is used to collect data of sensors and send to a database at remotely physical server or Amazon cloud (Dynamod DB) by using Zigbee (CC2530 Chip)/Lora (SX2178 Chip) and the internet network. The sensor nodes have been used to monitor conditions in the air (temperature, humidity, sun-light) inside a greenhouse or the parameters of water (pH, Dissolved Oxygen, Electrical conductivity).