Files
python/meshtastic
SpudGunMan c44f9b1bb4 Add Channel Hash Utility to Node class
### Summary

- Added a new method `get_channels_with_hash()` to the `Node` class.
- This method returns a list of dictionaries, each containing the channel index, role, name, and a hash value derived from the channel name and PSK.
- The hash is calculated using the existing `generate_hash` utility, ensuring consistency with other parts of the codebase.
- This utility makes it easier to programmatically access channel metadata, including a unique hash, for scripting, debugging, or integration purposes.

### Motivation

- The protobuf `Channel` objects do not include a hash value by default.
- This addition provides a Pythonic, easy-to-use way to access channel info and a unique hash for each channel, which can be useful for diagnostics, scripting, or UI display.

### Example Usage

```python
channels = node.get_channels_with_hash()
for ch in channels:
    print(f"Index {ch['index']}: {ch['role']} name='{ch['name']}' hash={ch['hash']}")
```

### Impact

- No breaking changes; existing APIs and CLI output remain unchanged.
- The new method is additive and can be used where needed for enhanced channel introspection.
2025-10-22 10:42:54 -07:00
..
2025-08-19 22:03:37 +02:00
2024-07-11 12:19:16 -07:00
2025-09-24 21:20:49 -07:00
2025-08-06 18:21:32 +02:00
2020-04-27 16:44:41 -07:00
2025-10-22 10:42:54 -07:00
2025-08-06 18:21:32 +02:00
2025-08-06 18:21:32 +02:00
2025-08-06 18:21:32 +02:00
2025-08-06 18:21:32 +02:00