We present an IoT-based intelligent bed sensor system that collects and analyses respiration-associated signals for unobtrusive monitoring in the home, hospitals and care units. A contactless device is used, which contains four load sensors mounted under the bed and one data processing unit (data logger). Various machine learning methods are applied to the data streamed from the data logger to detect the Respiratory Rate (RR). We have implemented Support Vector Machine (SVM) and also Neural Network (NN)-based pattern recognition methods, which are combined with either peak detection or Hilbert transform for robust RR calculation. Experimental results show that our methods could effectively extract RR using the data collected by contactless bed sensors. The proposed methods are robust to outliers and noise, which are caused by body movements. The monitoring system provides a flexible and scalable way for continuous and remote monitoring of sleep, movement and weight using the embedded sensors.