@@ -34,7 +34,7 @@ class BleAssetsEvents(_MistWebsocket):
3434 ping_timeout : int, default 10
3535 Time in seconds to wait for a ping response before considering the connection dead.
3636 auto_reconnect : bool, default False
37- Automatically reconnect on transient failures using exponential backoff.
37+ Automatically reconnect on unexpected disconnections using exponential backoff.
3838 max_reconnect_attempts : int, default 5
3939 Maximum number of reconnect attempts before giving up.
4040 reconnect_backoff : float, default 2.0
@@ -45,22 +45,22 @@ class BleAssetsEvents(_MistWebsocket):
4545 -----------
4646 Callback style (background thread)::
4747
48- ws = LocationBleAssetsEvents (session, site_id="abc123", map_id="def456")
48+ ws = BleAssetsEvents (session, site_id="abc123", map_id="def456")
4949 ws.on_message(lambda data: print(data))
5050 ws.connect() # non-blocking, runs in background thread
5151 input("Press Enter to stop")
5252 ws.disconnect()
5353
5454 Generator style (background thread)::
5555
56- ws = LocationBleAssetsEvents (session, site_id="abc123", map_id="def456")
56+ ws = BleAssetsEvents (session, site_id="abc123", map_id="def456")
5757 ws.connect(run_in_background=True)
5858 for msg in ws.receive():
5959 process(msg)
6060
6161 Context manager::
6262
63- with LocationBleAssetsEvents (session, site_id="abc123", map_id="def456") as ws:
63+ with BleAssetsEvents (session, site_id="abc123", map_id="def456") as ws:
6464 ws.on_message(my_handler)
6565 ws.connect() # non-blocking, runs in background thread
6666 time.sleep(60)
@@ -107,27 +107,33 @@ class ConnectedClientsEvents(_MistWebsocket):
107107 Interval in seconds to send WebSocket ping frames (keep-alive).
108108 ping_timeout : int, default 10
109109 Time in seconds to wait for a ping response before considering the connection dead.
110+ auto_reconnect : bool, default False
111+ Automatically reconnect on unexpected disconnections using exponential backoff.
112+ max_reconnect_attempts : int, default 5
113+ Maximum number of reconnect attempts before giving up.
114+ reconnect_backoff : float, default 2.0
115+ Base backoff delay in seconds. Doubles after each failed attempt.
110116
111117 EXAMPLE
112118 -----------
113119 Callback style (background thread)::
114120
115- ws = LocationConnectedClientsEvents (session, site_id="abc123", map_id="def456")
121+ ws = ConnectedClientsEvents (session, site_id="abc123", map_id="def456")
116122 ws.on_message(lambda data: print(data))
117123 ws.connect() # non-blocking, runs in background thread
118124 input("Press Enter to stop")
119125 ws.disconnect()
120126
121127 Generator style (background thread)::
122128
123- ws = LocationConnectedClientsEvents (session, site_id="abc123", map_id="def456")
129+ ws = ConnectedClientsEvents (session, site_id="abc123", map_id="def456")
124130 ws.connect(run_in_background=True)
125131 for msg in ws.receive():
126132 process(msg)
127133
128134 Context manager::
129135
130- with LocationConnectedClientsEvents (session, site_id="abc123", map_id="def456") as ws:
136+ with ConnectedClientsEvents (session, site_id="abc123", map_id="def456") as ws:
131137 ws.on_message(my_handler)
132138 ws.connect() # non-blocking, runs in background thread
133139 time.sleep(60)
@@ -174,27 +180,33 @@ class SdkClientsEvents(_MistWebsocket):
174180 Interval in seconds to send WebSocket ping frames (keep-alive).
175181 ping_timeout : int, default 10
176182 Time in seconds to wait for a ping response before considering the connection dead.
183+ auto_reconnect : bool, default False
184+ Automatically reconnect on unexpected disconnections using exponential backoff.
185+ max_reconnect_attempts : int, default 5
186+ Maximum number of reconnect attempts before giving up.
187+ reconnect_backoff : float, default 2.0
188+ Base backoff delay in seconds. Doubles after each failed attempt.
177189
178190 EXAMPLE
179191 -----------
180192 Callback style (background thread)::
181193
182- ws = LocationSdkClientsEvents (session, site_id="abc123", map_id="def456")
194+ ws = SdkClientsEvents (session, site_id="abc123", map_id="def456")
183195 ws.on_message(lambda data: print(data))
184196 ws.connect() # non-blocking, runs in background thread
185197 input("Press Enter to stop")
186198 ws.disconnect()
187199
188200 Generator style (background thread)::
189201
190- ws = LocationSdkClientsEvents (session, site_id="abc123", map_id="def456")
202+ ws = SdkClientsEvents (session, site_id="abc123", map_id="def456")
191203 ws.connect(run_in_background=True)
192204 for msg in ws.receive():
193205 process(msg)
194206
195207 Context manager::
196208
197- with LocationSdkClientsEvents (session, site_id="abc123", map_id="def456") as ws:
209+ with SdkClientsEvents (session, site_id="abc123", map_id="def456") as ws:
198210 ws.on_message(my_handler)
199211 ws.connect() # non-blocking, runs in background thread
200212 time.sleep(60)
@@ -241,27 +253,33 @@ class UnconnectedClientsEvents(_MistWebsocket):
241253 Interval in seconds to send WebSocket ping frames (keep-alive).
242254 ping_timeout : int, default 10
243255 Time in seconds to wait for a ping response before considering the connection dead.
256+ auto_reconnect : bool, default False
257+ Automatically reconnect on unexpected disconnections using exponential backoff.
258+ max_reconnect_attempts : int, default 5
259+ Maximum number of reconnect attempts before giving up.
260+ reconnect_backoff : float, default 2.0
261+ Base backoff delay in seconds. Doubles after each failed attempt.
244262
245263 EXAMPLE
246264 -----------
247265 Callback style (background thread)::
248266
249- ws = LocationUnconnectedClientsEvents (session, site_id="abc123", map_id="def456")
267+ ws = UnconnectedClientsEvents (session, site_id="abc123", map_id="def456")
250268 ws.on_message(lambda data: print(data))
251269 ws.connect() # non-blocking, runs in background thread
252270 input("Press Enter to stop")
253271 ws.disconnect()
254272
255273 Generator style (background thread)::
256274
257- ws = LocationUnconnectedClientsEvents (session, site_id="abc123", map_id="def456")
275+ ws = UnconnectedClientsEvents (session, site_id="abc123", map_id="def456")
258276 ws.connect(run_in_background=True)
259277 for msg in ws.receive():
260278 process(msg)
261279
262280 Context manager::
263281
264- with LocationUnconnectedClientsEvents (session, site_id="abc123", map_id="def456") as ws:
282+ with UnconnectedClientsEvents (session, site_id="abc123", map_id="def456") as ws:
265283 ws.on_message(my_handler)
266284 ws.connect() # non-blocking, runs in background thread
267285 time.sleep(60)
@@ -310,27 +328,33 @@ class DiscoveredBleAssetsEvents(_MistWebsocket):
310328 Interval in seconds to send WebSocket ping frames (keep-alive).
311329 ping_timeout : int, default 10
312330 Time in seconds to wait for a ping response before considering the connection dead.
331+ auto_reconnect : bool, default False
332+ Automatically reconnect on unexpected disconnections using exponential backoff.
333+ max_reconnect_attempts : int, default 5
334+ Maximum number of reconnect attempts before giving up.
335+ reconnect_backoff : float, default 2.0
336+ Base backoff delay in seconds. Doubles after each failed attempt.
313337
314338 EXAMPLE
315339 -----------
316340 Callback style (background thread)::
317341
318- ws = LocationDiscoveredBleAssetsEvents (session, site_id="abc123", map_id="def456")
342+ ws = DiscoveredBleAssetsEvents (session, site_id="abc123", map_id="def456")
319343 ws.on_message(lambda data: print(data))
320344 ws.connect() # non-blocking, runs in background thread
321345 input("Press Enter to stop")
322346 ws.disconnect()
323347
324348 Generator style (background thread)::
325349
326- ws = LocationDiscoveredBleAssetsEvents (session, site_id="abc123", map_id="def456")
350+ ws = DiscoveredBleAssetsEvents (session, site_id="abc123", map_id="def456")
327351 ws.connect(run_in_background=True)
328352 for msg in ws.receive():
329353 process(msg)
330354
331355 Context manager::
332356
333- with LocationDiscoveredBleAssetsEvents (session, site_id="abc123", map_id="def456") as ws:
357+ with DiscoveredBleAssetsEvents (session, site_id="abc123", map_id="def456") as ws:
334358 ws.on_message(my_handler)
335359 ws.connect() # non-blocking, runs in background thread
336360 time.sleep(60)
0 commit comments