@@ -366,8 +366,6 @@ def __init__(self):
366
366
self ._thread = None
367
367
self ._routine = None
368
368
369
- self ._is_first_connect = True
370
-
371
369
def __del__ (self ):
372
370
373
371
self ._cbHandler .remove_listener (self ._get_control_topic_name (), self ._boHandler )
@@ -420,7 +418,6 @@ def _routine_waiting_for_control_subscription_result(self):
420
418
def _routine_connected (self ):
421
419
self ._mqtt_loop ()
422
420
self ._try_cooldown ()
423
- self ._send_publish_count_periodically ()
424
421
425
422
426
423
def _routine_rejected (self ):
@@ -537,20 +534,6 @@ def _routine_reconnect(self):
537
534
538
535
time .sleep (1.0 )
539
536
540
- def _send_publish_count_periodically (self ):
541
- if float (self ._options .publish_count_send_time_period ) > 0.0 and \
542
- (time .time () - self ._last_publish_count_send_time >= float (self ._options .publish_count_send_time_period )):
543
- current_publish_count = XivelyClient .publish_count_until_last_stat_message
544
- XivelyClient .publish_count_until_last_stat_message = 0
545
- self ._publish_device_status_data ("Publish count: " + str ( current_publish_count ), 0 , False )
546
- self ._last_publish_count_send_time = time .time ()
547
-
548
-
549
- def _publish_device_status_data (self , payload = None , qos = 0 , retain = False ):
550
- # just a forwarder function to make us able to easiliy disable device status data publishes
551
- #self.publish(self._get_device_status_topic_name(), payload, qos, retain)
552
- pass
553
-
554
537
555
538
def _mqtt_on_connected (self , previous_connection_result ):
556
539
@@ -559,14 +542,6 @@ def _mqtt_on_connected(self, previous_connection_result):
559
542
# subscribe for control topic
560
543
result , self ._control_request_id = self ._mqtt .subscribe ([(self ._get_control_topic_name (), 1 )])
561
544
562
- if self ._is_first_connect :
563
- # publish device status data
564
- self ._publish_device_status_data ("Client library version: " + XivelyClientVersion .get_version_string (), 0 , False )
565
- self ._is_first_connect = False
566
-
567
- self ._publish_device_status_data ("Last connection return code: " + str ( previous_connection_result ), 0 , False )
568
- self ._publish_device_status_data ("Backoff index: " + str ( XivelyBackoff .backoff_lut_i ), 0 , False )
569
-
570
545
# start timeout for control topic SUBACK
571
546
self ._routine = self ._routine_waiting_for_control_subscription_result
572
547
0 commit comments