Monitoring Meshtastic channel via API?

It’s not the main purpose of MMRelay (Github repo link), but you can view the raw packets in a terminal with the debug plugin.

2023-09-23 08:32:36 -0500 DEBUG:Plugin:debug:Packet received: {'from': 862627113, 'to': 4294967295, 'decoded': {'portnum': 'TELEMETRY_APP', 'payload': b'\r\xf4\xe8\x0ee\x12\x0c\x08c\x15\x1dZ\x84@%:m\xb0>', 'telemetry': {'time': 1695475956, 'deviceMetrics': {'batteryLevel': 99, 'voltage': 4.136, 'airUtilTx': 0.34458333}}}, 'id': 1835699875, 'rxTime': 1695475956, 'hopLimit': 3, 'priority': 'MIN', 'fromId': '!336aa529', 'toId': '^all'}
2023-09-23 08:32:52 -0500 INFO:Meshtastic:Processing inbound radio message from !315501e4 on channel 3
2023-09-23 08:32:53 -0500 DEBUG:Plugin:debug:Packet received: {'from': 827654628, 'to': 4294967295, 'channel': 3, 'decoded': {'portnum': 'TEXT_MESSAGE_APP', 'payload': b'Testing debug plugin', 'text': 'Testing debug plugin'}, 'id': 954031765, 'rxTime': 1695475972, 'rxSnr': 8.75, 'hopLimit': 3, 'rxRssi': -96, 'fromId': '!315501e4', 'toId': '^all'}

While the app uses the meshtastic python API there are errors that are produced that can be ignored, but you’ll be able to see full packets and you can save the output to a file.

More about MMRelay in the Discourse post: