Trigger routine with button on HTML page?


(Mr. Froinds) #1

I’d like to add a button to a web page that would trigger a routine. Basically, I’d like to make an HTTP call with Javascript to Smartthings and trigger the routine.

Is this even possible?


#2

I’ll let the experienced coders discuss the various web services options if you want to get into actual coding.

If you just want a quick and easy way to do this, you can use the IFTTT maker channel. It can receive a post as the “If” in an IFTTT recipe, and you can use the SmartThings channel as the “that.”

It’s not as elegant or as powerful as writing your own code, and there may be some additional lag, but it’s an alternative for something simple or as a proof of concept while you’re working out the custom code. :sunglasses:


(Mr. Froinds) #3

Thanks for the info. Unfortunately, I was told by upper management that using IFTTT is not viable solution to our needs.

They’d like our team to add tiles that we can program in HTML, CSS and JS to a page on a kiosk.


( I hate Mondays) #4

CoRE or webCoRE can help you. Search for ways to execute pistons from external sources, you can create a piston that runs whatever you need and call it on its /execute or /ifttt/event endpoints

In webCoRE for example, create a piston, add an if statement, add a condition, choose virtual device > IFTTT, select comparison executes and enter an event name, then you will see the URL you need to call. Note IFTTT is not involved in the process, you are just using something built for IFTTT


(Christopher) #5

Have you looked into ActionTiles?


(Mr. Froinds) #6

Yes, I did. The problem is I’ll need to manually log into ActionTiles to use it. I’m provisioning Raspberry Pi’s with Chef and running Chromium in kiosk / incognito mode. So, ActionTiles won’t work.


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #7

Drop us a line with your requirements. While “no login” is not something that ActionTiles would offer as a feature for the general consumer, depending on your use case and overall requirements, etc., we might be able to accommodate.

Terry @ ActionTiles.com


( I hate Mondays) #8

I am also available for freelance coding :wink: a dedicated SmartApp that fills your requirements… heh?