refined the event callback and added a firebase writing callback to the capture-temps.py script.