New NEST Plugin ready for general use

Plugins that users have built. NOTE: plugins that were developed for Indigo versions older than 2022.1 will have to be updated to work with Indigo 2022.1 (Python 3 - see this blog post for details). If the plugin listed here is not in the Plugin Store (which will show updated plugins) then you will need to ask on the appropriate thread below if it has been updated and where you get get the update.
Rocco
Posts: 37
Joined: Fri Oct 11, 2013 1:01 am

Re: New NEST Plugin ready for general use

Post by Rocco »

I'm not sure why, but the errors mentioned a few posts above haven't happened to me for a few days. I've been trying to clean up my network and reduce its load by not uploading massive files (disabled iCloud Drive) which may be providing more consistent communication with Nest- perhaps it has worked.

Rocco
User avatar
DaveL17
Posts: 7323
Joined: Tue Aug 20, 2013 11:02 am
Location: Chicago, IL, USA
Contact:

Re: New NEST Plugin ready for general use

Post by DaveL17 »

Hi Rocco - glad things seem to be working out for you.

How large is large? I have CrashPlan running, but that's in the background and shouldn't be calling for bandwidth when other things need it. My wife works from home and she get's any bandwidth she wants. :D

Dave
I came here to drink milk and kick ass....and I've just finished my milk.

My Plugins and Scripts
Rocco
Posts: 37
Joined: Fri Oct 11, 2013 1:01 am

Re: New NEST Plugin ready for general use

Post by Rocco »

Not very large necessarily- 5 to 20 Mb files- but sometimes several at a time (security camera footage). But it can cause several seconds of dead internet to anything else trying to connect at that moment. It's just a hunch, but I feel like they might be related.

I don't know how the plug-in communicates with nest- if a disruption in internet at the wrong time would even have an effect. I'm just searching for possible correlations, but I may be barking up the wrong tree. If the errors pop up again, I might run a Fing logger to see if there's a network disruption around the same time of plug-in failure.

Rocco
User avatar
DaveL17
Posts: 7323
Joined: Tue Aug 20, 2013 11:02 am
Location: Chicago, IL, USA
Contact:

Re: New NEST Plugin ready for general use

Post by DaveL17 »

Thanks Rocco -- please consider reporting back if you learn anything interesting.

Dave
I came here to drink milk and kick ass....and I've just finished my milk.

My Plugins and Scripts
Ksullivan
Posts: 83
Joined: Sat Feb 22, 2014 5:02 pm

Re: New NEST Plugin ready for general use

Post by Ksullivan »

Hi henkjanvries
Try setting your nest to fahrenheit and see if indigo can adjust the temperature, I had the same problem and read a different thread which led me to change to fahrenheit and mine works.
Good luck
Keith


Sent from my iPad using Tapatalk
TheTechnoPilot
Posts: 46
Joined: Mon Mar 31, 2014 9:16 pm
Location: Montreal, QC, Canada
Contact:

Re: New NEST Plugin ready for general use

Post by TheTechnoPilot »

I also need to try this solution as I have not had any luck getting the plugin to change the setpoint while in celcius. I'll try switching when I get back home from my trip.
Android's Tasker, to a person who does home automation...is like walking up to a Crack Treatment facility with a truck full of 3lb bags of crack. Then for each person that walks in and out smack them in the face with an open bag.
User avatar
henkjanvries
Posts: 108
Joined: Sat May 05, 2012 6:48 am

Re: New NEST Plugin ready for general use

Post by henkjanvries »

Ksullivan wrote:Hi henkjanvries
Try setting your nest to fahrenheit and see if indigo can adjust the temperature, I had the same problem and read a different thread which led me to change to fahrenheit and mine works.
Good luck
Keith


Sent from my iPad using Tapatalk
Hi Ksullivan,

that did the trick. But id really really like celcius, because we in the netherlands use the metric system.

Is there anyway to get this working with celsius?

thanks for making it work.
Ksullivan
Posts: 83
Joined: Sat Feb 22, 2014 5:02 pm

Re: New NEST Plugin ready for general use

Post by Ksullivan »

Not sure but someone had put the request in to the guy who made the plugin as there is a bug some where, glad the temp fix worked for you.


Sent from my iPad using Tapatalk
User avatar
henkjanvries
Posts: 108
Joined: Sat May 05, 2012 6:48 am

Re: New NEST Plugin ready for general use

Post by henkjanvries »

Are there any fixes for the F/C conversion, ive trolled through the plugin and found the conversion in a js, but don't know how to fix it.

i hope VTMIKEL can help soon!
Ksullivan
Posts: 83
Joined: Sat Feb 22, 2014 5:02 pm

Re: New NEST Plugin ready for general use

Post by Ksullivan »

I use a conversion to amend a variable but I agree we could do with a fix please


Sent from my iPad using Tapatalk
TheTechnoPilot
Posts: 46
Joined: Mon Mar 31, 2014 9:16 pm
Location: Montreal, QC, Canada
Contact:

Re: New NEST Plugin ready for general use

Post by TheTechnoPilot »

Definitely agreed, as I used to use my own little python program to control the temperature back before Nest changed their back end and broke it and that was in Celsius, it is annoying to step backwards in functionality. Being Canadian I've grown up with Celsius too and Fahrenheit has very little meaning to me.
Android's Tasker, to a person who does home automation...is like walking up to a Crack Treatment facility with a truck full of 3lb bags of crack. Then for each person that walks in and out smack them in the face with an open bag.
mikeL
Posts: 46
Joined: Fri Apr 30, 2010 4:25 pm
Location: Gatineau, QC

Re: New NEST Plugin ready for general use

Post by mikeL »

In my case I can go for a few hours from a reset of the plugin before I start getting ‘Invalid message' errors. Then it’s downhill from that point. For example, the current_temperature state no longer updates, so Indigo is unable to take any action based on temperature.

For now, I’m forcing the plugin to restart every three hours and we’ll see if that helps. Here's the embedded Python I use for the scheduled event.

Code: Select all

# Restart the Nest plugin to work around an intractable bug
indigo.server.log("Restarting YANTP...",isError=False, type="Scheduled Restart")
pluginId = "org.mlamoureux.nestplugin" # CFBundleIdentifier supplied by the plugin's Info.plist
plugin = indigo.server.getPlugin(pluginId)
plugin.restart()
Cheers,
Mike
mikeL
Posts: 46
Joined: Fri Apr 30, 2010 4:25 pm
Location: Gatineau, QC

Re: New NEST Plugin ready for general use

Post by mikeL »

A few days later...
Forcing the plugin to restart every three hours has improved its reliability considerably. However, every now and then, the plugin fails immediately following a restart and stays failed until the next restart (or longer!).

So, rather than waiting another three hours to restart the plugin, I am now detecting if the plugin has failed by looking for the “Invalid message:” error in the latest 10 lines of the event log file, doing that every 45 seconds. If the error is found, the plugin gets restarted again.

Here’s an example where the plugin failed immediately after a scheduled restart. The error was detected and, it was good to go after the second restart.

Code: Select all

  Yet Another Nest Thermostat Plugin Invalid message:     at Socket.socket.ondata (http.js:1966:22)

  Yet Another Nest Thermostat Plugin     at TCP.onread (net.js:527:27)

  Yet Another Nest Thermostat Plugin Invalid message:     at TCP.onread (net.js:527:27)


Nov 21, 2014, 6:00:45 AM
  Trigger                         YANTP error detected
  YANTP Error                     Restarting YANTP following error detection...
  Reloading plugin "Yet Another Nest Thermostat Plugin 1.1.2"
  Stopping plugin "Yet Another Nest Thermostat Plugin 1.1.2" (pid 34754)
  Yet Another Nest Thermostat Plugin stopping NEST listener thread...
  Stopped plugin "Yet Another Nest Thermostat Plugin 1.1.2"
  Starting plugin "Yet Another Nest Thermostat Plugin 1.1.2" (pid 34855)
  Started plugin "Yet Another Nest Thermostat Plugin 1.1.2"
Here's my embedded AS to detect the failure. This runs every 45 seconds:

Code: Select all

-- Test latest log messages for YANTP errors
set bad to "Invalid message:"
set res to (do shell script "tail -q -n 10 '/Library/Application Support/Perceptive Automation/Indigo 6/Logs/indigo_log.txt'")
if res contains bad then
	set value of variable "YANTP_error" to "true"
	-- This triggers a restart of the plugin
end if
A trigger is setup on the variable "YANTP_error" such that when the variable becomes "true" the restart code is called and the variable reset to "false".

Cheers,
Mike
Rocco
Posts: 37
Joined: Fri Oct 11, 2013 1:01 am

Re: New NEST Plugin ready for general use

Post by Rocco »

Ah, that's great! I look forward to giving it a shot- Thanks Mike!

Rocco
ckeyes888
Posts: 2438
Joined: Thu Nov 26, 2009 2:41 pm
Location: Kalispell, MT

Re: New NEST Plugin ready for general use

Post by ckeyes888 »

mikeL wrote:A few days later...
Forcing the plugin to restart every three hours has improved its reliability considerably. However, every now and then, the plugin fails immediately following a restart and stays failed until the next restart (or longer!).

So, rather than waiting another three hours to restart the plugin, I am now detecting if the plugin has failed by looking for the “Invalid message:” error in the latest 10 lines of the event log file, doing that every 45 seconds. If the error is found, the plugin gets restarted again.

Here’s an example where the plugin failed immediately after a scheduled restart. The error was detected and, it was good to go after the second restart.

Code: Select all

  Yet Another Nest Thermostat Plugin Invalid message:     at Socket.socket.ondata (http.js:1966:22)

  Yet Another Nest Thermostat Plugin     at TCP.onread (net.js:527:27)

  Yet Another Nest Thermostat Plugin Invalid message:     at TCP.onread (net.js:527:27)


Nov 21, 2014, 6:00:45 AM
  Trigger                         YANTP error detected
  YANTP Error                     Restarting YANTP following error detection...
  Reloading plugin "Yet Another Nest Thermostat Plugin 1.1.2"
  Stopping plugin "Yet Another Nest Thermostat Plugin 1.1.2" (pid 34754)
  Yet Another Nest Thermostat Plugin stopping NEST listener thread...
  Stopped plugin "Yet Another Nest Thermostat Plugin 1.1.2"
  Starting plugin "Yet Another Nest Thermostat Plugin 1.1.2" (pid 34855)
  Started plugin "Yet Another Nest Thermostat Plugin 1.1.2"
Here's my embedded AS to detect the failure. This runs every 45 seconds:

Code: Select all

-- Test latest log messages for YANTP errors
set bad to "Invalid message:"
set res to (do shell script "tail -q -n 10 '/Library/Application Support/Perceptive Automation/Indigo 6/Logs/indigo_log.txt'")
if res contains bad then
	set value of variable "YANTP_error" to "true"
	-- This triggers a restart of the plugin
end if
A trigger is setup on the variable "YANTP_error" such that when the variable becomes "true" the restart code is called and the variable reset to "false".

Cheers,
Mike
Is there some way to test if the script to handle the plugin restart is working?
I tried simply pasting the "bad" text into the log file, saving, then executing the script but nothing happens.

Thanks,

Carl
Post Reply

Return to “User Plugins”