jk12
-
Posts
4 -
Joined
-
Last visited
Content Type
Blogs
Gallery
Downloads
Events
Profiles
Forums
Articles
Media Demo
Posts posted by jk12
-
-
Newbie looking to create a workflow that simply passes a URL command (which is received by my Android table running AutoRemote). Question is, how do I send the URL without opening a browser? I'm thinking it's using a POST, curl or something like this...but, I obviously don't know what I'm talking about
Does anyone have an example workflow I can tear apart to figure this out? I'm sure this is so 1st grade level....
-
Thanks for posting this! I finally got this working after changing as noted.
Ben, first and foremost, AMAZING workflow!!!! Thank you!
I have a small suggestion, would it be possible for you allow for the user to set the IP of their HUE bridge via the "-hue set-bridge" command? Something like "-hue set-bridge 192.168.2.20".
The reason why is because for people like me that get an empty response from "http://www.meethue.com/api/nupnp", we are not able to get the bridge to pair. I had to modify the setup.py script so that I could pair my bridge.
You can see in bold the change I made below. I know that it is not a good permanent change, but it was good enough for me to get it to work.
class HueAlfredSetup:
def setup(self):
r = requests.get('http://www.meethue.com/api/nupnp')
bridges = r.json()
# Changed "If not" to an "If" so that it skips to the else.
if bridges:
print 'No bridges found on your network.'
else:
# Statically assigned the IP address of my bridge.bridge_ip = '192.168.2.20'
settings = alp.Settings()
# Create API user for the workflow
r = requests.post(
'http://{bridge_ip}/api'.format(bridge_ip=bridge_ip),
data=json.dumps({'devicetype': 'Alfred 2'}))
resp = r.json()[0]
if resp.get('error'):
print 'Setup Error: %s' % resp['error'].get('description')
else:
settings.set(bridge_ip=bridge_ip, group='')
settings.set(username=resp['success']['username'])
print 'Success! You can now control your lights by using the "hue" keyword.'
return None -
PHP and date (json)
in Workflow Help & Questions
Posted
I'm still learning everything...literally. Alfred, php, json. I managed to finally get my workflow to POST to my Planka kanboard as a new card. However, I'm now trying to get the card's "due date" populated. For that I need it in json format like this:
Bsically, how can I make $dueDate dynamic based on Now and Los Angeles?
The above works but obviously I need that to be Now (and ideally as Americas\Los_Angeles). The only stuff I can find is to add a class to my script---but I wasn't able to get that to work. Hoping someone has done this before and can just copy/paste something that magically works. Hope I'm asking this right---I'm a bit confused after googling.