Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: How do you send custom notifications to your phone?
30 points by rococode on Dec 12, 2020 | hide | past | favorite | 31 comments
Recently, I've been putting together some home automation software for myself (to manage security cameras, todo lists, etc.).

One thing I'd like to do is send notifications to my phone. There seem to be many possibilities here, none of which are perfect. It would also be nice if the same system could be used to send commands back to the server, and ideally it would be distinct from other things I use frequently so that it stands out more. I'm on Android but happy to hear how iOS folks do this too.

Some of the options I've considered:

- IFTTT - solid for notifications, can't easily do responses though, and a little too much non-code configuration for my liking

- Email - works well but not distinct enough, emails could get drowned out

- Text messages - same as email, basically

- Discord bot - good, can process replies, though I personally use Discord for other things so it'd also be not very distinct

- LINE bot - quite nice - can add a shortcut to the specific chat on Android - and handles replies but apparently has some sending limits and more info on pricing beyond that is hard to find

I'm sure other people have done similar setups before where they can write a line of code to send some info to their phone. Would love to hear about other ways of doing this!



Home Assistant is a great way to do it. It has its own automation framework but I’m sure you can easily hook in your own scripts, or write them as your own plugins for HA. You can send push notifications to the mobile apps, it even supports actions on notifications I believe, and then you can obviously send events back to the server with it as well.


Just use email, the problem you cite with it is configurable by simply using another client for these notification emails.

You can also use Telegram plus telegram IRC to use IRC bots for notification.


I wrote this module long time ago https://github.com/mraza007/terminal-text

This might help


Term text is a network-based Python CLI utility to send SMS or SMTP message. A very good template for inclusion to your project.


Yup this idea came to my head when I was exploring free alternatives to twilio and I decided to make this

I also wrote a post regarding this and I wrote this two years ago for fun and if you are interested in reading the post here is it

https://muhammadraza.me/2018/Sending-SMS-using-Python/

And I do plan on to making this better


I use Pushover (pushover.net)


Pushover is a JSON-based web API. - Just use curl, wget, or links CLI to use.


Yep. It supports several "integrations" [0], but I typically just send notifications (to my mobile devices) from shell and Python scripts running on my machines -- they even have examples on their front page.

It supports acknowledgements (for "emergency" messages, at least) but I'm not sure about arbitrary "responses" (although you can include clickable links in the notifications).

Pushover's awesome -- and made by @jcs [1] who, among other things, works on OpenBSD.

--

[0]: https://pushover.net/apps

[1]: https://jcs.org/


Also used Pushover for 4-5 years without any issues on both iOS and Android devices.


I've used pushover for this as well. Nice perk: on iOS at least you can easily define a custom image and sound to go along with your message. This is FUN to use.



Yep. One of the best $5 I've even spent.



+1 for Telegram API. App is not clunky; notifications can make sound or not; can send text, image, audio, video; has desktop app, web app, and mobile app.


I have a second phone number through the Burner app that supports incoming and outgoing webhooks and integrates with Slack, Dropbox, Google, etc.

$35/year is a pittance for the flexibility you get with a second number, the extra functionality is an added benefit.


Have a link to the app you can share?



Thank you!


Telegram is fine for a single-user setup or for a small team. If you need better multi-user and multi-channel support, you can use Slack.

Both have an easy to use bot API and both support adding action buttons to messages that you can connect to your app's webhooks.

Using a messenger, in my experience, feels more convenient than using an email client when dealing with automations. You can view messages by channel, you don't have to deal with GMail assigning random categories to your emails, and the UI is faster.


I started using discord for this. I maintain a private server which just has me and a bot. The bot does everything for me. I'm constantly adding features.


Automate is an android app with many automation features, including notifications (which can open dialogs of various kinds if desired). There is a "cloud send" with an API allowing you to send arbitrary data to your phone. Not affiliated, just a happy user.

https://llamalab.com/automate/


Disclaimer, I work for Twilio. You can use sms, voice, or email to get notifications and you can reply back and have those responses programmatically handled. The APIs are pretty decent in my opinion. I wrote a text adventure game over sms for fun when getting familiar with that part of the API. Oh, we also have IOT stuff, I’m just unfamiliar with it.


i use slack for this; different channels for different programs; and I can also mute certain channels if there are too many notifications


Same


I’m not sure if it still works with current iOS but I used this to do that a lot several years ago https://apps.apple.com/us/app/prowl-easy-push-notifications/...


super compatible even old python:

  #!/usr/bin/python
  from email.MIMEText import MIMEText
  from subprocess import Popen, PIPE

  to_txt='5551231111@mms.att.net'
  fr_txt='me@example.com'

  m = MIMEText("hello world")
  m['To'] = to_txt
  m['From'] = fr_txt

  p = Popen(["/usr/sbin/sendmail", "-t", "-oi", "-f",fr_txt], stdin=PIPE)
  p.communicate(m.as_string())
when I send a text this way, the text messages get grouped on my phone by the sender me@example.com


I have a home assistant setup that works great for me. Pretty easy to send push notifications that way.



Gotify is great - any device that can issue an HTTP GET request can send an alert to your phone. Really handy for long running builds or ml pipelines.


Firebase cloud messaging is also a good option :)


telegram




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: