BamBamF16 Posted March 4, 2019 Posted March 4, 2019 The title kind of says it all. I want to receive a notification and in that notification have actionable (via press) items. Say for example, when my geo fence is tripped and the ISY variable for away is set but the house isn't put into away mode, I would like a notification that has a button or hyperlink I can click to put the house into away mode (turn on a lighting scene for example). I don't want to have to go open mobilinc to execute the scene on command but rather do it from the message. Is this even possible? Bam2
Michel Kohanim Posted March 4, 2019 Posted March 4, 2019 @bambamf16, Yes, this is possible with ISY Portal (which includes the network resource). This said, you will have to come up with the content (including hyperlinks) that point to your ISY through ISY Portal. What you need is to use customized email contents and simply embed whatever you want done. With kind regards, Michel
Scottmichaelj Posted March 4, 2019 Posted March 4, 2019 Look at the Pushover service. Then like Michel said using a url to trigger what you need using a NR via the proper command. The UDI Wiki shows how to setup Pushover notifications and create urls to trigger ISY functions. 1
adamthp Posted March 4, 2019 Posted March 4, 2019 I’d never thought about utilizing pushover like this. I’m off to open the AC and see what trouble I can get in. Great idea, thanks!
Scottmichaelj Posted March 4, 2019 Posted March 4, 2019 30 minutes ago, adamthp said: I’d never thought about utilizing pushover like this. I’m off to open the AC and see what trouble I can get in. Great idea, thanks! This may help, https://pushover.net/api#urls - specifically "Supplementary URLs" 1 1
BamBamF16 Posted March 18, 2019 Author Posted March 18, 2019 I've gotten the pushover part working fine, but I can't seem to find the info for creating and external URL link to do something on the ISY. Honestly, I am not sure what to even look up. Jeff
MWareman Posted March 19, 2019 Posted March 19, 2019 I've gotten the pushover part working fine, but I can't seem to find the info for creating and external URL link to do something on the ISY. Honestly, I am not sure what to even look up. Jeff If you have ISY Portal, look at the IFTTT connectivity. It allows you to create tokenized inbound URLs that map to ISY actions (running programs, turning devices and scenes on and off etc...)
Hurting2Ride Posted March 22, 2019 Posted March 22, 2019 On 3/17/2019 at 7:16 PM, bambamf16 said: I've gotten the pushover part working fine, but I can't seem to find the info for creating and external URL link to do something on the ISY. Honestly, I am not sure what to even look up. If I understand what you're looking to do correctly (without IFTTT) you effectively want to use the REST API. That's where you would find the info on how to build http commands that will execute a program, change a variable, etc.
BamBamF16 Posted March 22, 2019 Author Posted March 22, 2019 Thanks for the info. I'll look I to the REST API. Jeff
Hurting2Ride Posted March 23, 2019 Posted March 23, 2019 On 3/3/2019 at 6:54 PM, bambamf16 said: The title kind of says it all. I want to receive a notification and in that notification have actionable (via press) items. Say for example, when my geo fence is tripped and the ISY variable for away is set but the house isn't put into away mode, I would like a notification that has a button or hyperlink I can click to put the house into away mode (turn on a lighting scene for example). I don't want to have to go open mobilinc to execute the scene on command but rather do it from the message. Is this even possible? This has been stuck in my noggin. I wanted to have a similar function to what you're looking for, without using any 3rd party products to do so. Create an e-mail notification message with the text, including the quotation marks: "http://x.x.x.x:yy/rest/nodes/${sys.node.#.addr}/cmd/DON/255" x.x.x.x. = your ISY ip address yy = your ISY port (if not 80) These must be entered manually into the email subject or body as there is no easy substitution to get the systems address. If you put the above in to a e-mail notification you would be able to click the resulting link and your default browser should take you there. In this case the link would turn on whatever device tripped the notification. As I did not include authorization information in the link you should be prompted for your id/password. Once the command is entered you will receive a result code message from the ISY to let you know if the command succeeded or failed. You could pretty up the link any way you want using standard html code in the email. In my case I created a quick program that looked for an OFF command to this Lamplinc, address 14 52 18. The "Then" command was to Notify and send me an email, using the above substitution, with the resulting link "http://192.168.1.155:82/rest/nodes/14 52 18 1/cmd/DON/255". The basic commands would be On = "http://x.x.x.x:yy/rest/nodes/${sys.node.#.addr}/cmd/DON/255" Off = "http://x.x.x.x:yy/rest/nodes/${sys.node.#.addr}/cmd/DOFF/0"" Set a Variable = "http://x.x.x.x:yy/rest/vars/set/1/88/zz" In this example, 1 = Integer variable (2= State Variables), 88 = Integer Variable Number, zz = set value. zz can only be a decimal numeric. Any chars other than 0-9 will cause the command to fail. Run program = ""http://x.x.x.x:yy/rest/programs/pppp/runThen" pppp=Program # :Options = run, runThen, runElse, stop, enable, disable, enableRunAtStartup, disableRunAtStartup https://wiki.universal-devices.com/index.php?title=ISY_Developers:API:REST_Interface has the complete set of commands available. P.S. Remember to take a backup before you start messing around with the REST (or any) API.
BamBamF16 Posted March 26, 2019 Author Posted March 26, 2019 H2R: Thanks for the info! I've been trying to piece something together, but I was missing the basic info and the docs were somewhat confusing. Is there any way to package the UID/PWD not in plain text within the URL? Jeff
MWareman Posted March 26, 2019 Posted March 26, 2019 Is there any way to package the UID/PWD not in plain text within the URL? Jeff Not as far as I know with IOS. Just another reason I prefer Android/Tasker/Autoremote and Autonotification. There is no equivalent feature available under IOS due to the Apple AppStore policies. If you use ISY Portal you could create ‘IFTTT’ rules (these provide inbound webhooks that can be configured to trigger actions on ISY) - and this means it’s a long security token instead of a username and password. Better, but still not perfect.
Recommended Posts