Smart Environments and Systems for Maintaining Health and Independent Living: The FARSEEING and CuPiD Projects