Photochromism, electrical properties, and structural investigations of a series of hydrated methylviologen halobismuthate hybrids: influence of the anionic oligomer size and iodide doping on the photoinduced properties and on the dehydration process.