Interviewing Energex outages for Meshtastic participants.
Set up a python venv and install dependencies:
python3 -m venv venv
. venv/bin/activate
pip3 install -r requirements.txtCopy the example config file and then fill it out:
cp config.json.example config.jsonYou will need to fill out each of the blank fields. Most fields should be self-explanatory, except:
- The
response_delayfield determines how long the script will wait before deciding to reply; this is used for the fail-over and should only be left at 0 for the primary bot. - The
mesh_channel_indexfield specifies in which channel slot to reply. This is 0-indexed, so your primary channel is 0, the first secondary channel is in 1, and so on. - The
mesh_addressfield specifies where to find the Meshtastic node. This should belocalhostfor Femtofox devices or the IP address otherwise.
Whilst the script should not crash, you may wish to use pm2 to ensure it is restarted after a crash and after a reboot:
pm2 start --name meshergex --interpreter $(pwd)/venv/bin/python3 $(pwd)/main.pyOtherwise, you may set it up as a systemd service or simply run it manually.