valiquette / homebridge-rachio-irrigation

Provides Homebridge support for Rachio controller
MIT License
21 stars 4 forks source link

v1.1.4 crashes HB #16

Closed abolians closed 3 years ago

abolians commented 3 years ago

HB crashes and restarts on a loop after I rebooted my docker container when trying to initialize rachio plugin v1.1.4. reverted back to 1.1.3 and it is working fine. below is the relevant log

[9/13/2021, 6:17:08 PM] [Govee] Initializing Govee platform... [9/13/2021, 6:17:08 PM] [Govee] Initialising plugin v4.10.0 | Node v14.17.3 | HB v1.3.4... [9/13/2021, 6:17:08 PM] [Rachio] Initializing rachio platform... [9/13/2021, 6:17:08 PM] [Rachio] Starting Rachio Platform with homebridge API 2.7 [9/13/2021, 6:17:08 PM] TypeError: Cannot read property 'match' of undefined at CheckIPaddress (/homebridge/node_modules/homebridge-rachio-irrigation/rachioplatform.js:73:18) at new RachioPlatform (/homebridge/node_modules/homebridge-rachio-irrigation/rachioplatform.js:67:16) at /usr/local/lib/node_modules/homebridge/src/server.ts:440:40 at Array.forEach () at Server.loadPlatforms (/usr/local/lib/node_modules/homebridge/src/server.ts:372:27) at Server.start (/usr/local/lib/node_modules/homebridge/src/server.ts:159:29) [9/13/2021, 6:17:08 PM] Got SIGTERM, shutting down Homebridge... [9/13/2021, 6:17:12 PM] [Homebridge UI] Running Command: npm install --save homebridge-rachio-irrigation@1.1.3 [9/13/2021, 6:17:13 PM] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null [9/13/2021, 6:17:18 PM] [HB Supervisor] Restarting Homebridge... [9/13/2021, 6:17:18 PM] [HB Supervisor] Starting Homebridge with extra flags: -I -P /homebridge/node_modules [9/13/2021, 6:17:18 PM] [HB Supervisor] Started Homebridge v1.3.4 with PID: 5331 Initializing HAP-NodeJS v0.9.4... [9/13/2021, 6:17:19 PM] Loaded config.json with 0 accessories and 7 platforms. [9/13/2021, 6:17:19 PM] Loaded 46 cached accessories from cachedAccessories.

rohair1981 commented 3 years ago

I am having the exact same issue. I rolled it back to the previous version and it’s working fine.

valiquette commented 3 years ago

Could you copy in your config for this plugins minus your API key?

rohair1981 commented 3 years ago

"name": "Rachio", "api_key": "", "default_runtime": 3, "use_irrigation_display": true, "show_standby": true, "show_runall": true, "show_schedules": true, "external_webhook_port": 12453, "internal_webhook_port": 27546, "use_basic_auth": false, "delete_webhooks": false, "platform": "rachio", "_bridge": { "username": "0E:B9:3E:8F:59:77", "port": 53757

abolians commented 3 years ago

Here is mine. I tried with and without deleting web hooks

"name": "Rachio",
"api_key": “xxx",
"default_runtime": 3,
"use_irrigation_display": true,
"show_standby": true,
"show_runall": true,
"show_schedules": true,
"external_webhook_port": 12453,
"internal_webhook_port": 27546,
"use_basic_auth": false,
"delete_webhooks": true,
"platform": "rachio"

On Sep 14, 2021, at 8:03 AM, rohair1981 @.***> wrote:

"name": "Rachio", "api_key": "", "default_runtime": 3, "use_irrigation_display": true, "show_standby": true, "show_runall": true, "show_schedules": true, "external_webhook_port": 12453, "internal_webhook_port": 27546, "use_basic_auth": false, "delete_webhooks": false, "platform": "rachio", "_bridge": { "username": "0E:B9:3E:8F:59:77", "port": 53757

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/valiquette/homebridge-rachio-irrigation/issues/16#issuecomment-919237927, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIV4VIX2BNZH4GMWQVL32WTUB5P3ZANCNFSM5D7BBBKA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

valiquette commented 3 years ago

I understand what is going on and will correct a few things around this bug. Thanks for reporting this. This is a use case that was not tested when 1.1.4 added support for web hooks to use a web hook relay. This error stems from not having an external IP address in the config like "external_IP_address": "x.x.x.x". I would just like to confirm that it is by choice that you are not using the webhook service?

rohair1981 commented 3 years ago

I wasn’t sure what that was so I didn’t use it. Mine seems to work fine without it.

abolians commented 3 years ago

Not using web hooks either

--Sarmen

On Sep 14, 2021, at 10:15 AM, rohair1981 @.***> wrote:

 I wasn’t sure what that was so I didn’t use it. Mine seems to work fine without it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

valiquette commented 3 years ago

Webhooks, provides the return path from Rachio to this plugin. Having it configured keeps everything in sync with any other apps. The readme has more info on that, but it is not necessary.

valiquette commented 3 years ago

A fix for the error and how the plugin handle the use case for not having defined anything in the external_IP field. Please let me know it this resolves the issue seen in 1.1.4

abolians commented 3 years ago

That was quick. 1.1.5 running with no issues.

[9/14/2021, 2:50:12 PM] [Rachio] Initializing rachio platform... [9/14/2021, 2:50:12 PM] [Rachio] Starting Rachio Platform with homebridge API 2.7 [9/14/2021, 2:50:12 PM] [Rachio] No external IP or domain name configured, will not configure webhooks. Reference Readme for instructions [9/14/2021, 2:50:12 PM] [Rachio] Cannot validate webhook destination address, please check webhook config settings. Will not set Webhooks