retrieves json at /~/state to update leds