Jump to content

Another Nest thermostat workflow

Recommended Posts

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



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.



Link to comment


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

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
***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__


  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
  • 1 month later...

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...