I added a validation on the inbound request come from AWS - Rachio cloud is hosted here. The list of valid IP address ranges is loaded on binding initialization directly from AWS, so will be up-to-date.
I changed the device / zone event string to be a JSON format, I remove the “gson” stuff required to reconstruct the object. So this information can be processed by a OH rule.
Still need some time to figure out the https problem. Maybe a Jetty config problem.
The next days I let the binding run. Events are processed and then I could check the log for additional unhandled events, which might be processed to provide for event driven information.
Hello folks, new here to try to get started with the Rachio binding. I followed the steps above on post 127 but cant get through to installing things when I scan. I see this after I scan but I get a “Thing not found error when I try to add.”
I am also seeing this when I go into karaf. No matter which snapshot I download, I see the same “2.3.0.201802071915” not sure if thats always going to be the case.
In general:
copy thr jar to your addons folder
enable debugging: open karaf/openhab console and type ‚log:set DEBUG org.openhab.binding.rachio‘
create a rachio.things file in the things folder, see readme for syntax
make sure to add the apikey to the config (not apiKey as is previous versions)
when you do a manual scan it should create things for all controllers and things under your account (apikey)
otherwise check openhab.log for errors and post an extract here
if basic stuff is running check the README how to setup the event interface (opening a port on your router and setting callbackUrl in the thing definition).
First thanks for this, I love the idea of having all my automation in one place.
I went ahead and followed your instructions. When the new rachio binding was installed it did not create a rachio.cfg file. Not really sure if it is supposed to based on the readme file but I was expecting it to. I ended up creating a rachio.things file and added the info as explained at the bottom of the readme file. I never populated a .cfg file. It loaded with no problem and when I did my initial scan it found my zones and the rachio controller. I added the things it found to openhab and then the items as well. As I was doing this I noticed that it went offline. I had also made the portforward to my rachio controller before I even began setting up in openhab.
I see this in the debug file.
2018-04-17 21:38:31.014 [DEBUG] [rnal.api.RachioEvent$RachioApiResult] - RachioApi: Remaing number of API: limit=1700, remaining=1694, reset at 2018-04-19T00:00:00Z
2018-04-17 21:38:31.020 [ERROR] [g.rachio.handler.RachioBridgeHandler] - RachioBridge: API access blocked on update (0 / 0), reset at
A restart of openhab temporarily fixes it but eventually goes back to this in the log. I havent been able to control the rachio just yet because it disconnects too quickly.
2018-04-17 21:48:16.160 [DEBUG] [inding.rachio.internal.api.RachioApi] - RachioApi: Using cached personId ('REDACTED_CODE').
2018-04-17 21:48:16.908 [DEBUG] [rnal.api.RachioEvent$RachioApiResult] - RachioApi: Remaing number of API: limit=1700, remaining=1690, reset at 2018-04-19T00:00:00Z
2018-04-17 21:48:16.917 [ERROR] [g.rachio.handler.RachioBridgeHandler] - RachioBridge: API access blocked on update (0 / 0), reset at
2018-04-17 21:48:33.144 [ERROR] [lmessage.RequestNodeInfoMessageClass] - Request node info not placed on stack due to error.
I restarted one last time just to see if the controls would go out while it was responding and here is what I got… ( The sprinklers did respond but lost communication again)
2018-04-17 22:05:49.097 [DEBUG] [ing.rachio.handler.RachioZoneHandler] - RachioZone.handleCommand ON for rachio:zone:1:RANDOMNUMBER-1:run
2018-04-17 22:05:49.099 [INFO ] [ing.rachio.handler.RachioZoneHandler] - RachioZone: Starting zone 'Pool Zone [1]' for 0 secs
2018-04-17 22:05:49.100 [DEBUG] [ing.rachio.handler.RachioZoneHandler] - RachioZone: No specific runtime selected, using default (120 secs);
2018-04-17 22:05:49.101 [DEBUG] [inding.rachio.internal.api.RachioApi] - RachioApi: Start zone 'SOME_RANDOM_NUMBER' for 120 sec.
2018-04-17 22:05:49.885 [ERROR] [inding.rachio.internal.api.RachioApi] - RachioApi: Running zone 'SAME_RANDOM_NUMBER' for 120sec failed: RachioHttp: Error sending HTTP GET request to https://api.rach.io/1/public/zone/start . Got response code: 204
2018-04-17 22:07:09.399 [DEBUG] [inding.rachio.internal.api.RachioApi] - RachioApi: Using cached personId ('REDACTED_CODE').
2018-04-17 22:07:10.200 [DEBUG] [rnal.api.RachioEvent$RachioApiResult] - RachioApi: Remaing number of API: limit=1700, remaining=1676, reset at 2018-04-19T00:00:00Z
2018-04-17 22:07:10.209 [ERROR] [g.rachio.handler.RachioBridgeHandler] - RachioBridge: API access blocked on update (0 / 0), reset at
Its looking better. I installed the new binding and it no longer seems to disconnect. I was able to control the zones with no issue and it is no longer disconnecting. I noticed the Run Zone switch does not turn back off when it completes the cycle. I am assuming its related to that last message in the log.
Here is the log data…
2018-04-19 08:19:56.146 [DEBUG] [ing.rachio.handler.RachioZoneHandler] - RachioZone.handleCommand ON for rachio:zone:1:RANDOMNUMBER-1:run
2018-04-19 08:19:56.147 [INFO ] [ing.rachio.handler.RachioZoneHandler] - RachioZone: Starting zone 'Pool Zone [1]' for 0 secs
2018-04-19 08:19:56.151 [DEBUG] [ing.rachio.handler.RachioZoneHandler] - RachioZone: No specific runtime selected, using default (120 secs);
2018-04-19 08:19:56.151 [DEBUG] [inding.rachio.internal.api.RachioApi] - RachioApi: Start zone 'RANDOMNUMBER' for 120 sec.
2018-04-19 08:19:56.684 [ERROR] [inding.rachio.internal.api.RachioApi] - RachioApi: Running zone 'RANDOMNUMBER' for 120sec failed: RachioHttp: Error sending HTTP GET request to https://api.rach.io/1/public/zone/start . Got response code: 204
ok got another clue now. When I run the zone it runs the zone for the time I have on the manual run of the app on my phone ( equivalent to Quick Run setting on App). It doesn’t just stay on which is what it looks like the binding is expecting. Again I am assuming here that is the case because openhab seems to think it is still running. Here is the log when I flip the switch back to off even though the sprinklers are already off.
2018-04-19 08:30:54.290 [DEBUG] [ing.rachio.handler.RachioZoneHandler] - RachioZone.handleCommand OFF for rachio:zone:1:RANDOMNUMBER-1:run
2018-04-19 08:30:54.292 [INFO ] [ing.rachio.handler.RachioZoneHandler] - RachioZone: Stop watering for the device
2018-04-19 08:30:54.639 [ERROR] [inding.rachio.internal.api.RachioApi] - RachioApi: device/stop_water failed: RachioHttp: Error sending HTTP GET request to https://api.rach.io/1/public/device/stop_water . Got response code: 204
Hi @fifo, I found the problem (the call returns http 204=NOP_CONTENT instead of http 200 to indicate OK - leftover from refactoring).
The button should auto-switch off if the binding is receiving the event call back. This requires proper setup of your router (port forwarding to the OH device) and the correct callbackUrl incl the port number: http://mydomain.com:/rachio/webhook.
Please check the log for "RachioApi: Register WebHook, callback url = " and potential error message while registering the web hook.
I put in the latest binding and I am no longer getting the 204 errors. I still continue having the issue with the webhook however. Quick question, I am not 100% on how the webhook part works. Is there any way I can test this internally to make sure OH is listening for the webhook port. I am trying this on my browser for my internal network but am getting nothing. Seems nothing is listening on the webhook port.
Ok it makes sense now. Will try this afternoon and get back. I was all confused about how that worked and the readme helped a bunch. Have to make a few changes…
never saw RANDOMNuMBER as a zone number (should be 1, 2, 3 etc.).
did you changed the defaultRuntime?
The zone number is invalid, so the command doesn’t get through and you don’t see an event (in general you’ll see events like in the App, just a few sec later)
Please enable debugging:
open the openhab console and enter
log:set DEBUG org.openhab.binding.zwave
and post the initialization messages showing the zone configuration and the section when you run the zone.