Updated json output for getstate, now supports local IP detection, updated docs accordingly