In 2013 I created a system which would automatically send out a Tweet when Blackpool Makerspace opened or closed. It would also include the current temperature within the Tweet.
I used an Arduino Uno with an Ethernet Shield, an LDR (Light Dependent Resistor), and a DS18B20 temperature sensor. The sensors were connected on a temporary breadboard.
This device was stored in a room which did not receive any natural light which meant only the lights being switched on would trigger the LDR.
The Arduino would push the current temperature and light level to Google Appengine regularly via HTTP. Code running on Appengine would detect when the light had changed from low to high (or vice versa) and then trigger a Tweet.
The Tweet code could have been implemented directly on the Arduino but I chose not to do this due to the potential security implications.
There is a small writeup about this project on the Blackpool Makerspace Website but it appears some of the code was corrupted and also isn't formatted correctly.