Skip to content

Commit

Permalink
Merge pull request #4 from tomekmalek/master
Browse files Browse the repository at this point in the history
Replacing "_" with ":" in client_id
  • Loading branch information
tomekmalek committed Apr 13, 2022
2 parents 99c2ac9 + 7ac6a16 commit 4097458
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions LiveObjects/hal.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def get_security_level(self):

def get_client_id(self):
from LiveObjects.services import get_pycom_mac
return self.get_lang_str() + 'MQTT_' + get_pycom_mac()
return self.get_lang_str() + ':' + get_pycom_mac()


class GPy(BoardsInterface):
Expand Down Expand Up @@ -108,10 +108,10 @@ def get_security_level(self):
def get_client_id(self):
if self._net_type == BoardsInterface.WIFI:
from LiveObjects.services import get_pycom_mac
return self.get_lang_str() + 'MQTT_' + get_pycom_mac()
return self.get_lang_str() + ':' + get_pycom_mac()
elif self._net_type == BoardsInterface.LTE:
from LiveObjects.services import get_pycom_imei
return self.get_lang_str() + 'MQTT_' + get_pycom_imei()
return self.get_lang_str() + ':' + get_pycom_imei()


class Esp8266(BoardsInterface):
Expand All @@ -132,7 +132,7 @@ def get_security_level(self):

def get_client_id(self):
from LiveObjects.services import get_esp_mac
return self.get_lang_str() + 'MQTT_' + get_esp_mac()
return self.get_lang_str() + ':' + get_esp_mac()


class Win32(BoardsInterface):
Expand Down Expand Up @@ -161,7 +161,7 @@ def get_store_cert_filename(self):

def get_client_id(self):
from LiveObjects.services import get_mac
return self.get_lang_str() + 'MQTT_' + get_mac()
return self.get_lang_str() + ':' + get_mac()


class Esp32(BoardsInterface):
Expand All @@ -182,7 +182,7 @@ def get_security_level(self):

def get_client_id(self):
from LiveObjects.services import get_esp_mac
return self.get_lang_str() + 'MQTT_' + get_esp_mac()
return self.get_lang_str() + ':' + get_esp_mac()


class Linux(BoardsInterface):
Expand All @@ -207,7 +207,7 @@ def get_store_cert_filename(self):

def get_client_id(self):
from LiveObjects.services import get_mac
return self.get_lang_str() + 'MQTT_' + get_mac()
return self.get_lang_str() + ':' + get_mac()


class BoardsFactory:
Expand Down

0 comments on commit 4097458

Please sign in to comment.