Rachio Smart Sprinkler Controller

I’ve just stated on getting this binding running, but I’m afraid I’ve run into a roadblock after getting the proxy running (I’ve verified the external connection and running on http with https redirect support). Can anyone tell me where to find deviceid

From the docs:

root@odroid:/opt/openhab2/userdata/logs# grep -E 'rachio.*device' openhab.log
2020-07-12 00:49:12.782 [WARN ] [core.thing.internal.ThingManagerImpl] - Cannot unregister handler. No handler factory for thing 'rachio:device:e9650284' found.
2020-07-12 00:53:07.254 [DEBUG] [nal.discovery.RachioDiscoveryService] - Rachio: thing types: [rachio:device, rachio:zone, rachio:cloud] registered.
2020-07-12 00:53:08.300 [DEBUG] [g.rachio.handler.RachioDeviceHandler] - RachioDevice: Initializing Rachio device 'rachio:device:e9650284'.
2020-07-12 00:53:08.302 [DEBUG] [inding.rachio.internal.api.RachioApi] - RachioApi.getDevByUID: Unable map UID to devic
2020-07-12 11:47:18.209 [DEBUG] [nal.discovery.RachioDiscoveryService] - Rachio: thing types: [rachio:device, rachio:zone, rachio:cloud] registered.
2020-07-12 11:47:18.773 [DEBUG] [g.rachio.handler.RachioDeviceHandler] - RachioDevice: Initializing Rachio device 'rachio:device:e9650284'.
2020-07-12 11:47:18.774 [DEBUG] [inding.rachio.internal.api.RachioApi] - RachioApi.getDevByUID: Unable map UID to devic
2020-07-12 12:04:00.373 [DEBUG] [g.rachio.handler.RachioDeviceHandler] - RachioDevice: Initializing Rachio device 'rachio:device:8f1218cb'.
2020-07-12 12:04:00.375 [DEBUG] [inding.rachio.internal.api.RachioApi] - RachioApi.getDevByUID: Unable map UID to devic
2020-07-12 12:26:55.428 [DEBUG] [nal.discovery.RachioDiscoveryService] - Rachio: thing types: [rachio:device, rachio:zone, rachio:cloud] registered.
2020-07-12 12:26:56.109 [DEBUG] [g.rachio.handler.RachioDeviceHandler] - RachioDevice: Initializing Rachio device 'rachio:device:8f1218cb'.
2020-07-12 12:26:56.110 [DEBUG] [inding.rachio.internal.api.RachioApi] - RachioApi.getDevByUID: Unable map UID to devic
2020-07-12 12:28:47.099 [DEBUG] [g.rachio.handler.RachioDeviceHandler] - RachioDevice: Initializing Rachio device 'rachio:device:f4333648'.
2020-07-12 12:28:47.101 [DEBUG] [inding.rachio.internal.api.RachioApi] - RachioApi.getDevByUID: Unable map UID to devic
2020-07-13 02:10:07.874 [WARN ] [core.thing.internal.ThingManagerImpl] - Cannot unregister handler. No handler factory for thing 'rachio:device:f4333648' found.
2020-07-13 02:21:15.347 [DEBUG] [nal.discovery.RachioDiscoveryService] - Rachio: thing types: [rachio:device, rachio:zone, rachio:cloud] registered.
2020-07-13 02:21:16.615 [DEBUG] [g.rachio.handler.RachioDeviceHandler] - RachioDevice: Initializing Rachio device 'rachio:device:f4333648'.
2020-07-13 02:21:16.623 [DEBUG] [inding.rachio.internal.api.RachioApi] - RachioApi.getDevByUID: Unable map UID to devic
2020-07-13 11:25:20.555 [DEBUG] [nal.discovery.RachioDiscoveryService] - Rachio: thing types: [rachio:device, rachio:zone, rachio:cloud] registered.
2020-07-13 11:25:21.392 [DEBUG] [g.rachio.handler.RachioDeviceHandler] - RachioDevice: Initializing Rachio device 'rachio:device:f4333648'.
2020-07-13 11:25:21.394 [DEBUG] [inding.rachio.internal.api.RachioApi] - RachioApi.getDevByUID: Unable map UID to devic
2020-07-13 17:31:41.598 [DEBUG] [nal.discovery.RachioDiscoveryService] - Rachio: thing types: [rachio:device, rachio:zone, rachio:cloud] registered.
2020-07-13 17:31:43.367 [DEBUG] [g.rachio.handler.RachioDeviceHandler] - RachioDevice: Initializing Rachio device 'rachio:device:f4333648'.
2020-07-13 17:31:43.370 [DEBUG] [inding.rachio.internal.api.RachioApi] - RachioApi.getDevByUID: Unable map UID to devic
root@odroid:/opt/openhab2/userdata/logs# 

Can’t seem to find any reference to deviceid anywhere.

Thanks!

Newbee needs some help with Rachio binding.

