Action group to set cool or heat set point

Posted on
Mon Jun 29, 2015 3:25 pm
mikeL offline
Posts: 46
Joined: Apr 30, 2010
Location: Gatineau, QC

Action group to set cool or heat set point

Hi Mike
Your plugin allows the creation of an action group to set the cool set point or heat set point to a specific numerical value, 23.5 degrees in the example below. So, to schedule different set points at specific times of the day one needs to create a series of action groups — one action group for each specific temperature — then invoke the appropriate action group when required.

Alternatively, can a single action group be created to set the set point from the value of a variable? That is, can I use an embedded Python script in an action group to set the set point? If that's possible, would you kindly share some Python code to do this. If it's not yet possible, would you consider this as an enhancement request. Thanks.

Cheers,
Mike
Attachments
action group.png
action group.png (30.13 KiB) Viewed 2004 times

Posted on
Tue Jun 30, 2015 5:15 am
Chameleon offline
Posts: 611
Joined: Oct 04, 2014

Re: Action group to set cool or heat set point

mikeL wrote:
Hi Mike
Your plugin allows the creation of an action group to set the cool set point or heat set point to a specific numerical value, 23.5 degrees in the example below. So, to schedule different set points at specific times of the day one needs to create a series of action groups — one action group for each specific temperature — then invoke the appropriate action group when required.

Alternatively, can a single action group be created to set the set point from the value of a variable? That is, can I use an embedded Python script in an action group to set the set point? If that's possible, would you kindly share some Python code to do this. If it's not yet possible, would you consider this as an enhancement request. Thanks.

Cheers,
Mike


Let me think about how that could be done easily Mike...

Posted on
Tue Jun 30, 2015 8:52 am
Chameleon offline
Posts: 611
Joined: Oct 04, 2014

Re: Action group to set cool or heat set point

mikeL wrote:
Hi Mike
Your plugin allows the creation of an action group to set the cool set point or heat set point to a specific numerical value, 23.5 degrees in the example below. So, to schedule different set points at specific times of the day one needs to create a series of action groups — one action group for each specific temperature — then invoke the appropriate action group when required.

Alternatively, can a single action group be created to set the set point from the value of a variable? That is, can I use an embedded Python script in an action group to set the set point? If that's possible, would you kindly share some Python code to do this. If it's not yet possible, would you consider this as an enhancement request. Thanks.

Cheers,
Mike


Mike

I've thought about what you're saying and I just want to confirm the use case.

This is what I think you're asking for:

NEST Indigo Variable Setpoint.png
NEST Indigo Variable Set point Action Manager
NEST Indigo Variable Setpoint.png (80.1 KiB) Viewed 1952 times


If so I'll update NEST Home over the next day or so and let you test it before I release it to a more general population.

It's a very good idea though. I hate having so many action groups in my list and this would be a great space saver :D

Regards

Mike

Posted on
Tue Jun 30, 2015 12:00 pm
mikeL offline
Posts: 46
Joined: Apr 30, 2010
Location: Gatineau, QC

Re: Action group to set cool or heat set point

Mike
It turns out that the ThermostatDevice class of the Indigo IOM provides a means to do this and it works because the Nest Thermostat Module is a ThermostatDevice object.
So, in Python
Code: Select all
var = indigo.variables[576243972] # "scheduled_temperature"
coolSet = var.getValue(float)
indigo.thermostat.setCoolSetpoint("Main Thermostat", value=coolSet)

Or, in AppleScript
Code: Select all
set coolSet to value of variable "scheduled_temperature"
set cool setpoint of device "Main Thermostat" to coolSet

I created an action to execute that embedded code. My temperature scheduler sets the scheduled_temperature variable then calls the action. This seems to work perfectly and is cleaner than calling one of several actions to set a specific temperature value.
Cheers,
Mike

Posted on
Tue Jun 30, 2015 12:07 pm
mikeL offline
Posts: 46
Joined: Apr 30, 2010
Location: Gatineau, QC

Re: Action group to set cool or heat set point

Mike
I've thought about what you're saying and I just want to confirm the use case.

Yes, this is exactly the use case I have in mind. And, as you can see from my previous reply, there's a simple way to do this. Thanks, once again, for your extremely useful plugin.
Cheers,
Mike

Posted on
Tue Jun 30, 2015 5:17 pm
Chameleon offline
Posts: 611
Joined: Oct 04, 2014

Re: Action group to set cool or heat set point

mikeL wrote:
Mike
I've thought about what you're saying and I just want to confirm the use case.

Yes, this is exactly the use case I have in mind. And, as you can see from my previous reply, there's a simple way to do this. Thanks, once again, for your extremely useful plugin.
Cheers,
Mike

Cool code... You learn something everyday. Just goes to show that Matt and Jay have got some real power in the IOM.

My only suggestion would be to replace the name of the thermostat with the device Id because that never changes but the name might. You could also set up a device variable in the same way so that the embedded code could select a device and the set point.

Glad the plugin works for you :D

Mike

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 5 guests