Nest and Additional Temp Sensors

Posted on
Tue Dec 06, 2016 8:50 pm
Dlucas10 offline
Posts: 29
Joined: Jun 22, 2014

Nest and Additional Temp Sensors

Hello!

I came across your plugin and it looks awesome!

One thing I'm wondering, seeing Nest doesn't support multiple temperature sensors (I think they need to fix this), is this something your plugin supports? I have a case, where i need to support multiple temperature sensors that feed into the decision of the temperature. If your plugin doesn't support it, I think it would be a great addition seeing Nest doesn't want to add them..

Dave

Posted on
Wed Dec 07, 2016 6:13 am
Colorado4Wheeler offline
User avatar
Posts: 2794
Joined: Jul 20, 2009
Location: Colorado

Re: Nest and Additional Temp Sensors

If your temperature sensors are integrated into Indigo it would be a simple matter to create a trigger or action group for this. I use the Fibraro motion sensors that also report temperature to achieve this.

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Wed Dec 07, 2016 6:51 am
Dlucas10 offline
Posts: 29
Joined: Jun 22, 2014

Re: Nest and Additional Temp Sensors

Colorado4Wheeler wrote:
If your temperature sensors are integrated into Indigo it would be a simple matter to create a trigger or action group for this. I use the Fibraro motion sensors that also report temperature to achieve this.


Yes, they are. I was using smart devices to help with this, but it seems to not support air conditioning mode so this summer I had to disable them.

What I'm looking to accomplish is if I have temperature sensors in 3 rooms on my first floor to average those and report to Nest to help make decision to turn on Heat/AC in my house. Where the thermostats are, make it so it's possible to not get an accurate temperature to it. Is this something you're doing in your setup? If so, I'd be interested in how you've accomplished it.

Thanks!

Dave


Sent from my iPhone using Tapatalk

Posted on
Sat Dec 31, 2016 9:25 am
Chameleon offline
Posts: 611
Joined: Oct 04, 2014

Re: Nest and Additional Temp Sensors

Dave

That could be done but probably through a little python code in a schedule action that runs say every min. The main issue is that there isn't an AVERAGE function in the action conditions but it wouldn't be too hard to add a Server/Execute Action

The code would probably do something like this:

Read temperature from Device 1 into a python variable
Read temperature from Device 2 into a python variable
Read temperature from Device 3 into a python variable
Average the temperatures
Check if something needs to happen

In python it would look like:

Code: Select all
import indigo

# Get devices
t1 = indigo.devices[1632080987] # "Living Room Temperature"
t2 = indigo.devices[1167287922] # "Master Bedroom Temperature"
t3 = indigo.devices[476678264] # "Landing Temperature"

# Extract information on Temperatures
Temp1 = t1.displayStateValRaw
Temp2 = t2.displayStateValRaw
Temp3 = t3.displayStateValRaw

# Calculate average
tempAverage = round((Temp1+Temp2+Temp3)/3.0,1)

# Show the results in the indigo log as an example
indigo.server.log('Temperatures:'+str(Temp1)+' '+str(Temp2)+' '+str(Temp3))
indigo.server.log('Average:'+str(tempAverage))

# Now act
if tempAverage>18.0:
   indigo.server.log('Temperature too high - switching on cooling')
elif tempAverage<15.0:
   indigo.server.log('Temperature too low - switching off cooling')


Here's an example of the code in place in a New Schedule Page...

Screen Shot 2016-12-31 at 15.21.58.png
Create New Schedule Dialog
Screen Shot 2016-12-31 at 15.21.58.png (98.97 KiB) Viewed 2140 times


I'm not sure exactly what you want to do but if you let me know I'll try to come up with an action that changes your NEST when needed (and will probably be more elegant than this solution)

Regards

Mike

Posted on
Sat Aug 25, 2018 8:11 am
farberm offline
Posts: 393
Joined: Feb 24, 2008

Re: Nest and Additional Temp Sensors

Dave:

Did you ever get the three temperature sensors script to work. I am getting the following error:

Schedule Average Upstairs Temperature Trigger NEST
Script Error embedded script: unsupported operand type(s) for +: 'float' and 'unicode'
Script Error Exception Traceback (most recent call shown last):

embedded script, line 14, at top level
TypeError: unsupported operand type(s) for +: 'float' and 'unicode'

I had to change the script as follows to get it to work....
# Extract information on Temperatures
Temp1 =int( t1.displayStateValRaw)
Temp2 = int(t2.displayStateValRaw)
Temp3 =int( t3.displayStateValRaw)

What did command did you use to turn on cooling or turn off cooling?

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests

cron