Added packet making into websocket. Added device id to settings.set. Fixed segmentation fault when ws can't connect