Hello all. I have installed the Rachio binding and I am currently able to control my sprinklers from the OH interface. Of course, I can also control them using the Rachio app. However, at this time there is no communication working between OH and the native Rachio controls.

I have been trying to follow the instructions in the README for configuring the “event callback”. If I understand correctly, once I have managed to get a correct configuration, my OH UI and the Rachio app will become synchronized in displaying the current status of the sprinklers.

In order to configure that event callback, I have registered an account at clouDNS, created my own personal domain (“pisabell.ca”) and linked that domain with the IP that I am being assigned by my internet provider.

At this time, events generated on OH are still not echoed on the Rachio app, and vice-versa. Consequently, I am currently trying to go through the checks enumerated in the README under the paragraph “If events are not received”.

  • my rachio.things file is as follows:

‘’’
Bridge rachio:cloud:1 [apikey=“db5a5c0d-1e2a-4592-96f0-99c3a614b915”, pollingInterval=180, defaultRuntime=3600, callbackUrl=“http://pisabell.ca:50043/rachio/webhook”, clearAllCallbacks=true]
{
}
‘’’

  • in my router, I am redirecting TCP port 50043 to port 8080 on my OH host machine

  • http://127.0.0.1:8080/rachio/webhook does yield a white page

  • when I ping pisabell.ca I am told that a request is being sent to the IP address which happens to be my current external address according to whatsmyip. The server does not respond to the ping, which is the same behavior as if I ping that same external IP address directly.

  • but then I am getting stuck on the next checks I am supposed to make:

    • I don’t understand the instruction “open URL http://:/rachio/webhook”. Does the “//:/” part refer to my web domain? In any event “http://pisabell.ca/rachio/webhook” is getting no response.

    • “get the deviceId for the controller from the Rachio log entries”: Is the relevant device ID present in lines such as the following?

‘’’
‘rachio:device:1:009D6BBDE9CA’ changed from UNINITIALIZED (BRIDGE_UNINITIALIZED) to INITIALIZING
‘’’

Many thanks in advance.

@chrisjohnson please support here

I too am having issues with the webhook (and the binding in general). I have a local proxy setup and I’ve tested that I can in fact send to the webhook that I have established from multiple external sources including VMs at AWS and Azure. I have never once seen Rachio send anything to me. Also, from what I can tell, once the items populate on start, nothing else really ever happens. I can not trigger a zone to activate. I get no updates when the system is running.

I have rain sensor for my Rachio 3. I receive notice from Rachio app when rain sensor goes on or off. Is that possible somehow to have a channel for Rain sensor status in Openhab?

Short of responding to each and everyone of the qyuestions raised in my message of July 14, perhaps someone respond to the one question reproduced above? What is the meaning of the colon used in the notation “open URL http://:/rachio/webhook” used in the README file of the Rachio binding?
Thanks in advance,

which documentation are you using?
I merged the PR from @chrisjohnson. After that the should be no reverse proxy, just openHAB Cloud acting as a proxy. Please send the linke to the README and I could check.

Usually I would directly support here, but I’m super busy at the moment (in fact already the last weeks).

Hi Markus,

Thanks for your response. The README file I consulted is the following one:

https://github.com/markus7017/org.openhab.binding.rachio/blob/master/README.md

The way I accessed it is by googling “openhab rachio”. The first match is then:

https://community.openhab.org/t/rachio-smart-sprinkler-controller/7078

The reference to the README file above appears in the frame near the top of that page.

Pierre

ok, the repo you are using is deprecated

Please try this build
with this README

make sure to delete the old jar

@markus7017 thanks for taking the time to reply!

I take it from the readme on the updated repo to mean the self-hosted proxy method is no longer working and all rachio integration needs to go through myopenhab, is that correct?

yes, correct. This was done to ease the setup and improve security (no need to open the port on you router for inbound communication)

1 Like

@markus7017. Many thanks for directing me to the updated binding and README. I have installed the new jar file in the addons directory and followed the instructions in the README for installing the binding with its cloud connector. At this point I am starting to get some positive results but there are apparently some remaining problems.
The discovery process is working: my rachio and its three zones are automatically added a things and after activating them all their channels become available. In my items file, I added an item associated with each channel, just like in your example code in the README.
As an experiment, I added a switch for each channel in my sitemap, as follows:

     Frame label= "Irrigation" {
        Switch item=RachioZone1_Run icon="faucet"
    	Switch item=RachioZone2_Run icon="faucet"
    	Switch item=RachioZone3_Run icon="faucet"
        }

The switches do work OK in the sense that they correctly trigger the firing of each zone. However, when I use the Rachio app on my phone to fire a zone, the state of the corresponding switch in my OH UI does not get updated (like I suppose it should).

Perhaps the problem is related to some error messages that appear in my OH log. I don’t know if I should provide you with the complete log, but for the time being I will just post the error messages.

Here is the first one:

[org.openhab.binding.rachio.internal.api.RachioImageServlet(247)] : The setRachioHandlerFactory method has thrown an exception
java.lang.IllegalArgumentException: argument type mismatch
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:?]
	at org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:228) ~[43:org.apache.felix.scr:2.1.16]
	at org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500(BaseMethod.java:41) ~[43:org.apache.felix.scr:2.1.16]
	at org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke(BaseMethod.java:664) ~[43:org.apache.felix.scr:2.1.16]
	at org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke(BaseMethod.java:510) [43:org.apache.felix.scr:2.1.16]
	at org.apache.felix.scr.impl.inject.methods.BindMethod.invoke(BindMethod.java:42) [43:org.apache.felix.scr:2.1.16]
	at org.apache.felix.scr.impl.manager.DependencyManager.doInvokeBindMethod(DependencyManager.java:1813) [43:org.apache.felix.scr:2.1.16]
	at org.apache.felix.scr.impl.manager.DependencyManager.bindDependency(DependencyManager.java:1637) [43:org.apache.felix.scr:2.1.16]

