Skip to content

Log diapers to Baby Tracker from an AWS IoT Button.

License

Notifications You must be signed in to change notification settings

mbmccormick/babytracker-iot-button

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

babytracker-iot-button

This is an AWS Lambda function written in Node.js that logs a diaper change to the Baby Tracker app when an AWS IoT Button is pressed.

Deployment

Configure your AWS IoT Button by following the instructions here: https://aws.amazon.com/iotbutton/faq/

This will involve registering the AWS IoT Button on the AWS Management Console, generating a certificate and private key for your AWS endpoint, configuring the button for your Wi-Fi network, and uploading the certificate and private key to your button.

Upload the code for the AWS Lambda Function by following the instructions here: https://docs.aws.amazon.com/lambda/latest/dg/programming-model.html

Connect your AWS IoT Button as a trigger for the AWS Lambda Function.

Configure your AWS Lambda Function to use the Node.js 12.x runtime and allow for one minute timeout.

Create three environment variables on your AWS Lambda Function:

EMAIL_ADDRESS - The email address for your Baby Tracker account.

PASSWORD - The password for your Baby Tracker account.

DEVICE_UUID - Generate a random UUID and paste it here. You can use a site like https://www.guidgen.com to generate this.

Usage

Press the button one time (SINGLE) to log a wet diaper.

Press the button two times (DOUBLE) to log a dirty diaper.

Long press the button (LONG) to log a mixed diaper.

Known Issues

If the button is not logging to the Baby Tracker app for some reason or you see the error Account has been reset. Please login again. in your logs, generate a new UUID for the DEVICE_UUID. Disconnect your mobile device(s) from the group in the Baby Tracker app. Then reconnect one device to the group, selecting the Reset Group option when reconnecting. This should clear out any sync issues and recreate the group.

License

This software, and its dependencies, are distributed free of charge and licensed under the GNU General Public License v3. For more information about this license and the terms of use of this software, please review the LICENSE.txt file.

 

Made with ❤️ for Elliana.

About

Log diapers to Baby Tracker from an AWS IoT Button.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published