Difference between revisions of "IFTTT"

From HSYCO
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 35: Line 35:
 
*'''Password''': password string (only use upper and lower case A-Z characters or digits, no space or special characters allowed, no length restrictions). Used to accept web requests from the Webhooks service
 
*'''Password''': password string (only use upper and lower case A-Z characters or digits, no space or special characters allowed, no length restrictions). Used to accept web requests from the Webhooks service
  
 +
{{note|Note that the password must be kept secret and should be long and difficult to guess, as it could otherwise be used to easily trigger events in HSYCO.}}
  
 
=== Options ===
 
=== Options ===
Line 47: Line 48:
 
|eventkey
 
|eventkey
 
|
 
|
|the IFTTT API key obtained by viewing the Settings of the Webhooks applet. It is the last part of the URL (e.g., https://maker.ifttt.com/use/MYAPIKEY) found under My Applets > Webhooks > Settings.
+
|the IFTTT API key obtained by viewing the Settings of the Webhooks applet. It is the last part of the URL (e.g., <nowiki>https://maker.ifttt.com/use/MYAPIKEY</nowiki>) found under My Applets > Webhooks > Settings.
 
|used to generate trigger events in IFTTT
 
|used to generate trigger events in IFTTT
  
 
|}
 
|}
 
{{note|Note that the password must be kept secret and should be long and difficult to guess, as it could otherwise be used to easily trigger events in HSYCO.}}
 
  
 
== Datapoints ==
 
== Datapoints ==

Latest revision as of 10:11, 9 December 2021

This I/O Server implements two-way communication with the Webhooks service of IFTTT, allowing HSYCO to trigger applets in IFTTT and, the other way around, to receive notifications and data from applets.


IFTTT setup

The IFTTT I/O Server connects to IFTTT via its Webhooks service. It requires a fully functional Internet connection.

In order to setup an IFTTT applet that triggers an event and send data to HSYCO, connect the Webhook service to the "that" side of the applet.

The URL you specify must have the same server address and port number you use to access the HSYCO Web interface, followed by the /ifttt path and the password defined in the IFTTT I/O Server configuration, for example: https://example.hsyco.net/ifttt/oieojdjeiw48394ejdejdd.

Note that this password must be kept secret and should be long and difficult to guess, as it could otherwise be used to easily trigger events in HSYCO.

The "Method" field should be set to POST, the "Content Type" field is not required, and add a static or dynamic text, for example the "TextField" ingredient of a trigger, to the "Body" field.

The IFTTT I/O Server can also be used to send trigger events to IFTTT's applets. The I/O Server will send a web request that will be received by a Webhook trigger. This request contains a text value and can optionally have an event name. If the event name is not set using the appropriate IO command's syntax, the event name passed to Webhooks is "hsyco".

On the IFTTT Webhooks page, click "Documentation" to retrieve the key and set the eventkey option of the I/O Server.

Define a new applet using the Webhook as the "this" trigger, enter the event name you want to use to identify this specific trigger, then add the "that" side of the trigger using the applet you need to trigger from HSYCO.

HSYCO Configuration

Add a IFTTT I/O Server in the I/O Servers section of the Settings and set the password.

Note that the IFTTT I/O Server doesn't count in the I/O servers license total, so you don't need an extra I/O Server license to use IFTTT with HSYCO.


High Availability

  • Shutdown when inactive: defaults to false.


Authentication

  • Password: password string (only use upper and lower case A-Z characters or digits, no space or special characters allowed, no length restrictions). Used to accept web requests from the Webhooks service
Note that the password must be kept secret and should be long and difficult to guess, as it could otherwise be used to easily trigger events in HSYCO.


Options

ID Default Values Description
eventkey the IFTTT API key obtained by viewing the Settings of the Webhooks applet. It is the last part of the URL (e.g., https://maker.ifttt.com/use/MYAPIKEY) found under My Applets > Webhooks > Settings. used to generate trigger events in IFTTT

Datapoints

ID Value R/W Description
request <body text> R the text sent by the IFTTT Webhooks service web request. This is a forced event, triggered on every request
request.<query> <body text> R the text sent by the IFTTT Webhooks service web request. Query is the optional query string in the URL as set in the Webhooks service. This is a forced event, triggered on every request
event <value1> W trigger an IFTTT Webhooks event with event name "hsyco", passing the value as value1
event.<name> <value1> W trigger an IFTTT Webhooks event with the specified event name, passing the value as value1

Examples

Receiving a web request from IFTTT

Assuming that the IFTTT's I/O Server id is "ifttt", these events will write the incoming request to the log file:

io ifttt.request : log = io ifttt.request
io ifttt.request.myquery : log = io ifttt.request

Generating a trigger event in IFTTT

This EVENTS line will trigger a Webhooks event named "hsyco" every minute, passing the time as the value1 field of the Webhooks trigger:

time : io ifttt.event = $time$

Release Notes

3.7.0

  • initial release


IFTTT is a registered trademark of IFTTT Inc.