jvmahon / Homebridge-HomeSeer4

Homebridge Plugin for HomeSeer 3 and 4
29 stars 8 forks source link

Problem with Thermostats and Batteries #86

Closed Kayman42 closed 4 years ago

Kayman42 commented 4 years ago

I'm having an issue with batteries and Thermostats/temperature sensors(sometimes).

So I first tried adding my thermostat via the simple configuration section and got the below error. Not the end of the world, I added it via the complex config and it seemed to work. I even added the batteryref line and it seemed ok with it.

Related, I can't seem to figure out how to add the fan controls to the thermostat. I know I had it in there in a previous version of the plugin but can't seem to figure out how to add it back in.

Side note, the work on this plugin is awesome! The config is so much easier and cleaner looking.

[6/26/2020, 11:10:41 AM] [HomeSeer] Added a battery to device#: 38 (node:348) UnhandledPromiseRejectionWarning: SyntaxError: config.json error: property: batteryRef is not a valid property for item named: Living Room Thermostat Root of type: ThermostatRoot.

Valid Properties for this type are: type,name,ref,uuid_base,interface_name. at Object.hasValidProperties (/usr/lib/node_modules/homebridge-homeseer4/lib/DeviceDefaults.js:630:11) at Object.checkConfig (/usr/lib/node_modules/homebridge-homeseer4/lib/HomeSeerUtilities.js:256:18) at HomeSeerPlatform.accessories (/usr/lib/node_modules/homebridge-homeseer4/index.js:160:17) at processTicksAndRejections (internal/process/task_queues.js:94:5) (node:348) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)

(node:348) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

jvmahon commented 4 years ago

Hi Kayman42. Thanks for the compliment on the plugin.

There may be some confusion - my plugin never supported fan controls for thermostats. I would have liked to add that, but I could never quite figure it out (admittedly, I didn't spend much time on it). There are some thermostat-specific plugins out there which work directly with the thermostat makers web site (rather than via HomeSeer) - maybe you had been using one of those.

Also, I don't think I ever gave much thought to a Thermostat having a battery so I may never have tested that out. I'll look into it when I can, but it seems to be an oversight.

Battery should work for a temperature sensor type (not Thermostat type). If you are having issues with that, please provide more info (is it a z-Wave thermostat? What's the config.json entry look like? etc.).