diff --git a/config/rzl.js b/config/rzl.js index 59aef6b..cc016e9 100644 --- a/config/rzl.js +++ b/config/rzl.js @@ -5,8 +5,7 @@ const config : Config = { space: { name: "RZL", color: "orange", - mqtt: "ws://192.168.178.90:1884" - //mqtt: "ws://map.rzl:1884" + mqtt: "ws://map.rzl:1884" }, topics: [ { diff --git a/types/mqtt.js b/types/mqtt.js index db989bf..f8a6197 100644 --- a/types/mqtt.js +++ b/types/mqtt.js @@ -41,13 +41,14 @@ declare module 'mqtt' { publish(topic: string, message: Buffer | string, options: ?PublishOptions, callback: any): void; // TODO: message: Buffer|string, callback..., topic array and topic object - subscribe(topic: string | Array, cb: (error: Error, granted: any) => void): void; // TODO: granted + subscribe(topic: string | Array, cb?: (error: Error, granted: any) => void): void; // TODO: granted subscribe(topic: string | Array, opts: ClientSubscribeOptions, cb: (error: Error, granted: any) => void): void; // TODO: granted on(event: "message", // TODO: packet cb: (topic: string, payload: Buffer, packet: any) => void): void; on(event: "offline", cb: () => void): void; on(event: "reconnect", cb: () => void): void; + on(event: "connect", cb: () => void): void; on(event: "close", cb: () => void): void; }