We have investigated the molecular, electronic and optical properties of the [Os(tpy-py) 2 ] 2+ complex (tpy-py = 4'-(4-pyridyl)-2,2':6',2''-terpyridine) and its protonated derivative [Os(tpy-pyH) 2 ] 4+ through Density Functional Relativistic calculations including Scalar and Spin Orbit corrections. The molecular geometry of the parent complex is not strongly modified by the protonation at the basic nitrogen atoms of the pyridine moieties of the terpyridine ligands in the complex. On the other hand, the optical properties of these complexes can be controlled by a change in the chemical acid-base environment, converting them into suitable materials to act as molecular switches or pH sensor devices.