Advanced Heat Schedule Wiki Error

Posted on
Tue Nov 22, 2016 9:55 pm
Sharek326 offline
User avatar
Posts: 377
Joined: Jul 20, 2014
Location: Lansford, PA

Advanced Heat Schedule Wiki Error

Tonight I noticed that the Wiki tutorial on on scheduling Thermostats was causing an error. The code I was using in the trigger to change the variable and fire the Action Group was giving me an error. Below is the code and the error. I was wondering if this was because of any changes in I7 and if so how can I correct it?


Script

from variable_watcher import processVariable
processVariable("home")


Error

Schedule Set Night
Trigger home change
Script Error embedded script: No module named variable_watcher
Script Error Exception Traceback (most recent call shown last):

embedded script, line 1, at top level
ImportError: No module named variable_watcher

Posted on
Tue Nov 22, 2016 11:45 pm
jay (support) offline
Site Admin
User avatar
Posts: 18200
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Advanced Heat Schedule Wiki Error


Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed Nov 23, 2016 5:49 am
Sharek326 offline
User avatar
Posts: 377
Joined: Jul 20, 2014
Location: Lansford, PA

Re: Advanced Heat Schedule Wiki Error

Thanks Jay....Your right when I reloaded the computer a few days ago I never downloaded the script again and put it in the python folder.

Posted on
Wed Nov 23, 2016 10:42 pm
Sharek326 offline
User avatar
Posts: 377
Joined: Jul 20, 2014
Location: Lansford, PA

Re: Advanced Heat Schedule Wiki Error

Jay,

Question when I installed the script and tried it. It seems to fire correctly with everything except night . Here is Evening firing.

Nov 23, 2016, 11:38:49 PM
Schedule Set Evening
Trigger home change
Action Group evening
Z-Wave sent "Downstairs Thermostat" change heat setpoint to 69.0°
Z-Wave sent "Upstairs Thermostat" change heat setpoint to 68.0°
Z-Wave sent "Downstairs Thermostat" mode change to heat
Z-Wave sent "Upstairs Thermostat" mode change to heat


But when I fire Night

Z-Wave received "Meter Clamp 2" energy total to 14.127 kWh
Schedule Set Night
Trigger home change
Variable Watcher Error action group execution error: u"object named 'false' not found in database"
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/variable_watcher.py", line 21, in processVariable
actionGroup = _getIndigoObject(indigo.actionGroups, var.value)
File "/Library/Python/2.7/site-packages/variable_watcher.py", line 38, in _getIndigoObject
raise KeyError("object named '%s' not found in database" % input)
KeyError: u"object named 'false' not found in database"



I rebuilt the Night Schedule Event and the Action Group. I also set the Variable Trigger 10 times. Nothing seems to fix it. Any ideas?

Posted on
Wed Nov 23, 2016 10:54 pm
jay (support) offline
Site Admin
User avatar
Posts: 18200
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Advanced Heat Schedule Wiki Error

I think maybe you're setting your variable value to False rather than "night" or whatever.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat Nov 26, 2016 7:13 am
Sharek326 offline
User avatar
Posts: 377
Joined: Jul 20, 2014
Location: Lansford, PA

Re: Advanced Heat Schedule Wiki Error

Thanks Jay,

I double checked it and it was set to insert night into the variable but in the off chance something was bugged with the schedule I deleted it and built a new one. When I ran it I got the error again. But when I ran my weekend one following that it fired correctly.

Variable Watcher Error action group execution error: u"object named 'false' not found in database"
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/variable_watcher.py", line 21, in processVariable
actionGroup = _getIndigoObject(indigo.actionGroups, var.value)
File "/Library/Python/2.7/site-packages/variable_watcher.py", line 38, in _getIndigoObject
raise KeyError("object named '%s' not found in database" % input)
KeyError: u"object named 'false' not found in database"


Image

Posted on
Sat Nov 26, 2016 9:01 am
Sharek326 offline
User avatar
Posts: 377
Joined: Jul 20, 2014
Location: Lansford, PA

Re: Advanced Heat Schedule Wiki Error

I think I solved it. Because I have a House status variable that watches if the house is set to home, away, night or vacation and fires a action group accordingly. I had a Action Group for that named night which was causing a conflict for the action group for HVAC Night. This forced me to change the HVAC Night to NightHVAC in the action group but I never changed the value to reflect it in the Home variable.

Posted on
Sat Nov 26, 2016 1:47 pm
jay (support) offline
Site Admin
User avatar
Posts: 18200
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Advanced Heat Schedule Wiki Error

Glad you solved it.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat Mar 21, 2020 12:15 pm
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: Advanced Heat Schedule Wiki Error

Had this working until I got my new computer. Downloaded and placed the variable watcher script in the Library... Python 2.7 folder, reloaded, restarted, etc, but still throwing this error.

Code: Select all
  Script Error                    embedded script: No module named variable_watcher
   Script Error                    Exception Traceback (most recent call shown last):

     embedded script, line 1, at top level
ImportError: No module named variable_watcher

   Stopping embedded script executor host2 (pid 52048)
   Stopped "embedded script executor host2"
   Stopping embedded script executor host1 (pid 51643)
   Stopped "embedded script executor host1"
   Embedded script executor host2 started
   Script Error                    embedded script: No module named variable_watcher
   Script Error                    Exception Traceback (most recent call shown last):

     embedded script, line 1, at top level
ImportError: No module named variable_watcher


Thoughts?

Posted on
Mon Mar 23, 2020 3:08 pm
jay (support) offline
Site Admin
User avatar
Posts: 18200
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Advanced Heat Schedule Wiki Error

I don't think you have it in the right spot, as it works for me. Here's the relevant stuff:

Code: Select all
Mac-mini:~ jay$ ls /Library/Application\ Support/Perceptive\ Automation/Python2-includes/
variable_watcher.py   variable_watcher.pyc
Mac-mini:~ jay$ indigo-host
Python 2.7.10 (default, Feb 22 2019, 21:55:15)
[GCC 4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.37.14)]
Connected to Indigo Server v7.4.1, api v2.3 (localhost:1176)
>>> import variable_watcher
>>> dir(variable_watcher)
['__builtins__', '__doc__', '__file__', '__name__', '__package__', '_getIndigoObject', 'indigo', 'processVariable', 'traceback']
>>>


The .pyc version of the file is generated automatically by Python the first time its imported. As you can see, the script loaded correctly and is showing the processVariable method. Make sure you installed it in the correct place. And, of course, make sure you're running it from Indigo (not directly from python).

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests