path_hash_mode converting 2B->1B #68

Closed
opened 2026-10-27 09:31:24 +01:00 by adam · 0 comments
Owner

Hi,

im not sure if it's designed like that on purpose or it is a bug, anyway.
I wanted to pass repeater any transmission as it comes (1B,2B,3B) without making conversion.

So after looking through code and just changed

index b131f70..232b9d6 100644
--- a/./config_manager.py
+++ b/usr/local/lib/python3.11/dist-packages/repeater/repeater/config_manager.py
@@ -105,7 +105,7 @@ class ConfigManager:
             if 'mesh' in sections and self.daemon and hasattr(self.daemon, 'dispatcher'):
                 mesh_cfg = self.daemon.config.get("mesh", {})
                 path_hash_mode = mesh_cfg.get("path_hash_mode", 0)
-                if path_hash_mode not in (0, 1, 2):
+                if path_hash_mode it not None and path_hash_mode not in (0, 1, 2):
                     logger.warning(
                         f"Invalid mesh.path_hash_mode={path_hash_mode}, must be 0/1/2; using 0"
                     )

i used dev branch dd8d3577

just as ref here is that line:
https://github.com/rightup/pyMC_Repeater/blob/3010703e1bf04b1c1f30ccf566f398b2402ad943/repeater/config_manager.py#L108

where in config.yaml i used None as value for path_hash_mode.

Need more testing with companions but in mesh analyzer now it seems to work as i wanted as i tested both 1B and 2B scenarios.

Edit: hm, okay. It didnt fix it.

Hi, im not sure if it's designed like that on purpose or it is a bug, anyway. I wanted to pass repeater any transmission as it comes (1B,2B,3B) without making conversion. So after looking through code and just changed ```diff index b131f70..232b9d6 100644 --- a/./config_manager.py +++ b/usr/local/lib/python3.11/dist-packages/repeater/repeater/config_manager.py @@ -105,7 +105,7 @@ class ConfigManager: if 'mesh' in sections and self.daemon and hasattr(self.daemon, 'dispatcher'): mesh_cfg = self.daemon.config.get("mesh", {}) path_hash_mode = mesh_cfg.get("path_hash_mode", 0) - if path_hash_mode not in (0, 1, 2): + if path_hash_mode it not None and path_hash_mode not in (0, 1, 2): logger.warning( f"Invalid mesh.path_hash_mode={path_hash_mode}, must be 0/1/2; using 0" ) ``` i used dev branch dd8d3577 just as ref here is that line: https://github.com/rightup/pyMC_Repeater/blob/3010703e1bf04b1c1f30ccf566f398b2402ad943/repeater/config_manager.py#L108 where in config.yaml i used None as value for path_hash_mode. Need more testing with companions but in mesh analyzer now it seems to work as i wanted as i tested both 1B and 2B scenarios. Edit: hm, okay. It didnt fix it. <!-- github-sync-id:4171608476 -->
adam closed this issue 2026-10-27 09:31:24 +01:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/pyMC_Repeater#68