add support for both websocket and bluetooth