valiquette / homebridge-orbit-irrigation

Provides Homebridge support for Orbit B-Hyve devices
MIT License
9 stars 1 forks source link

AssertionError when adding timer as simple valve #84

Closed lureder closed 3 months ago

lureder commented 3 months ago

When checking the box to show timer as simple valve, I get the following error saying that displayName can not be empty. My accessory has a name in the B-Hyve app.

AssertionError [ERR_ASSERTION]: Accessories must be created with a non-empty displayName.
    at new Accessory (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:491:11)
    at new PlatformAccessory (/usr/local/lib/node_modules/homebridge/src/platformAccessory.ts:71:9)
    at valve.createValveAccessory (/usr/local/lib/node_modules/homebridge-orbit-irrigation/devices/valve.js:23:24)
    at /usr/local/lib/node_modules/homebridge-orbit-irrigation/orbitplatform.js:187:38
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
lureder commented 3 months ago

Also receiving these warning in the log when I uncheck the "display as a simple valve" checkbox, if that's helpful.

[18/03/2024, 16:19:59] [homebridge-orbit-irrigation] This plugin generated a warning from the characteristic 'Name': characteristic value expected string and received undefined. See https://homebridge.io/w/JtMGR for more info.
[18/03/2024, 16:19:59] [homebridge-orbit-irrigation] This plugin generated a warning from the characteristic 'Configured Name': characteristic value expected string and received undefined. See https://homebridge.io/w/JtMGR for more info.
[18/03/2024, 16:19:59] [homebridge-orbit-irrigation] This plugin generated a warning from the characteristic 'Model': characteristic value expected string and received undefined. See https://homebridge.io/w/JtMGR for more info.
valiquette commented 3 months ago

Is this just an issue when using the option for a simple valve?

If there is any question with the name on the orbit side, please check at https://techsupport.orbitbhyve.com

lureder commented 3 months ago

Yes, only get this error when checking the simple valve option. Double checked the names on the link above and everything is in order on the Orbit side.

valiquette commented 3 months ago

Thanks, I will look into it

lureder commented 3 months ago

I think I figured out what was wrong…

By default, the name of the zone is the same as the name the accessory. But when I tried to edit the zone name, the field was blank. I then gave it a different name than the what I named the accessory and tried the “simple valve” option again and this time it worked right away with the name I gave the zone in the app rather than the name of the accessory.

Hope that made a sense! :)