diff --git a/docs/meshtastic/index.html b/docs/meshtastic/index.html index 2302c19..c66e4e8 100644 --- a/docs/meshtastic/index.html +++ b/docs/meshtastic/index.html @@ -261,7 +261,8 @@ class MeshInterface: except: logging.debug("Node without position") self._nodesByNum[node["num"]] = node - self.nodes[node["user"]["id"]] = node + if "user" in node: # Some nodes might not have user/ids assigned yet + self.nodes[node["user"]["id"]] = node elif fromRadio.config_complete_id == MY_CONFIG_ID: # we ignore the config_complete_id, it is unneeded for our stream API fromRadio.config_complete_id self._connected() @@ -310,11 +311,10 @@ class MeshInterface: if nodeNum in self._nodesByNum: return self._nodesByNum[nodeNum] else: - n = { "num": nodeNum } # Create a minimial node db entry + n = {"num": nodeNum} # Create a minimial node db entry self._nodesByNum[nodeNum] = n return n - def _handlePacketFromRadio(self, meshPacket): """Handle a MeshPacket that just arrived from the radio @@ -758,7 +758,8 @@ debugOut

except: logging.debug("Node without position") self._nodesByNum[node["num"]] = node - self.nodes[node["user"]["id"]] = node + if "user" in node: # Some nodes might not have user/ids assigned yet + self.nodes[node["user"]["id"]] = node elif fromRadio.config_complete_id == MY_CONFIG_ID: # we ignore the config_complete_id, it is unneeded for our stream API fromRadio.config_complete_id self._connected() @@ -807,11 +808,10 @@ debugOut

if nodeNum in self._nodesByNum: return self._nodesByNum[nodeNum] else: - n = { "num": nodeNum } # Create a minimial node db entry + n = {"num": nodeNum} # Create a minimial node db entry self._nodesByNum[nodeNum] = n return n - def _handlePacketFromRadio(self, meshPacket): """Handle a MeshPacket that just arrived from the radio diff --git a/setup.py b/setup.py index 5a6f9c4..4fb4e36 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ with open("README.md", "r") as fh: # This call to setup() does all the work setup( name="meshtastic", - version="0.7.6", + version="0.7.7", description="Python API & client shell for talking to Meshtastic devices", long_description=long_description, long_description_content_type="text/markdown",