Robert Cudmore    archive    tags    search    software

Raspberry startup tweet

Have a Raspberry send a tweet with its IP when it boots. This is incredibly useful when your Pi is headless with no monitor. There are tons of tutorials on this including one at instructables and another at opensource.

This is what you will get

Used to send email at boot but I can’t get the Pi to send email via gmail any more?

Create and configure a twitter app

Go to and make a twitter app. You will need a normal twitter account. Make sure you turn on read/write access. Once that is done, note down all the keys.

install tweepy (could also use twython)

pip install tweepy

Write a python script

Lets call it See Github Gist below.

Make the python script run at boot

Make script executable

chmod u+x

Edit crontab

sudo crontab -e

Add one line at the end of crontab

@reboot (sleep 10; python /home/pi/

Python script to tweet IP

This is taken from

Tags: linux, raspberry

©2018. Robert Cudmore.