A water harvesting device collecting water from humid air and/or fog comprising a photoactive, thermally or electrically-active, or a combination of a photoactive, thermally active and/or electrically active film deposited on a surface of the device, wherein the film comprises a compound having a ground state that reversibly converts to its activated state upon exposure to light, heat or an electric field or a combination of light, heat and/or electrical field, wherein the activated state of the compound is more polar than the ground state of the compound, wherein the photoactive, thermally or electrically-active or a combination of the photoactive, thermally active, and/or electrically-active film comprises a compound of the formula I: wherein: m is 0, 1, 2, 3 or 4; n is 0, 1, 2, 3 or 4; R is a polymer; each X is independently H or is selected from the group consisting of halo, -CN, -NO 2 , - COOH, -SH, -OH, substituted or unsubstituted C 1-6 alkyl, substituted or unsubstituted C 6-10 aryl, substituted or unsubstituted -C 1-6 alkyl-C 6-10 aryl, substituted or unsubstituted -C 1-6 alkylC(O)-, substituted or unsubstituted -C 1-6 alkylS(O) 1-2 -, substituted or unsubstituted -C 1-6 alkylNR'C(O)- and substituted or unsubstituted C 1-6 alkoxyC(NR")-; each Y is independently H or is selected from the group consisting of halo, -CN, -NO 2 , - COOH, - SH, -OH, substituted or unsubstituted C 1-6 alkyl, substituted or unsubstituted C 5-10 aryl, substituted or unsubstituted -C 1-6 alkyl-C 6-10 aryl, substituted or unsubstituted C 1-6 alkylC(O)-, substituted or unsubstituted C 1-6 alkylS(O) 1-2 -, substituted or unsubstituted C 1-6 alkylNR'C(O)- and substituted or unsubstituted C 1-6 alkoxyC(NR")-; Z is -O-, -S-, -C(O)-, -C(S)-, -C(NR')-, -S(O) 1-2 -, -NR'- and -CR'R"-; and R' and R" are each independently selected from the group consisting of H, substituted or unsubstituted C 1-6 alkyl and substituted and unsubstituted -C 1-6 alkyl-C 6-10 aryl, wherein the polymer film is deposited on a surface of a base material, the base material is a part of the device and wherein the base material comprises a series of panels to collect the water, or a panel that comprises tiles, such as roofing tiles, to collect the water. m is 0, 1, 2, 3 or 4; n is 0, 1, 2, 3 or 4; R is a polymer; each X is independently H or is selected from the group consisting of halo, -CN, -NO 2 , - COOH, -SH, -OH, substituted or unsubstituted C 1-6 alkyl, substituted or unsubstituted C 6-10 aryl, substituted or unsubstituted -C 1-6 alkyl-C 6-10 aryl, substituted or unsubstituted -C 1-6 alkylC(O)-, substituted or unsubstituted -C 1-6 alkylS(O) 1-2 -, substituted or unsubstituted -C 1-6 alkylNR'C(O)- and substituted or unsubstituted C 1-6 alkoxyC(NR")-; each Y is independently H or is selected from the group consisting of halo, -CN, -NO 2 , - COOH, - SH, -OH, substituted or unsubstituted C 1-6 alkyl, substituted or unsubstituted C 5-10 aryl, substituted or unsubstituted -C 1-6 alkyl-C 6-10 aryl, substituted or unsubstituted C 1-6 alkylC(O)-, substituted or unsubstituted C 1-6 alkylS(O) 1-2 -, substituted or unsubstituted C 1-6 alkylNR'C(O)- and substituted or unsubstituted C 1-6 alkoxyC(NR")-; Z is -O-, -S-, -C(O)-, -C(S)-, -C(NR')-, -S(O) 1-2 -, -NR'- and -CR'R"-; and R' and R" are each independently selected from the group consisting of H, substituted or unsubstituted C 1-6 alkyl and substituted and unsubstituted -C 1-6 alkyl-C 6-10 aryl, wherein the polymer film is deposited on a surface of a base material, the base material is a part of the device and wherein the base material comprises a series of panels to collect the water, or a panel that comprises tiles, such as roofing tiles, to collect the water. <EOS>