Send Notification on Respberry pi Start to android
Python Script to send notification on raspberry pi startup
from pushover import Client
import time
import urllib2
def wait_for_internet_connection():
while True:
try:
response = urllib2.urlopen('https://google.com',timeout=1)
return
except urllib2.URLError:
pass
def main():
Client().send_message("Started OSMC", title="Yo Master!")
wait_for_internet_connection()
main()
Add following line to crontab
@reboot python /path/to/python/script
Guidelines :
- The python script will wait for the network connection to establish and then execute the command
- You need Python-Pushover pip package
- Setup your defaults in ~/.pushoverrc file