A new family of Ru(II) polypyridyl complexes containing open-chain crown ether for Mg2+ and Ca2+ probing.