Quick code snippet to control my room appliances though a Raspberry Pi server running Sinatra