homebridge / verified

Plugins Verified by Homebridge
https://homebridge.io/w/Verified-Plugins
GNU General Public License v3.0
366 stars 17 forks source link

homebridge-flair #266

Closed bassrock closed 3 years ago

bassrock commented 3 years ago

Plugin Details

This plugin puts the Flair vent system into homekit: https://flair.co/

It supports various features from individual room thermostats, room sensors, vent sensors and vent control.

Unfortunately, vents are implemented as either a window covering, air purifier, or a fan because homekit does not yet support a vent type.

github-actions[bot] commented 3 years ago

:white_check_mark: Pre-checks completed successfully.

donavanbecker commented 3 years ago

Having just a basic config:

{
"platform": "Flair"
}

causes homebridge to go into a loop reboot

[13/03/2021, 06:42:38] [Flair] Initializing Flair platform...
[13/03/2021, 06:42:38] [Flair] You need to enter a Flair Client Id
Server listening on: http://<ip>:8282
[13/03/2021, 06:42:38] Got SIGTERM, shutting down Homebridge...
bassrock commented 3 years ago

@donavanbecker I currently throw an error if the config is not valid. Should I be logging an error and return instead or is there a more preferred option? https://github.com/bassrock/homebridge-flair/blob/main/src/platform.ts#L39

donavanbecker commented 3 years ago

@bassrock the plugin must catch and log its own errors. So as that homebridge doesn't go into a continuous reboot.

bassrock commented 3 years ago

@donavanbecker Ok just released https://github.com/bassrock/homebridge-flair/releases/tag/v1.2.3 that should fix this.

donavanbecker commented 3 years ago

/check

github-actions[bot] commented 3 years ago

:white_check_mark: Pre-checks completed successfully.

donavanbecker commented 3 years ago

last fix needed:

(node:3928) UnhandledPromiseRejectionWarning: Error: Request failed with status code 401
    at createError (/usr/local/lib/node_modules/homebridge-flair/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/usr/local/lib/node_modules/homebridge-flair/node_modules/axios/lib/core/settle.js:17:12)
    at IncomingMessage.handleStreamEnd (/usr/local/lib/node_modules/homebridge-flair/node_modules/axios/lib/adapters/http.js:260:11)
    at IncomingMessage.emit (events.js:327:22)
    at endReadableNT (internal/streams/readable.js:1327:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:3928) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:3928) [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.
bassrock commented 3 years ago

@donavanbecker released https://github.com/bassrock/homebridge-flair/releases/tag/v1.2.4 It now error checks with invalid credentials.

donavanbecker commented 3 years ago

Everything looks good!

github-actions[bot] commented 3 years ago

Congratulations! Your plugin has been verified.

You can now add the Verified by Homebridge badge to your plugin's README:

verified-by-homebridge

[![verified-by-homebridge](https://badgen.net/badge/homebridge/verified/purple)](https://github.com/homebridge/homebridge/wiki/Verified-Plugins)

Your plugin is now also eligible to display a :heart: Donate button on it's tile in the Homebridge UI. See https://github.com/oznu/homebridge-config-ui-x/wiki/Developers:-Donation-Links for instructions.

Thank you for your contribution to the Homebridge Community. https://homebridge.io

bassrock commented 3 years ago

yay thank you!