GitXplorerGitXplorer
g

flic-meds-alert

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
924312bb44370f0b458314798378da7ca80e07dc

documented one more command that I'll hopefully never need again

ggangstead committed 5 years ago
Unverified
47112319ddb3396aad9ce59b3c5b6d3f2f872e5b

need absolute path in both scripts

ggangstead committed 5 years ago
Unverified
7ccf60082b3faacab7d42be70888bad1838ac2b0

renamed example config

ggangstead committed 5 years ago
Unverified
4f6c0c711f3aa9fb911e9d476e6b300222fde12d

first post

ggangstead committed 5 years ago
Verified
b3fee5630bcccb89b534787e8af6da476bd36dc1

Initial commit

ggangstead committed 5 years ago

README

The README file for this repository.

Flic Meds Alert

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.

Pre Reqs

  1. Buy Flic 2 button. Just the button, not the hub
  2. Download the Flic Mac App
    • Sign up for an account - WHY?!
  3. Set up an email account to send from (I created an account just for this use case)

sendmail setup

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 do sudo launchctl stop org.postfix.master && sudo launchctl start org.postfix.master
  • 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 sender@example.com yourmail@example.com
  • 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)

Set up

  1. 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
  2. After every change you need to reload the app or use the menu item: Plugins -> Reload Plugins
  3. Rename config_CHANGEME.sh to config.sh, and put your from and to address(es) in there
    • mv 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
  4. Change email subject/body in ivygotmeds.sh or rename your child
  5. 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