Many more lines like that. Later, I find:

2020-08-18 11:26:26.370 [WARN ] [chio.internal.api.RachioImageServlet] - Could not start RachioImage servlet: alias: '/rachio/images' is already in use in this or another context
org.osgi.service.http.NamespaceException: alias: '/rachio/images' is already in use in this or another context
	at org.ops4j.pax.web.service.spi.model.ServerModel.addServletModel(ServerModel.java:124) ~[?:?]
	at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:243) ~[?:?]
	at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:223) ~[?:?]
	at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:207) ~[?:?]
	at org.ops4j.pax.web.service.internal.HttpServiceProxy.registerServlet(HttpServiceProxy.java:69) ~[?:?]
	at org.openhab.binding.rachio.internal.api.RachioImageServlet.activate(RachioImageServlet.java:75) 

And later, I find:

[org.openhab.binding.rachio.internal.api.RachioWebHookServlet(248)] : The setRachioHandlerFactory method has thrown an exception
java.lang.IllegalArgumentException: argument type mismatch
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:?]
	at org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:228) ~[43:org.apache.felix.scr:2.1.16]
	at org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500(BaseMethod.java:41) ~[43:org.apache.felix.scr:2.1.16]
	at org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke(BaseMethod.java:664) ~[43:org.apache.felix.scr:2.1.16]
	at org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke(BaseMethod.java:510) [43:org.apache.felix.scr:2.1.16]
	at org.apache.felix.scr.impl.inject.methods.BindMethod.invoke(BindMethod.java:42) [43:org.apache.felix.scr:2.1.16]
	at org.apache.felix.scr.impl.manager.DependencyManager.doInvokeBindMethod(DependencyManager.java:1813) [43:org.apache.felix.scr:2.1.16]
	at org.apache.felix.scr.impl.manager.DependencyManager.bindDependency(DependencyManager.java:1637) [43:org.apache.felix.scr:2.1.16]
	at org.apache.felix.scr.impl.manager.DependencyManager.bind(DependencyManager.java:1624) [43:org.apache.felix.scr:2.1.16]
	at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:307) [43:org.apache.felix.scr:2.1.16]
	at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:114) [43:org.apache.felix.scr:2.1.16]
	at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:982) [43:org.apache.felix.scr:2.1.16]

This last error apparently happens everytime I start a zone using my Rachio app rather than the OH interface, Looks like it is symptomatic of a fatal issue.

Am I understanding correctly that the recently merged PR prevents us from using a reverse proxy entirely and pushes the only option to be the openHAB cloud? I can understand from the threads above why this is preferred, but some of us have our own secure proxies and would like to be able to use them.

I had the same question. Markus just answered two posts ago

@markus7017 Any chance you can help me soon with my query of August 5?

Thanks in advance,

Pierre

yes, the last PR teplaced the local reverse proxy with the openHAB Cloud approach. @rlkoshak raised security concerns and @chrisjohnson brought in the PR.

I think both views have pro and cons. I’m pretty busy at the moment and could only provide limited support

Unless I am misunderstanding something, what I described in my message of August 5 is my attempt to get my setup working in the new OH Cloud approach. If this is the case, would that mean that I need Chris Johnson’s help rather than yours?

I’m I found some time to do a test. On my setup nothing works anymore
Thing Discovery is working as you describe, but all channels stay at NaN
It seems that the PR merge broke the functionality.
Let me do some investigation. Maybe it’s a small peace, maybe I’ll receive the complete PR.

While I 1000% agree with the security concerns noted above, and agree that the OH cloud is definitely a good option for many users, some of us don’t use it for a variety of reasons. Personally, my latency to the OH cloud is close to 300ms which causes a bunch of issues. That being said, I have my own proxy for exactly this reason. Forcing users to use the OH cloud, instead of making it a default option that can be reconfigured by an advanced user, makes this binding effectively useless for a subset of users.

Understood. Many thanks.