Jump to content
jacoblo

Run Philips Hue workflow for presets

Recommended Posts

Hi guys,

 

Want to add for example Hue presets to remote page but can't find a way. Impossible to drag/drop and can't add a remote trigger in the workflow either. Any suggestion on how I can get get around it?

 

Jacob

 

Screen%20Shot%202015-01-27%20at%2020.34.

Share this post


Link to post

You need to add a remote trigger in order to make it available. When constructing the workflow itself, it works just like adding an External Trigger or a Hotkey.

 

If you want to create a workflow page that will be bundled with the workflow, then click the remote icon that lives right next to the debug icon on the workflow creation page. After that, you'll just click on one of the boxes and select "Run Workflow Trigger," which will give you the option of any Remote Trigger that you've defined on your own workflow.

 

Take a look at my PowerPoint Remote for an example.

Share this post


Link to post

Problem is that doesn't work this workflow since the presets above are not defined in the workflow and I assume loaded by the workflow itself. So it basically becomes impossible to find any link to "energize" preset i Alfred as shown below...

 

Screen%20Shot%202015-01-27%20at%2021.10.

Share this post


Link to post

I don't have a Phillips Hue, so it'll be hard for me to help out directly with this one because the workflow needs to be connected to a hue to work. But, with that being said...

 

You can accomplish this, regardless, in one of two ways:

 

(1) Use AppleScript to have Alfred do a search with the correct query and then automate the "return" key.

(2) Find the exact argument that the workflow sends when you select a preset and pass it within the workflow.

 

So, let's talk about #2 (note, since you're modifying the workflow, these modifications will be removed each time you update via the Packal updater or Alfred's regular update mechanism).

 

(1) Open up the script debugger and show "All Information"

(2) Type in your query to get the presets.

 

You'll see that each XML item should have something called "arg" in it. You need to find the exact argument, but, for now, I'm just going to assume that the argument for "energize" is "preset-energize", etc...

 

(3) Create a Remote Trigger that connects to the topmost "Run Script" action, the one that runs the Python. You can set the identifiers to whatever you want, but make the Argument "Text" and then fill in "preset-energize".

 

(4) Add that to a workflow page.

 

(5) Press it. It should work.

 

(6) Repeat for each preset that you want to available.

Edited by Shawn Rice

Share this post


Link to post

Problem is that doesn't work this workflow since the presets above are not defined in the workflow and I assume loaded by the workflow itself. So it basically becomes impossible to find any link to "energize" preset i Alfred as shown below...

 

It might be worth popping the workflow developer a note, as he may be interested in getting involved too. I'm not sure how simple turning these presets into Remote Triggers will be, but it's worth a chat, I'm sure :)

Share this post


Link to post

Love the input and didn't even know about the debugger mode :)

 

The preset triggered this:

[iNFO: alfred.workflow.input.scriptfilter] Processing output 'alfred.workflow.action.script' with arg '{"action": "load_preset", "preset_name": "feetup"}'

 

But right after that I found in the documentation that I can create a hotkey, set text input to preset's name (in this case feetup) and connect it with the Run Script bin/bash that the other hot keys are connected with. Works like a charm and might be of help for others :)

 

Thanks for your help!

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...