Rachio Plugin (Locked)

Posted on
Wed Feb 28, 2018 4:42 pm
jay (support) offline
Site Admin
User avatar
Posts: 18221
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Rachio Plugin

Update: I think we've gotten as firm an answer as we're going to get. Basically, we're going to slow down polling to once every several minutes rather than once a minute (exact # is TBD). What this means for you is that if you control the sprinkler through the Rachio app (or a Rachio schedule is running) then the status on your Indigo Rachio device will be out out of sync for several minutes. This may not be an issue for most of you since you use Indigo to control the sprinkler. At some point (after we make some IWS changes) we'll look at supporting the Rachio web hooks which will "push" status. But the changes required to make that reasonable won't be available until at least later this year.

If you have multiple Rachio controllers, you're going to have even more issues since it will double the number of calls required. I'm going to add polling interval to the plugin config and implement a minimum poll time. That will enable anyone with multiple controllers to make the poll interval even larger to avoid timeouts. I'm also adding several more operational things to help harden the plugin and it's operation.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed Feb 28, 2018 4:51 pm
jay (support) offline
Site Admin
User avatar
Posts: 18221
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Rachio Plugin

BTW, if you are using the Rachio UI/Schedules in any regular way (not ad-hoc for testing or out-of-bounds conditions), let me know. I suspect not many are, but it would be nice to know.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed Feb 28, 2018 4:52 pm
Colorado4Wheeler offline
User avatar
Posts: 2794
Joined: Jul 20, 2009
Location: Colorado

Re: Rachio Plugin

jay (support) wrote:
Basically, we're going to slow down polling to once every several minutes rather than once a minute

What about having a configurable option in the plugin for the times of the day to poll? In my case, for example, I don't need to poll all night long, only during the day - and if their API limit resets at midnight then I can poll every minute all day long and not be out of sync. Something else I've done with API throttles is keep an internal counter of how many calls are made before reset time and you could leave it to the user to poll up to a "safety limit" at which case you force a throttle or discontinue API calls (I prefer the limiter, that way you hit that and still get updates, say, every 5 minutes).

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 Feb 28, 2018 5:41 pm
jay (support) offline
Site Admin
User avatar
Posts: 18221
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Rachio Plugin

Colorado4Wheeler wrote:
What about having a configurable option in the plugin for the times of the day to poll? In my case, for example, I don't need to poll all night long, only during the day - and if their API limit resets at midnight then I can poll every minute all day long and not be out of sync. Something else I've done with API throttles is keep an internal counter of how many calls are made before reset time and you could leave it to the user to poll up to a "safety limit" at which case you force a throttle or discontinue API calls (I prefer the limiter, that way you hit that and still get updates, say, every 5 minutes).


Near as I can tell it's a rolling 24-hour period, so saving them up until the end of day won't work. I suspect that would be over-engineering anyway.

In any event, I'm not going to try to get tricky with the polling periods, that just takes more time than I'm willing to spend given other priorities (I'd rather not be doing anything on it at the moment but I can't really do that).

The beauty of this plugin is that it's open source, so anyone can make changes. As long as the KISS principle remains (and the contribution looks good) I'll accept any changes.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed Feb 28, 2018 5:59 pm
Professor Falken offline
User avatar
Posts: 289
Joined: Mar 29, 2015

Re: Rachio Plugin

What this means for you is that if you control the sprinkler through the Rachio app (or a Rachio schedule is running) then the status on your Indigo Rachio device will be out out of sync for several minutes. This may not be an issue for most of you since you use Indigo to control the sprinkler.


So does this mean, from a keep-it-synced standpoint, I'm better off building a zone schedule in Indigo and having Indigo run the whole thing? Right now, I just have Indigo call one of my saved Rachio schedules at 4:00 in the morning (different one for Spring, Summer, Fall). But it wouldn't be hard to just move the zone durations over to within Indigo if that would make it stay synced better.

Posted on
Thu Mar 01, 2018 10:54 am
jay (support) offline
Site Admin
User avatar
Posts: 18221
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Rachio Plugin

Professor Falken wrote:
So does this mean, from a keep-it-synced standpoint, I'm better off building a zone schedule in Indigo and having Indigo run the whole thing? Right now, I just have Indigo call one of my saved Rachio schedules at 4:00 in the morning (different one for Spring, Summer, Fall). But it wouldn't be hard to just move the zone durations over to within Indigo if that would make it stay synced better.


Well, if you want Indigo to show status (and potentially logic) that's more up to date than, say, 3+ minutes, then moving all logic to Indigo would be the right thing to do. I use the Rachio in this way: Indigo controls everything, it just tells the Rachio when to turn on a zone and when to stop running. With Indigo in control, status should always be correct.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Thu Mar 01, 2018 11:27 am
Colorado4Wheeler offline
User avatar
Posts: 2794
Joined: Jul 20, 2009
Location: Colorado

Re: Rachio Plugin

And if you go the email that I got, it's now apparent why there were so many recent changed - I'm betting the new software was causing a lot of traffic (or any number of other things they could resolve on the backend).
Attachments
Screen Shot 2018-03-01 at 10.26.37 AM.png
Screen Shot 2018-03-01 at 10.26.37 AM.png (279.21 KiB) Viewed 4407 times

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
Fri Mar 02, 2018 1:09 pm
jay (support) offline
Site Admin
User avatar
Posts: 18221
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Rachio Plugin

