Thanks! That works great. However I cannot turn off the sprinkler using the home assistant switch nor the actual Rachio app. I guess it’ll run until the 10 minutes is up lol
Ha. Well that I can’t explain! There’s still an issue with the switches not showing correctly during manual runs in that release as well. Doesn’t explain why the app doesn’t turn it off though!
Update on that issue. I believe I confused Rachio when I was messing with the switch. Probably turned it back on and off 4 times. Was able to stop that one by starting a manual run in the app and then stopping that. Just ran another zone by turning on the switch once and I was able to stop that one in the Rachio app.
I’d love to assist with testing this one or even helping with code. Do we know if this is a limitation for manual runs in the Rachio API? Just wondering since the scheduled times turn on the switches correctly.
I believe @Klikini is the actual dev for this, I’ve just been playing around with it and trying to help where I can. I think we have the issue with the switch state in manual runs figured out (I mentioned it several posts ago if you want to mess with it, I think 30 seconds on the update interval is more appropriate than the 5 seconds in that post), it just needs to get pushed through. I’m sure more feedback on this platform would be appreciated!
This problem is actually fixed in my fork (https://github.com/klikini/home-assistant) but I’m not sure exactly how to get my changes merged with upstream correctly. I ended up with a major rebase conflict and gave up the other day.
Ok great! I completely skipped over that reply. Is that in the Rachio.py file as well?
Nevermind. Found it and it works properly now. Still a bit odd when you turn the switch off it comes back on but it goes away eventually and does stop the zone from running
I upgraded to 48.0 today and am now getting this “.cache permission” error for Rachio. Anybody have any ideas?
Here is my log:
2017-07-01 20:23:48 ERROR (MainThread) [homeassistant.components.switch] Error while setting up platform rachio
Traceback (most recent call last):
File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 164, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
File "/usr/lib/python3.4/asyncio/tasks.py", line 372, in wait_for
return fut.result()
File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
raise self._exception
File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
result = self.fn(*self.args, **self.kwargs)
File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/switch/rachio.py", line 43, in setup_platform
from rachiopy import Rachio
File "/home/homeassistant/.homeassistant/deps/rachiopy/__init__.py", line 14, in <module>
_HTTP = httplib2.Http('.cache')
File "/home/homeassistant/.homeassistant/deps/httplib2/__init__.py", line 915, in __init__
self.cache = FileCache(cache)
File "/home/homeassistant/.homeassistant/deps/httplib2/__init__.py", line 675, in __init__
os.makedirs(self.cache)
File "/srv/homeassistant/homeassistant_venv/lib/python3.4/os.py", line 237, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '.cache'
I’m receiving this exact error on 0.48.1.
I am seeing the same stack-trace.
I guess I’ll hold off on upgrading after seeing this
Upgraded to 49.0 today and it appears that this problem still exists
A fix has been found, see here: https://github.com/home-assistant/home-assistant/issues/8418#issuecomment-315918428
My Rachio zones are now showing up like they should, but for some reason one of them is showing “on” all the time
I am getting this error in my logfile:
2017-07-19 16:04:55 ERROR (Thread-3) [homeassistant.util.package] Unable to install package rachiopy==0.1.2: Exception:
Traceback (most recent call last):
File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/pip/commands/install.py", line 335, in run
wb.build(autobuilding=True)
File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/pip/req/req_set.py", line 620, in _prepare_file
session=self.session, hashes=hashes)
File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/pip/download.py", line 809, in unpack_url
unpack_file_url(link, location, download_dir, hashes=hashes)
File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/pip/download.py", line 715, in unpack_file_url
unpack_file(from_path, location, content_type, link)
File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/pip/utils/__init__.py", line 599, in unpack_file
flatten=not filename.endswith('.whl')
File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/pip/utils/__init__.py", line 484, in unzip_file
zip = zipfile.ZipFile(zipfp, allowZip64=True)
File "/usr/lib/python3.4/zipfile.py", line 937, in __init__
self._RealGetContents()
File "/usr/lib/python3.4/zipfile.py", line 978, in _RealGetContents
raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file
2017-07-19 16:04:55 ERROR (MainThread) [homeassistant.setup] Not initializing switch.rachio because could not install dependency rachiopy==0.1.2
2017-07-19 16:04:55 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform switch.rachio: Could not install all requirements.
Help!
Thanks
Tom
Try to manually install rachiopy on terminal
So I can find the package - I just have no idea how to install once I download and unpack it.
(sorry I’m such a noob! )
Figured it out (python setup.py install)
Thanks!
Spoke too soon. It sure loks like rachiopy installed successfully, but still getting the same error.
Hey guys, I know I’m kinda derailing the conversation a little here, but I was looking for a little help on some updates I made to the Rachio component. The main change is that I added support for schedules, as well as a few minor things. The problem is I’m really new at all this and I feel like the way I did it is a bit hacky. I essentially just added a second layer onto the code that @Klikini built, but in doing so it seems like there is a lot of redundancy that could be eliminated and I’m not sure how to accomplish that. I’m asking those of you who have experience in all this to take a look and help me out, and feel free to give feedback. Thanks
I have minimal experience with Python but it looks fine to me.
Which parts did you think were redundant? I don’t think it’s any more redundant that my original code, which was based on previous components
Glad to hear! I wasn’t sure if maybe there was a way to just have one type of SwitchDevice that handled both zones and schedules instead of the two separate classes. It seems to work just fine, I just want to avoid embarrassment if I submit a PR