diff --git a/src/client/CloudClient.ts b/src/client/CloudClient.ts index 18904d4..6ff94c6 100644 --- a/src/client/CloudClient.ts +++ b/src/client/CloudClient.ts @@ -17,7 +17,7 @@ export class CloudClient implements ICloudClient { private options: CloudOptions = { ssl: false, - host: 'wss.iot.arduino.cc', + host: 'wss-vernemq-production-omega-1858855899.us-east-1.elb.amazonaws.com', port: 8443, token: undefined, useCloudProtocolV2: true, diff --git a/src/connection/Connection.ts b/src/connection/Connection.ts index 8a00540..311a520 100644 --- a/src/connection/Connection.ts +++ b/src/connection/Connection.ts @@ -11,6 +11,7 @@ const BaseConnectionOptions: Partial = { clean: true, keepalive: 30, properties: {}, + rejectUnauthorized: false, protocolVersion: 4, connectTimeout: 30000, }; @@ -44,6 +45,8 @@ export class Connection implements IConnection { username: userId, password: token, }; + console.log(userId); + const connection = new Connection(); connection.client = mqtt.connect(`wss://${host}:${port}/mqtt`, {