meadeiator Posted August 30, 2013 Share Posted August 30, 2013 I'm not getting anything recorded to the log. Opened console but can't find anything related to Nest in there. Am I missing something? Link to comment
jason0x43 Posted August 30, 2013 Author Share Posted August 30, 2013 Hmmm...When you action the log command, Console.app should popup with its main window and with a secondary window for the workflow's debug log. If that's not working, navigate to /Users/<username>/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/jc-nest and open the file debug.log. Link to comment
jason0x43 Posted August 30, 2013 Author Share Posted August 30, 2013 Hmmm....I think I see the problem... Link to comment
jason0x43 Posted August 30, 2013 Author Share Posted August 30, 2013 Ok, give it a try now. Link to comment
jason0x43 Posted August 30, 2013 Author Share Posted August 30, 2013 Try selecting your Nest using the "nest nest" command again. Link to comment
meadeiator Posted August 30, 2013 Share Posted August 30, 2013 Yes. That is what produced that log. 2 or 3 attempts to nest nest. Link to comment
jason0x43 Posted August 30, 2013 Author Share Posted August 30, 2013 Ah, ok. I was attacking the problem from the wrong spot. Link to comment
jason0x43 Posted August 30, 2013 Author Share Posted August 30, 2013 Ok, give it another try. Link to comment
meadeiator Posted August 30, 2013 Share Posted August 30, 2013 Nice.... That's sweet. Works like a charm. Running through all the options but so far so good. Link to comment
Apple314 Posted September 1, 2013 Share Posted September 1, 2013 Jason, First of all thanks for the workflow! I applied the update this afternoon in anticipation of being able to see multiple thermostats. Initially pulled the update with Allyoop, but the nest keyword thinks for a second then goes to the default (google,amazon,wikipedia) search. As someone else did, I deleted the workflow, deleted the keychain entry, cache etc. Went as far as closing Alfred and eventually tried a reboot. No log entry is getting created in the Alfred workflow folder you mentioned above. I have tried everything I can think of, but none of the commands are getting triggered (they do show up in the list). Other workflows seem to be fine. I have pulled it from the dropbox link and the github page with the same result. Looking for anything I may have missed. Thanks! Link to comment
jason0x43 Posted September 1, 2013 Author Share Posted September 1, 2013 What version of Mac OS are you running? (Or more importantly, what's the default version of Python on your system?) Link to comment
Apple314 Posted September 1, 2013 Share Posted September 1, 2013 10.8.4 Python 2.7.2 The log command is the only one that doesn't go to the default web search, but there isn't even a directory for jc-nest under the workflows directory (there used to be, but it had log entries from the previous version). I removed that directory after deleting the workflow, right after I cleared out the password entry out of the keychain. Let me know if you can think of anything else for me to try. Thanks. Link to comment
jason0x43 Posted September 1, 2013 Author Share Posted September 1, 2013 Hmmm...if you're OK with a bit of command lining, let's try this: 1. First, open a terminal and cd to the workflow directory.One way to find the workflow directory is by opening Alfred's preferences, selecting the Workflows tab, clicking on the Nest workflow, then double-clicking on any of the commands (like "nest temp"). Near the bottom right of the info pane that pops up will be a button "Open workflow folder". This is the where you need to get to in a terminal. Unless you've changed it, the default workflow directory is /Users/<username>/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows, and the Nest workflow will be one of the randomly named user.workflow.XXXX directories in there. 2. In the Nest workflow directory, run "python alfred_nest.py tell nest".If everything goes well, the command should print out an XML document to the terminal that looks like:<?xml version="1.0"?><items><item uid="a6e78ab3-a380-4ab0-9597-0105e989aa9f" valid="yes" arg="01AAxxxxxxxxxxx"><title>Nest (active)</title><subtitle>ID: 01AAxxxxxxxxxxxx Location: Home</subtitle><icon>icon.png</icon></item></items>%If things don't so well, you'll see an error XML doc or a Python exception trace:<?xml version="1.0"?><items><item uid="c56b217a-47ad-401d-b1f1-fa7481d2c1e8" valid="no"><title>Error: some error message</title><icon>icon.png</icon></item></items>%or something starting with Traceback (most recent call last): File "alfred_nest.py", line 341, in <module>... Copy and paste the output from the command here in the thread and we'll see where we can go from there. Link to comment
Apple314 Posted September 1, 2013 Share Posted September 1, 2013 ***Note: I scrubbed my username from the output. I can confirm that the /Workflow Data/jc-nest/ directory doesn't get created when installing the workflow. Traceback (most recent call last): File "alfred_nest.py", line 341, in <module> getattr(NestWorkflow(), argv[1])(*argv[2:]) File "alfred_nest.py", line 27, in __init__ super(NestWorkflow, self).__init__(*args, **kw) File "/Users/<usernamescrubbed>/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.B8084A16-990B-4FAF-AF0E-92BBAE2706AC/jcalfred/alfred.py", line 164, in __init__ self.log_level = self._info.config.get('loglevel', 'INFO') File "/Users/<usernamescrubbed>/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.B8084A16-990B-4FAF-AF0E-92BBAE2706AC/jcalfred/alfred.py", line 181, in log_level self.config['loglevel'] = level File "/Users/<usernamescrubbed>/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.B8084A16-990B-4FAF-AF0E-92BBAE2706AC/jcalfred/alfred.py", line 102, in __setitem__ self._save() File "/Users/<usernamescrubbed>/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.B8084A16-990B-4FAF-AF0E-92BBAE2706AC/jcalfred/alfred.py", line 108, in _save with open(self._path, 'wt') as cfile: IOError: [Errno 2] No such file or directory: '/Users/<usernamescrubbed>/Library/Application Support/Alfred 2/Workflow Data/jc-nest/config.json' Link to comment
jason0x43 Posted September 1, 2013 Author Share Posted September 1, 2013 D'oh, I think I know what the problem is. Just a minute (or ten)... Link to comment
jason0x43 Posted September 1, 2013 Author Share Posted September 1, 2013 Ok, give it a try now. Link to comment
Apple314 Posted September 1, 2013 Share Posted September 1, 2013 That did the trick! Really appreciate the support. Thanks again for the workflow! Link to comment
jason0x43 Posted September 1, 2013 Author Share Posted September 1, 2013 Excellent, glad to hear it! Link to comment
cagnew Posted October 4, 2013 Share Posted October 4, 2013 I love this workflow however I think the latest Alfred update v2.09 (214) broke this workflow. Link to comment
jason0x43 Posted October 4, 2013 Author Share Posted October 4, 2013 I love this workflow however I think the latest Alfred update v2.09 (214) broke this workflow. Hmmm…I believe you're right. Link to comment
jason0x43 Posted October 4, 2013 Author Share Posted October 4, 2013 Or it's possible that Nest has broken things. They finally decided to start a developer program and create a public API, and they may have broken the current one. I'm looking into it. Link to comment
mlamoureux Posted October 4, 2013 Share Posted October 4, 2013 Yes I noticed it doesn't work with the latest Alfred. Jason, have you considered joining forces with these guys, who also have a Python implementation of a NEST library? https://github.com/johnray/Indigo-Nest-Thermostat-Plugin Link to comment
cagnew Posted October 5, 2013 Share Posted October 5, 2013 Or it's possible that Nest has broken things. They finally decided to start a developer program and create a public API, and they may have broken the current one. I'm looking into it. Thanks Jason! Link to comment
jason0x43 Posted October 6, 2013 Author Share Posted October 6, 2013 I just published an update to the workflow; it should be working again. The problem was just that Nest stopped returning a browser cookie on successful login, and the workflow was checking for the existence of browser cookies to tell if it had a valid session with Nest. That bit of code hadn't actually been necessary for a while, but it didn't cause problems until Nest stopped sending cookies. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now