May I suggest running a small one page web app for this? I tried a bunch of scritps/solutions, but it ended up much easier to mostly build my own thing and some libraries for the tedious stuff.
Hardware was a pi and an inexpensive honeywell that was on a local network and controlled via http.