Closed stevehoek closed 9 months ago
try using strings, like user/pass I think number are fine but I would have to check. most likely you have some extra web hooks being sent, try clearing them out, check the box to delete web hooks "extra stuff" in the config
yeah I tried just a basic user of my name 'stevehoek' and password of 'cottage' but it does not resolve
http://stevehoek:cottage@hoeknet-cottage.ddns.net:12453/test
I've tried with the IP instead of the DDNS address and it doesn't work either.
When I turn off Basic Auth, it works fine
I did check the box to clear existing webhooks
I did confirm 1234/5678 works fine
Could my router be stripping the authentication? It just doesn't work even with 1234/5678
I suppose it is not necessary... kcharwood's plugin worked for years for me without it ;) I just like to use recommended settings, especially if it brings more security.
You should see something in you Log (debug on) like this when using 1234/5678
[4/29/2023, 7:59:26 AM] [Rachio-Dev] webhook request authorization header=Basic MTIzNDo1Njc4
[4/29/2023, 7:59:26 AM] [Rachio-Dev] webhook expected authorization header=Basic MTIzNDo1Njc4
[4/29/2023, 7:59:26 AM] [Rachio-Dev] Webhook authentication passed
[4/29/2023, 7:59:26 AM] [Rachio-Dev] Webhook match found for Front Yard Shrubs will update zone service
[4/29/2023, 7:59:26 AM] [Rachio-Dev] Zone Status Update
[4/29/2023, 7:59:26 AM] [Rachio-Dev]
keep in mind if your trying to use http://stevehoek:cottage@hoeknet-cottage.ddns.net:12453/test to test you can not be on the same network. Try testing from a device on a cell only network
Yeah I have tried the test from a cell phone with wifi off. Does that test URL work for you?
With basic auth configured, and the Test URL not resolving, I can control the sprinklers but see this in the logs
[29/04/2023, 10:23:00] [Rachio-Cottage] Expecting webhook authentication
[29/04/2023, 10:23:36] [Rachio-Cottage] Expecting webhook authentication
[29/04/2023, 10:24:37] [Rachio-Cottage] Starting zone-2 Front Pathway Sprays for 5 mins
[29/04/2023, 10:24:38] [Rachio-Cottage] <simulated-webhook> Front Pathway Sprays Started, started for duration 5 minutes.
[29/04/2023, 10:24:40] [Rachio-Cottage] <homebridge-Rachio-Cottage> Front Pathway Sprays Started, started for duration 5 minutes.
[29/04/2023, 10:24:49] [Rachio-Cottage] Stopping Zone Front Pathway Sprays
[29/04/2023, 10:24:50] [Rachio-Cottage] <simulated-webhook> Front Pathway Sprays Stopped, stopped after 12 seconds.
[29/04/2023, 10:24:53] [Rachio-Cottage] <homebridge-Rachio-Cottage> Front Pathway Sprays Stopped, stopped after 12 seconds.
I don't see anything like you pasted above. I have your plugin's debug flag set, but not the global Homebridge debug flag. Do I need that?
you do need to enable homebridge logging.
The test url ma not work if your browser will not pass the basic auth, this seems to common now, but you should see it come in and fail in the log.
I never could get it to work, either at home (Ubiquiti router) or cottage (eero router).
It is working without auth, but I see references to "simulated webhook" like this
[29/04/2023, 10:24:38] [Rachio-Cottage]
And no logs of "actual" webhooks. What is the simulate-webhook doing?
The way the plugin works, when you start/stop a zone there is a PUT call to the Rachio API, if there is a positive response 204 then I simulate the same response that would be received from a web hook message, that way the there is just routine keep track off all the updates, regardless of where the originated from.
If you see
I would be interested to know what Rachio thinks it needs to send. If you have homebridge debug logging on you enable show api and show web hooks in the plugin settings. you should see something like this message. If you are using basic auth then you should see the user:password. If you are trying to use basic auth and you do not see that in the url it would generate the error you seeing
[4/30/2023, 3:31:25 PM] [Rachio-Dev] configured webhooks response [ { "id": "6793be8e-7ef6-40d2-aa37-6d1a8881ff06", "url": "http://user:password@76.25.xxx.xxx:12456", "eventTypes": [ { "name": "ZONE_STATUS", "type": "WEBHOOK" }, { "name": "RAIN_DELAY", "type": "WEBHOOK" }, { "name": "SCHEDULE_STATUS", "type": "WEBHOOK" }, { "name": "DEVICE_STATUS", "type": "WEBHOOK" }, { "name": "WEATHER_INTELLIGENCE", "type": "WEBHOOK" } ], "externalId": "homebridge-Rachio" }, { "id": "196e40c1-5430-473c-a9c2-d54cd789998a", "url": "http://username:password@76.25.xxx.xxx:12453", "eventTypes": [ { "name": "SCHEDULE_STATUS", "type": "WEBHOOK" }, { "name": "WEATHER_INTELLIGENCE", "type": "WEBHOOK" }, { "name": "ZONE_STATUS", "type": "WEBHOOK" }, { "name": "DEVICE_STATUS", "type": "WEBHOOK" }, { "name": "RAIN_DELAY", "type": "WEBHOOK" } ], "externalId": "homebridge-Rachio-Dev-2" },
snippet when I start a zone
[4/30/2023, 3:19:02 PM] [Rachio-Dev] Starting zone-4 Back Yard for 1 mins
[4/30/2023, 3:19:02 PM] [Rachio-Dev] Starting Zone b88886ac-6e63-47d0-b1e5-bc8410a8f05e
[4/30/2023, 3:19:02 PM] [Rachio-Dev] start response 204
[4/30/2023, 3:19:02 PM] [Rachio-Dev] Simulating webhook for Back Yard will update services
[4/30/2023, 3:19:02 PM] [Rachio-Dev] Zone Status Update
[4/30/2023, 3:19:02 PM] [Rachio-Dev]
I am used a number of different router and high no I am using an Amplifi which is essentially Ubiquiti
I would think the debug logs would hold the key to what is going on, I do not log the headers for the incoming message, but I could get you a build to see that if needed.
I am trying to get basic auth to work with the webhook but it seems to not work. At first I was using my Rachio account credentials, but after reading here it seems that it can be any random username/password (eg: 1234/5678)? Either way the webhook test URL never resolves. If I turn off basic auth, it is working.
With webhook debugging turned on, when I use basic auth I see this in the logs [29/04/2023, 09:41:53] [Rachio] Expecting webhook authentication
What am I missing?