martijndierckx/homebridge-hydrawise

TypeError: Cannot read property

Closed this issue · 8 comments

Hey all, just noticed this error appearing in my log files in Homebridge.

[7/12/2020, 09:22:40] [Hydrawise] TypeError: Cannot read property 'getCharacteristic' of undefined
at new HydrawiseSprinkler (/usr/local/lib/node_modules/homebridge-hydrawise/src/HydrawiseSprinkler.ts:62:17)
at /usr/local/lib/node_modules/homebridge-hydrawise/src/HydrawisePlatform.ts:117:30
at Array.map ()
at /usr/local/lib/node_modules/homebridge-hydrawise/src/HydrawisePlatform.ts:93:13
at runMicrotasks ()
at processTicksAndRejections (internal/process/task_queues.js:97:5)

Not sure if there is a firmware update that went out to the sprinkler system that might have broke something. Anyone else seeing this issue?

I have been unable to get mine working following the instructions as best I could. So can't say if I am seeing this or now. I am trying to connect via Cloud as I am pretty sure my App credentials would only work on cloud and not on the local device?

@joewilliamsca can you post the output of the troubleshooting script?

I have been unable to get mine working following the instructions as best I could. So can't say if I am seeing this or now. I am trying to connect via Cloud as I am pretty sure my App credentials would only work on cloud and not on the local device?

Is this related to this issue?

Hi, after update I've got the same issue
[Hydrawise] TypeError: Cannot read property 'getCharacteristic' of undefined at new HydrawiseSprinkler (/homebridge/node_modules/homebridge-hydrawise/src/HydrawiseSprinkler.ts:62:17) at /homebridge/node_modules/homebridge-hydrawise/src/HydrawisePlatform.ts:117:30 at Array.map (<anonymous>) at /homebridge/node_modules/homebridge-hydrawise/src/HydrawisePlatform.ts:93:13 at processTicksAndRejections (internal/process/task_queues.js:97:5)

Although I'm still able to start/stop devices

@joewilliamsca can you post the output of the troubleshooting script?

Hi @martijndierckx

Am I running the script correctly?

pi@homebridge:~/.homebridge $ node /usr/local/lib/node_modules/homebridge-hydrawise/troubleshooting/hydrawise-api.js
/usr/local/lib/node_modules/homebridge-hydrawise/troubleshooting/hydrawise-api.js:22
if(process.argv[2].toUpperCase() == 'CLOUD') {
^

TypeError: Cannot read property 'toUpperCase' of undefined
at Object. (/usr/local/lib/node_modules/homebridge-hydrawise/troubleshooting/hydrawise-api.js:22:20)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47

Run these commands:

  • node ./troubleshooting/hydrawise-api.js CLOUD getSchedule YOUR_API_KEY
  • node ./troubleshooting/hydrawise-api.js CLOUD getZones YOUR_API_KEY

Hi @martijndierckx - here is the output

pi@homebridge:/usr/local/lib/node_modules/homebridge-hydrawise $ sudo node ./troubleshooting/hydrawise-api.js LOCAL getSchedule
{
relays: [
{
relay_id: 224820,
relay: 1,
name: 'Plants',
timestr: '04:00',
lastwaterepoch: 1595595648,
frequency: 60,
normalRuntime: 60,
time: 27333,
run_seconds: 3600,
type: 1
},
{
relay_id: 224822,
relay: 2,
name: 'Front Yard',
timestr: '05:00',
lastwaterepoch: 0,
frequency: 60,
normalRuntime: 20,
time: 30933,
run_seconds: 1200,
type: 1
},
{
relay_id: 224824,
relay: 3,
name: 'Back Yard',
timestr: '05:20',
lastwaterepoch: 0,
frequency: 60,
normalRuntime: 20,
time: 32133,
run_seconds: 1200,
type: 1
},
{
relay_id: 3,
relay: 4,
name: 'Zone 4',
timestr: '',
lastwaterepoch: 0,
frequency: 0,
normalRuntime: 0,
time: 0,
run_seconds: 300,
type: 110
},
{
relay_id: 4,
relay: 5,
name: 'Zone 5',
timestr: '',
lastwaterepoch: 0,
frequency: 0,
normalRuntime: 0,
time: 0,
run_seconds: 300,
type: 110
},
{
relay_id: 5,
relay: 6,
name: 'Zone 6',
timestr: '',
lastwaterepoch: 0,
frequency: 0,
normalRuntime: 0,
time: 0,
run_seconds: 300,
type: 110
},
{
relay_id: 6,
relay: 7,
name: 'Zone 7',
timestr: '',
lastwaterepoch: 0,
frequency: 0,
normalRuntime: 0,
time: 0,
run_seconds: 300,
type: 110
},
{
relay_id: 7,
relay: 8,
name: 'Zone 8',
timestr: '',
lastwaterepoch: 0,
frequency: 0,
normalRuntime: 0,
time: 0,
run_seconds: 300,
type: 110
},
{
relay_id: 8,
relay: 9,
name: 'Zone 9',
timestr: '',
lastwaterepoch: 0,
frequency: 0,
normalRuntime: 0,
time: 0,
run_seconds: 300,
type: 110
},
{
relay_id: 9,
relay: 10,
name: 'Zone 10',
timestr: '',
lastwaterepoch: 0,
frequency: 0,
normalRuntime: 0,
time: 0,
run_seconds: 300,
type: 110
},
{
relay_id: 10,
relay: 11,
name: 'Zone 11',
timestr: '',
lastwaterepoch: 0,
frequency: 0,
normalRuntime: 0,
time: 0,
run_seconds: 300,
type: 110
},
{
relay_id: 11,
relay: 12,
name: 'Zone 12',
timestr: '',
lastwaterepoch: 0,
frequency: 0,
normalRuntime: 0,
time: 0,
run_seconds: 300,
type: 110
}
],
defaults: [],
running: [],
name: '',
time: 1595647232
}

pi@homebridge:/usr/local/lib/node_modules/homebridge-hydrawise $ sudo node ./troubleshooting/hydrawise-api.js LOCAL getZones
[
HydrawiseZone {
apiBinding: Hydrawise {
cloudUrl: 'https://app.hydrawise.com/api/v1/',
type: 'LOCAL',
url: 'http://0.0.0.0/',
localAuthUsername: 'admin',
localAuthPassword: 'pwd',
cloudAuthAPIkey: ''
},
relayID: 224820,
zone: 1,
name: 'Plants',
nextRunAt: 2020-07-25T10:56:59.000Z,
nextRunDuration: 3600,
isSuspended: false,
isRunning: false,
remainingRunningTime: 0,
controller: undefined
}
]

Seems to be a problem with the plugin and firmware on my Hunter device, which seems to reboot multiple times a day. I’ve gone ahead and removed the plugin. Since it’s rest bases API calls, I’m chalking this up as an environment issue on my side