Connection to IFTTT

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Connection to IFTTT

Hi Alfred

I would like to connect my LivPi's vis to populate a Google Drive Spreadsheet.  I have done this before with other projects.

I have used the 'Maker' If function to report the data to the spreadsheet but I need to know if we can do the same with LivPi?

Thank you

Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Re: Connection to IFTTT

Hi Tony,

It is relatively easy to integrate LiV with IFTTT.

I tested IFTTT a couple of month ago for posting tweets (that was right before I added twitter functionality to LiV Pi code base)

What I did was: I created a recipe that has a trigger (temp_alert) that runs on LiV Pi and an action (post on Twitter). Please refer to second screen capture (look at first tweet, ignore the rest - that was just testing for the LiV software release V1_0 that added twitter support).

To add triggers on LiV Pi:
Create a recipe on IFTTT with "YOUR_TRIGGER"  on Maker channel and action on whatever channel you want (google drive channel in your case)

Add trigger code to LiV Pi.
You could do something like this:
In your programming language of choice, on your development machine (this could be LiV Pi or another computer), write a loop and use LiV JSON REST API to read most recent
measurements with "http://IP_ADDRESS_OF_LIV/getAllRawSensorData" (returns JSON).

You can trigger "YOUR_TRIGGER" message like this:{YOUR_TRIGGER}/with/key/YOUR_IFTTT_KEY_HERE

With an optional JSON body for YOUR_TRIGGER:
{ "value1" : "", "value2" : "", "value3" : "" , etc.... }

Make sure your router does port forwarding on port 5000 if you use the external IP address of LiV Pi.

Here are some screenshots: