Press button, send email. In this case it is to alert family members so we can all keep track of when the medicine was last given but it's useful for anyone who wants a Flic button to send an email or run an arbitrary bash script.
Does not require adding anything to the mac, other than the Flic app.
- Buy Flic 2 button. Just the button, not the hub
- Download the Flic Mac App
- Sign up for an account - WHY?!
- Set up an email account to send from (I created an account just for this use case)
Probably the hardest part. There are hundreds of ancient stack overflow posts that all almost work. Probably something different for everyone's configuration.
- Get postfix set up and sendmail running.
- Here's the instructions I found for my hosting provider
- Except instead of
/etc/init.d/postfix reload
I had to dosudo launchctl stop org.postfix.master && sudo launchctl start org.postfix.master
- Except instead of
- Test email: If you can't do send from the command line and receive the email then you're not ready to go on to the Flic part yet
printf "Subject: sendmail test \nThis was sent from the command line" | sendmail -f [email protected] [email protected]
- It helps to tail running on your user's mail log while trying to send. You may get some error messages there. But not getting an error message doesn't mean you will actually get your mail!
tail -f /var/mail/$(whoami)
- This folder has to be installed at
~/Library/Application Scripts/com.shortcutlabs.FlicMac
git clone https://github.com/gangstead/flic-meds-alert.git ~/Library/Application\ Scripts/com.shortcutlabs.FlicMac/flic-meds-alert
- After every change you need to reload the app or use the menu item: Plugins -> Reload Plugins
- Rename
config_CHANGEME.sh
toconfig.sh
, and put your from and to address(es) in theremv config_CHANGEME.sh config.sh
- Warning the path to
config.sh
in the actions must be absolute so you need to change the path if you rename the project
- Change email subject/body in ivygotmeds.sh or rename your child
- Open Flic app, set an action to a Flic or widget. The new plugin should be at the bottom under User-supplied plugins with 2 actions underneath