Corrected import of socket.error.
Created ZWaveAPI class and add to State.