Big progress, can connect

pull/9/head
Jeremiah K 2023-11-26 15:51:34 -06:00
rodzic f5f25e967c
commit 709302b767
3 zmienionych plików z 5 dodań i 3 usunięć

Wyświetl plik

@ -4,7 +4,7 @@ import time
def execute_meshtastic_command(options):
"""Execute a meshtastic command with the given options."""
command = ["meshtastic", "--set"] + options.split()
command = ["meshtastic", "--host", "mmrelaydevice", "--port", "4403"] + options.split()
subprocess.run(command)
time.sleep(30) # Pause for 30 seconds

Wyświetl plik

@ -1,5 +1,5 @@
#!/bin/bash
/home/mesh/.local/bin/wait-for-it.sh mmrelaynode:4403 -t 60
/home/mesh/.local/bin/wait-for-it.sh mmrelaydevice:4403 -t 60
python3 command_wrapper.py
python3 conf_wrapper.py
python3 main.py

Wyświetl plik

@ -16,6 +16,7 @@ services:
environment:
MESHTASTIC_COMMAND_1: "--set-owner 'LongName' --set-owner-short 'SHRT' --set-url https://meshtastic.org/e/#CgMSAQESDAgBOAFAA0gBUB5oAQ"
MESHTASTIC_COMMAND_2: "--set mqtt.enabled true --set mqtt.address mqtt.meshtastic.org --set mqtt.username meshdev --set mqtt.password large4cats"
MESHTASTIC_COMMAND_3: "--ch-set uplink_enabled true --ch-set downlink_enabled true --ch-index 0"
# You can add as many MESHTASTIC_COMMAND_X as you need, they will be executed in order with a 30 second delay between or add all your setup in one command.
mmrelayapp:
@ -29,7 +30,8 @@ services:
- mesh:/home/mesh
networks:
- mesh
entrypoint: [ "sh", "-c", "sh /home/mesh/.local/bin/wait-for-it.sh mmrelaynode:4403 -t 60 && python3 command_wrapper.py && python3 conf_wrapper.py && python3 main.py" ]
#entrypoint: [ "sh", "-c", "sh /home/mesh/.local/bin/wait-for-it.sh mmrelaydevice:4403 -t 60 && python3 command_wrapper.py && python3 conf_wrapper.py && python3 main.py" ]
entrypoint: [ "bash", "-c", "entrypoint.sh" ]
environment:
MATRIX_HOMESERVER: "https://example.matrix.org"
MATRIX_ACCESS_TOKEN: "your_access_token"