meshtastic / python

The Python CLI and API for talking to Meshtastic devices
https://meshtastic.org
404 stars 170 forks source link

[Bug]: remote_hardware configuration errors and exceptions #430

Closed mverch67 closed 1 year ago

mverch67 commented 1 year ago

There are a couple of issues with remote_hardware module configuration :-

1: local get/set fails

$ meshtastic --set remote_hardware.enabled true
Connected to radio
Set remote_hardware.enabled to true
Writing modified preferences to device
Error: No valid config with name remote_hardware

2: remote get throws exception (true for all modules with snake_case):

$ meshtastic --dest \!55c607dc --get remote_hardware
Connected to radio
Requesting current config from remote node (this can take a while).

ERROR file:stream_interface.py __reader line:171 Error while handling message from radio 'NoneType' object has no attribute 'name'
Traceback (most recent call last):
  File "/home/manuel/Documents/PlatformIO/Projects/python-fork/meshtastic/stream_interface.py", line 169, in __reader
    self._handleFromRadio(self._rxBuf[HEADER_LEN:])
  File "/home/manuel/Documents/PlatformIO/Projects/python-fork/meshtastic/mesh_interface.py", line 581, in _handleFromRadio
    self._handlePacketFromRadio(fromRadio.packet)
  File "/home/manuel/Documents/PlatformIO/Projects/python-fork/meshtastic/mesh_interface.py", line 767, in _handlePacketFromRadio
    handler.callback(asDict)
  File "/home/manuel/Documents/PlatformIO/Projects/python-fork/meshtastic/node.py", line 92, in onResponseRequestSettings
    config_values = getattr(self.moduleConfig, config_type.name)
                                               ^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'name'
Completed getting preferences

3: export / import is not working for remote_hardware

mverch67 commented 1 year ago

This issue can be closed as it is fixed in 2.1.2 by #431