Ok guys, after spending a lot of time on this unexpected issue, I've added a prerelease of v1.1.0 on Github (not in the store yet). If you are willing, please download and install this version and let me know if you find any issues. The wiki docs have been updated with the new plugin information.

To summarize: On 2/24/2018(ish), Rachio began rate limiting API calls. This caused at least some of you to see plugin failures. After some communication with Rachio, I determined what the (current) rate limit is (1700 calls/day) and I did a lot of testing to see what we could do. Here's what the new version of the plugin does:

  • It limits polling Rachio for status to once every 3 minutes. This should keep most users out of trouble, though if you own multiple controllers you may need to increase the polling interval in the plugin preferences. The downside of this is that if you control your Rachio via their app or run Rachio schedules (rather than Indigo schedules), then the status of the controller may be as much as 3 minutes old as represented in Indigo. If you use Indigo solely to control the sprinkler, you shouldn't see any status delays since we update state immediately after successfully telling the API what do do.
  • We've also added a variety of events that you can create Indigo Triggers for that will catch sprinkler errors (when we couldn't tell the Rachio to do something) and/or communication errors (not specific to the controller, but rather just any type of comm error whenever we try to talk to Rachio's API). These events will allow you to create your own notifications whenever something is going wrong.
  • Not directly related, but we've added daily plugin update checks and an associated event so that you can create a trigger to let you know when there's an update of the plugin available. If you create a variable named Rachio_Sprinklers_Available_Version, the update check will insert the new version number whenever we find an update.

So, give it a try and let me know if you find any issues. If I don't get any negative feedback by 3/5/2018, I'll assume everything is working and will publish the final release to the Plugin Store. Thanks everyone for their patience and time.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Fri Mar 02, 2018 2:54 pm
norcoscia offline
User avatar
Posts: 1206
Joined: Sep 09, 2015

Re: Rachio Plugin

Thx, Jay - I will let you know if I see anything strange

_______
Norm

Posted on
Fri Mar 02, 2018 11:54 pm
ZachBenz offline
Posts: 163
Joined: Feb 08, 2014

Re: Rachio Plugin

FWIW, I'm seeing another issue since they pushed out the update on their end (exists in version 1.1.0 of the plugin as well). This error pops up each time the plugin polls:

Code: Select all
Rachio Sprinklers Error         Unknown error:
Traceback (most recent call last):
  File "plugin.py", line 298, in _update_from_rachio
    if dev_dict["elevation"] != dev.states["elevation"]:
KeyError: 'elevation'


Haven't taken a look at plugin.py yet, but will these weekend.

This is really just a general heads up, not a request for a fix. :o I'll take a look into it myself.

Best regards,
-Zach

ZachBenz's Plugins: RingForIndigo

Posted on
Sat Mar 03, 2018 5:59 am
norcoscia offline
User avatar
Posts: 1206
Joined: Sep 09, 2015

Re: Rachio Plugin

No errors for me so far :-)

_______
Norm

Posted on
Sat Mar 03, 2018 3:09 pm
jay (support) offline
Site Admin
User avatar
Posts: 18221
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Rachio Plugin

ZachBenz wrote:
FWIW, I'm seeing another issue since they pushed out the update on their end (exists in version 1.1.0 of the plugin as well). This error pops up each time the plugin polls:

Code: Select all
Rachio Sprinklers Error         Unknown error:
Traceback (most recent call last):
  File "plugin.py", line 298, in _update_from_rachio
    if dev_dict["elevation"] != dev.states["elevation"]:
KeyError: 'elevation'


Haven't taken a look at plugin.py yet, but will these weekend.

This is really just a general heads up, not a request for a fix. :o I'll take a look into it myself.

Best regards,
-Zach


Interesting - it's either complaining that their API isn't including the "elevation" field or that your device doesn't have an "elevation" state. I doubt it's the latter because I don't believe I ever released a version of the plugin that didn't have elevation (but you could just recreate the device to be sure).

If it's the former, then that's odd since others are still receiving it. It's easy enough to test to make sure the key exists in the dev_dict before it attempts to use it.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat Mar 03, 2018 3:52 pm
GRWilde offline
User avatar
Posts: 173
Joined: Nov 15, 2005
Location: Los Angeles

Re: Rachio Plugin

I am also getting the following elevation error since the Rachio update:

Rachio Sprinklers Error Unknown error:
Traceback (most recent call last):
File "plugin.py", line 197, in _update_from_rachio
if dev_dict["elevation"] != dev.states["elevation"]:
KeyError: 'elevation'

George Wilde

Posted on
Sat Mar 03, 2018 4:22 pm
jay (support) offline
Site Admin
User avatar
Posts: 18221
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Rachio Plugin

Do you guys have the location set for your sprinkler in the Rachio App? I don't recall if setting that was optional when I set it up but maybe it is. I'll fix this when I push the final release on Monday.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat Mar 03, 2018 4:55 pm
GRWilde offline
User avatar
Posts: 173
Joined: Nov 15, 2005
Location: Los Angeles

Re: Rachio Plugin

I do have the location set in my Rachio App.

George Wilde

Who is online

Users browsing this forum: No registered users and 3 guests