This work describes the realization of a system for tele- rehabilitation, conceived within the MyHeart EU project. Intelligent biomedical clothes, employing the technology of wearable strain sensors, support post-stroke patients while practicing partially self- sufficiently. This is made possible by novel algorithms designed to automatically recognize upper limb''s motor rehabilitation tasks in realtime, analyzing multivariate time series acquired by sensors "printed" on a close-fitting shirt. A user-friendly interface on a PC connected via Bluetooth shows to the patient in realtime the correctness and progress of each movement. Supervised classification is performed by means of dynamic time warping and outlier detection. The classifier is flexible, and suitable to customize patient-targeted exercises "by example", with the slightest effort. Accuracy, sensitivity and specificity of the system were evaluated by healthy subjects on a set of standard and functional motor exercises. Pilot tests were then done by 13 post-stroke hospitalized patients, and the system was perceived as effective and simple to use.