rguerra712 / tadpoles-logger-aws

Login your chid into Bright Horizons MyDay app using the Tadpoles API by listening to SQS event on AWS Lambda
Apache License 2.0
1 stars 0 forks source link

Alexa Skill #1

Open k5njm opened 7 years ago

k5njm commented 7 years ago

I just went through much of the same process to discover the API, using the packet capture app on Android as I interacted with the app, then testing the API calls in Chrome with Postman. I think it's awesome that other dads are looking at how they can also utilize the API.

My next step is going to writing NodeJS functions run an Alexa skill via lambda. I'm not a developer, so this should be a fun challenge.

rguerra712 commented 7 years ago

Thanks @kd5ftn. That is precisely how I found out the calls as well and was able to figure all this out (it was rather tedious figuring out just the right calls since the tadpoles API has no documentation and doesn't give decent error codes).

I think I need to add a better readme to this project, since it is designed to do JUST what you ask (I log in my son with Alexa and with Google Home using IFTTT).

In case it helps, I have an example repo at https://github.com/rguerra712/tadpoles-logger-example to do just what you seek.

All one has to do is clone that repository, run npm restore in a terminal/command line, then change the index.js file to change the log for their own child (mine is pretty young based on the template, but it is fairly simple to change the defaults). After this, you can zip up the contents (or run the zipup script if in linux), and upload it to your web hosting of choice (in my case I usually use either aws lambda or stdlib). Once done with that, you can setup IFTTT to call the maker channel to just call your function and DONE, you child will log into daycare.

If that sounds complex, no worries, I will add a readme to both these repositories soon that should hopefully be able to help you (and other parents who want to do this kind of automation).

k5njm commented 7 years ago

Thanks for the reply!

I managed to get a basic version running of my code running, example here.

Right now, I just use it to query in the evenings after day care. I wrote it using a different http request library, and didn't make use of javascript promises, although as a result it's slow and not very robust. As I get more familiar with node and js, I'll look at refactoring it based off your code.

I did see you had the logger-example, and even the IoT dash button code, very cool.