diff --git a/ammb/meshcore_handler.py b/ammb/meshcore_handler.py index ea94c31..c0e81b0 100644 --- a/ammb/meshcore_handler.py +++ b/ammb/meshcore_handler.py @@ -254,7 +254,10 @@ class MeshcoreHandler: if raw_data: self.logger.debug("Serial RAW RX: %r", raw_data) - + # Update health on every receive + self.health_monitor.update_component( + "external", HealthStatus.HEALTHY, "Serial RX received" + ) # Decode using the selected protocol handler decoded_msg: Optional[Dict[str, Any]] = ( self.protocol_handler.decode(raw_data) @@ -433,6 +436,10 @@ class MeshcoreHandler: self._is_connected.clear() if send_success: + # Update health on every successful send + self.health_monitor.update_component( + "external", HealthStatus.HEALTHY, "Serial TX sent" + ) self.to_serial_queue.task_done() else: self.logger.error( diff --git a/examples/config.ini.example b/examples/config.ini.example index fc217dd..20dd003 100644 --- a/examples/config.ini.example +++ b/examples/config.ini.example @@ -40,7 +40,7 @@ SERIAL_BAUD_RATE = 9600 # (Use this if your device talks Text/JSON) # raw_serial: Reads raw binary/text bytes and forwards them as Hex. # (Use this for MeshCore Companion Mode or binary protocols) -SERIAL_PROTOCOL = raw_serial +SERIAL_PROTOCOL = json_newline # Use json_newline for text/JSON, raw_serial for binary/hex # --- MQTT Transport Settings ---