Webhook questions

Hi - I have the following 2 webhooks setup (retrieved using listWebhooks api). The latter one for the controller works well and I receive the notification, however, for the valve, I don’t receive any notification when the valve is turned on / off. The URL for both is the same, so not sure what could be wrong?

Also, the notifications for the controller do not seem to match the “newer” event data format and does not contain a “payload” item. I verified I am using “https://cloud-rest.rach.io/” to setup the webhooks.

Thanks

{
  "webhooks": [
    {
      "id": "5a303335-fd8e-4db3-9fc5-87e0418bcdb9",
      "externalId": "OH_3c6b8f581b86c11b6954a08103817fe9",
      "resourceId": {
        "valveId": "XXXX"
      },
      "url": "https://XXXX%40gmail.com:XXXX@home.myopenhab.org/rachio/webhook",
      "eventTypes": [
        "VALVE_RUN_END_EVENT",
        "VALVE_RUN_START_EVENT"
      ]
    }
  ]
}
{
  "webhooks": [
    {
      "id": "0a5ddb67-b500-4994-82c1-a2b29875e4b0",
      "externalId": "OH_3c6b8f581b86c11b6954a08103817fe9",
      "resourceId": {
        "irrigationControllerId": "XXXX"
      },
      "url": "https://XXXX%40gmail.com:XXXX@home.myopenhab.org/rachio/webhook",
      "eventTypes": [
        "CLIMATE_SKIP_NOTIFICATION_EVENT",
        "SCHEDULE_STOPPED_EVENT",
        "DEVICE_ZONE_RUN_COMPLETED_EVENT",
        "RAIN_SKIP_NOTIFICATION_EVENT",
        "FREEZE_SKIP_NOTIFICATION_EVENT",
        "WIND_SKIP_NOTIFICATION_EVENT",
        "SCHEDULE_STARTED_EVENT",
        "SCHEDULE_COMPLETED_EVENT",
        "DEVICE_ZONE_RUN_STOPPED_EVENT",
        "DEVICE_ZONE_RUN_STARTED_EVENT",
        "DEVICE_ZONE_RUN_PAUSED_EVENT",
        "NO_SKIP_NOTIFICATION_EVENT"
      ]
    }
  ]
}

@franz - any suggestions here? I’m at a roadblock and not sure other things I should try.

  • smart hose valve webhooks are not working for me (controller ones are working fine)
  • question on the event data format for the controller missing the payload (seems to be the older format)

Thanks!

Hey @jsjames — thanks for sharing your setup! I had a look at your webhook configuration and I think I see what’s going on.

It looks like you might still have an older webhook registered for your irrigation controller. Does that sound possible? That would explain why you’re seeing the older event format — those events are likely being sent from the legacy webhook rather than the newly configured one.

Regarding the new webhook setup:

  • I noticed your target URLs are using basic auth. Our new webhook system doesn’t support basic authentication, but it does include HMAC signatures for the payload to help securely validate incoming data.
  • It looks like you’re using the openHAB cloud connector via myopenHAB. If that system only supports basic auth, you’ll likely need some kind of adapter or intermediary layer that can handle HMAC validation and then forward with basic auth as needed.
  • Also, are you using a Rachio openHAB binding kind of like this one? If so, it’s possible the binding was written for the older webhook format and might need updates to support the new data.
  • There might also be other community-created webhook bindings within the openHAB ecosystem that support more configurable webhook integrations which could be worth checking out
1 Like

Hi Walter - Thanks for the detailed analysis.

I was working on updating the openHAB binding you referenced to support the new webhook api and add support for the smart hose valve. My production setup is still running the existing binding and so what you discovered makes perfect sense.

Not having basic authentication will be a problem for using a generic proxy server like myopenHAB since there won’t be a mechanism to determine where the webhook should be routed. I also know people won’t want to open up ports on their home networks to support webhooks given the security vulnerabilities it creates.

I’ll continue to research options here, but adding the new webhook support might not be possible within the openHAB framework.

Thanks.