Rachio switches in the front end do not reflect real world state. For example, if I turn on a switch to manually enable a watering zone, the switch will automatically toggle back to off after a few seconds even though the manual watering begins on the Rachio controller.
arch | armv7l
-- | --
dev | false
docker | true
hassio | true
os_name | Linux
os_version | 4.19.106-v7
python_version | 3.7.7
timezone | America/Los_Angeles
version | 0.108.3
virtualenv | false
configuration.yamlrachio:
api_key: !secret rachio_api
manual_run_mins: 1
logger:
default: warn
logs:
homeassistant.components.rachio: debug
I am not seeing any info in the logs despite changing the Rachio Component to "debug". I included my logger config above, so please let me know if I need to modify something there to get valid traceback data.
It seems that after a restart of HA it will refresh the Rachio switches with current state. For example if I change the switch.rachio_main_in_standby_mode in the front end, it will go back to "off" after a few seconds, even though the Rachio controller has in fact been put into standby mode. After a restart of HA, the switch.rachio_main_in_standby_mode will show the correct position of on. Seems like it is getting that info from the Rachio API upon reboot only?
Thanks in advance to whomever can take the time to look into this.
Hey there @bdraco, mind taking a look at this issue as its been labeled with a integration (rachio) you are listed as a codeowner for? Thanks!
@reisfni Is your Home Assistant instance reachable by the outside world? rachio uses webhooks to be able to update the switches.
I recently converted it to support cloudhooks in #33724 but that only works if you have Home Assistant Cloud
@bdraco yep I鈥檓 set up with Home Assistant Cloud.
Do I need to add the base_url to my configuration.yaml? If so, is that just external URL listed in Configuration >> HA Cloud?
@bdraco I took a look at the changes you put in for #33724 and based on what I read, should I be seeing a cloudhook entry show up in the config/cloud/account page after adding the Rachio integration? I didn't see one, so I removed / re-added the integration and still not seeing one.
Thanks
@reisfni Realized cloudhooks don't land until 0.109. I'll pull the code out so you can give is a shot shortly.
I've setup a version with more debug output that can be installed in custom_components
Step 1:
Add the following to your configuration.yaml
logger:
default: info
logs:
custom_components.rachio: debug
Step 2
cd /config
mkdir custom_components
cd custom_components
git clone https://github.com/bdraco/rachio
Step 3:
Restart
I've setup a version with more debug output that can be installed in
custom_componentsStep 1:
Add the following to your configuration.yamllogger: default: info logs: custom_components.rachio: debugStep 2
cd /config mkdir custom_components cd custom_components git clone https://github.com/bdraco/rachioStep 3:
Restart
@bdraco
All three steps complete:

However, I'm still having the same issue. When toggling a zone on in the from the HA front end the Rachio Controller turns the zone on however the zone entity switch state goes back to 'off' after a few seconds.

Also, I tried manually running a zone from the Rachio Controller and the switch state in HA did not update and I did not see any switch state changes in HA.
Would you please check .storage/core.config_entries to see if a cloud hook was created in the rachio entry?
Initially no it wasn't creating a webhook.
However I removed the rachio integration, restarted HA, then re-added the integration and it created the webhook.
So far it seems like it is working now, going to do a few more tests over the next couple of days and will close it out if its working.
Thanks for all the help here.
So my Rachio configuration was working before 0.108 and it seemed to have imported properly. This morning I noticed that the switches were no longer turning on when the schedule ran. Seems something is not working properly here. Do I need to remove and re-add the integration so it works properly? I am not using nabu casa but I do have my base URL set and this was working in 0.107 so I don't think the cloud hooks apply to me but the same issue with the state not updating impacts me.


@dshokouhi Can you try the custom repo and report back?
@bdraco I just toggled a zone, the zone came on as expected but the switch is still off the state is not updating.


Was that with the custom version or the 0.108 version?
@bdraco with the custom version you linked to. I am running this in my dev instance. I just ran another zone and this is the only debug statement, switch state is still off
2020-04-17 08:34:49 DEBUG (SyncWorker_9) [custom_components.rachio.switch] Watering Zone 7 Front Lawn Street on sprinklers for 0:10:00
Looks like the webhooks aren't able to hit your HASS instance for whatever reason.
I'll push some more debug logs into the custom one shortly
That is odd because this was working before and my instance is definitely accessible to the outside, I have many things like Google Assistant and the Mobile App that depend on it being externally accessible with a valid SSL cert.
2020-04-17 15:46:41 DEBUG (MainThread) [custom_components.rachio] Registered webhook url: https://XXXXXX:8128/api/webhook/XXXXXX
2020-04-17 15:46:43 DEBUG (SyncWorker_19) [custom_components.rachio.device] Rachio has the following webhooks registered: [...snip....]
I pushed up 617320548970d1c922d542c99ecc8f410026f6ab to the repo. It should log like the above
If you hit the webhook url in your browser you should get a
405: Method Not Allowed
ok ill take a look at it in a few and report back
@bdraco my bad when I tested your custom component at first I realized that my dev instance was not externally accessible 馃檲 so I ended up testing in my prod instance which is externally accessible and I see that the switch stays on with your custom component and the webhook returns a 405 error. Odd that the webhook URL hits smartthings lol but the code in your custom component is indeed working as expected.
@bdraco my bad when I tested your custom component at first I realized that my dev instance was not externally accessible 馃檲 so I ended up testing in my prod instance which is externally accessible and I see that the switch stays
onwith your custom component and the webhook returns a 405 error. Odd that the webhook URL hits smartthings lol but the code in your custom component is indeed working as expected.
That鈥檚 good news as that鈥檚 what鈥檚 in 0.109
Thats great and sorry for the false alarm, I am just used to testing things in my dev instance and forgot about the externally accessible part lol