bwade913 Posted February 8, 2023 Posted February 8, 2023 (edited) I just got this notification program for Yolink Leak Sensors working so that a notification message is sent to a Slack channel with information about which sensor(s) was/were triggered. I wanted to use a single Network Resource, to pass information about which of the four leak sensors triggered, so it needed to pass four variables. I ran into some hurdles, so I'm writing this example up to guide other noobs through the process. I have one program for each sensor, that sets a variable specific to that sensor. It sets the variable if the sensor is reporting "Wet" and then resets it if the sensor goes back to "Dry". If it's wet, it runs the resource. The resource "Water_Sensor" then passes all four variables as "value1" per the wiki. There are three values that can be passed to IFTTT. I used only one, since I'm fine eventually printing it all as a single string. Note the variable syntax: ${var.<valueType>.<valueID>} var is a string indicating a variable. Don't substitute your variable name, like I tried to do. valueType is set to "1" because these are integer variables. A state variable would need a 2 here. valueID is set to the number in the first column in the admin console variable page that corresponds to your variable. My variables are 2,3,4,5 because I've only used one variable before this. I used the event name Water_Sensor and have an IFTTT applet of the same name. To get your IFTTT "key", go to the following page and select "Documentation". https://ifttt.com/maker_webhooks There is a a mistake in the Wiki, first noted on this forum five years ago where it says to in IFTTT, create a recipe using "maker", where you really need to use "webhooks" for the This section. Using webhooks, there are two options, one that supports JsonPayloads and the other "Receive a web request" which supports the value1, value2, value3 string passing that we are using. In the screen cap below, I am showing what it looks like when "Add ingredient" is selected to insert the variable strings. Besides "value1" I used "EventName" and "OccurredAt" to capture the name and date stamp. Here's what the notification message looks like in Slack. My wife pointed out that I misspelled Laundry. BTW, I'd be interested if anyone can explain what JsonPayload would be useful for and whether UD supports it. Edited February 8, 2023 by bwade913 1 Quote
brians Posted February 8, 2023 Posted February 8, 2023 Thanks for this, until now I did not have a use for IFTT. I also have Slack at work so was able to get this running here. I notice that there are a couple settings you must have adjusted: Content-Type: application/json and checking the Use SNI was key in making this work. I sucessfully have it working, just not using it for anything practical yet. Quote
bwade913 Posted February 8, 2023 Author Posted February 8, 2023 Good to hear. Those setting differences are mentioned in the Wiki in the section about passing parameters to IFTTT. Quote
johnstonf Posted February 11, 2023 Posted February 11, 2023 Where is the WiKi?? I'm fresh off the boat here, but based on this, have ordered and received a set of YoLink leak sensors and hub and would like to integrate to my issy. I have an Issy994i with zwave module and insteon plm. It's working great, so if possible, I'd like to keep it, and integrate. Do i need a raspberry pi? Do i still need the yolink hub? Quote
Geddy Posted February 11, 2023 Posted February 11, 2023 7 hours ago, johnstonf said: Where is the WiKi?? Same place it's always been - https://wiki.universal-devices.com/index.php?title=Main_Page Currently the best way to get node servers to link YoLink to your ISY is through eisy. You can continue to use your current ISY994 if you cannot get all the parts needed through the Canada distributor for UDI. I think others had said some items were not currently in stock. 7 hours ago, johnstonf said: Do i still need the yolink hub? That I'm not sure. I don't use YoLink so don't know the process. I would assume so, but you need to read their site first to figure out how to make their system work. Quote
bwade913 Posted February 14, 2023 Author Posted February 14, 2023 @johnstonf yes you will need the Yolink hub. The node server gets the device configurations from the hub and makes them available in the admin console. All of the Yolink devices I've tried so far (leak sensor, motion sensor, switches) have been very reliable. The Yolink NS developer is in the process of adding support for a Yolink remote, the four button "fob" product. Yolink makes an eight button remote that will never be supported by the NS, because it does not link to the hub, it only links to other Yolink device with a direct device to device link. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.