Added get_json for physical devices.  pep8 cleanup.