OptionalsubscriberId: stringOptionallimit: numberOptionalareaIds: string[]OptionalsubscriberId: stringOptionallimit: numberOptionalhyperBridge: booleanRegister a callback for PubNub status events. The callback receives
the full PubNub status object — branch on status.category (e.g.
PNReconnectedCategory, PNNetworkDownCategory).
Returns an unsubscribe function. Safe to call before subscribe() — the listener will be wired to the PubNub instance the first time subscribe() creates it.
Use case: connectivity-recovery detection. PubNub's WebSocket reconnects seconds before HTTP polling would notice that an outage has ended, so this is the fastest signal a homebridge plugin can use to decide it's safe to resume API calls.
OptionalareaIds: string[]OptionalhyperBridge: booleanOptionalhyperBridge: booleanOptionalhyperBridge: booleanStaticaddStaticaddStaticalarmStaticalarmsStaticauthorizeStaticcapabilitiesStaticdeleteStaticdetailsStaticdoorbellStaticdoorbellsStaticgetOptionalsubscriberId: stringStatichouseOptionallimit: numberStatichouseStatichousesStatichouseStaticlockStaticlockOptionalhyperBridge: booleanStaticlocksStaticpinsStaticsetStaticstatusStaticstatusOptionalhyperBridge: booleanStaticsubscribeOptionalcallback: anyStaticunlatchStaticunlatchOptionalhyperBridge: booleanStaticunlockStaticunlockOptionalhyperBridge: booleanStaticuserStaticvalidateStaticwakeup
Fully tear down this August instance: clears the session token and destroys any PubNub subscription. Call this when you're done with the instance and want to release all resources (WebSocket connection, listeners, timers).
Unlike end(), which is called internally after most API calls and only clears the HTTP auth token, destroy() also tears down the PubNub connection used by subscribe(). After destroy(), any active subscriptions on this instance are stopped.