The digitalization of the agrifood market is increasingly demanding for new technologies to support its transition towards smart agriculture, a sustainable food industry, and efficient management of greenhouses and crop breeding. In this work, we aim to exploit two emerging and promising technologies with application to the early detection of stressful conditions in plants. Two high-resolution near-infrared spectrometers, spanning the range from 1350 nm to 2150 nm, were used to acquire the reflectance spectra from a pothos (Epipremnum aureum) in two different hydration conditions, i.e., normal and anomalous. Then, we trained a machine learning model, i.e., a β-variational autoencoder (β-VAE), to identify the anomalies in the hydration of the plant over three months of acquisition. We are able to show the feasibility of our proposed combination of near-infrared spectrometry and the β-VAE to accurately identify anomalies, i.e., to detect stressful conditions in plants. This contributes to the recent and promising advancements in smart agriculture, by exploiting a new generation of high-resolution, portable, and non-destructive near-infrared sensing technology and powerful machine learning data analytics.