Skip to content

lhharry/ip_addr_send

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ip_addr_send

Automatically sends your edge device's IP address(es) to a Slack channel on boot. Useful for headless devices (Jetson Orin Nano, Raspberry Pi, etc.) where you need to know the IP without a monitor. Supports both IPv4 and IPv6.

How it works

On startup, the script waits 15 seconds for the network to stabilize, fetches both the IPv4 and IPv6 addresses (whichever are available), and posts them to a Slack channel via an Incoming Webhook.

Setup

1. Create a Slack Webhook

  1. Go to api.slack.com/appsCreate New AppFrom scratch
  2. Under Incoming Webhooks, toggle it ON
  3. Click Add New Webhook to Workspace, pick a channel, and copy the URL

2. Configure the script

Copy .env.example to .env and paste your webhook URL:

cp .env.example .env

Then edit .env:

SLACK_WEBHOOK_URL=https://hooks.slack.com/services/YOUR/WEBHOOK/URL

The .env file is gitignored and will never be committed.

3. Deploy on the device

Copy the files onto the device, then run:

bash setup_service.sh

This registers send_ip.py as a systemd service that runs automatically on every boot after the network is up.

Useful commands

sudo systemctl status send_ip    # check if it ran
sudo systemctl disable send_ip   # remove from boot
journalctl -u send_ip            # view logs

Requirements

  • Python 3
  • requests library (installed automatically by setup_service.sh)

About

This should enable your Jetson/Raspberry Pi System send you its ip address on Slack when you start the system.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors