1) One may not set a Shabbos clock to turn on a coffee brewer on Shabbos, even though there may be no issue of bishul but it would certainly still be considered shehiya if not nesina l'chatchila out of fear that one would adjust the dial to raise the temperature on Shabbos- Chazon Ish O"C 38:4. Additionally Reb Moshe Feinstein zatzal writes in O"C 4:60 that a Shabbos clock may not be used to turn on an electric stove or oven because it leads to zilzul of Shabbos and would be similar to asking a non-Jew to turn on the device for you. Amira l'Akum is forbidden even if you tell him before Shabbos to do the melacha for you on Shabbos.
2) The Sefer Chassidim is siman 1146 and it is also written in the Tzavaa of R' Yehuda HaChasid in siman 20 or 23 depending on the edition. The Kaf HaChayim and Ben Ish Chai both bring this down as Halacha, as well as numerous less famous sefarim. The explanation given is that malachim or sheidim have set pathways that they travel on, and if someone were to completely close a window or door the ones who usually travel there would get nervous and annoyed and be likely to harm the one who closed their passage way or others in the house. The sefarim write that if one closes the window only temporarily it is not a problem, and if the window frame is left in place it is not considered permanent. Also, if even a very small hole is left behind there is no problem. While we do not understand these concepts, it seems the Poskim hold one should not take any risks with something R' Yehuda HaChasid considered dangerous.