Comments (12)
from verified.
Hi @zyonse
Installing the plugin and immediately clicking save in the homebridge ui resulted in this config:
{
"options": {},
"name": "Dreo Platform",
"platform": "DreoPlatform"
}
and I had to disable the plugin since it sent my homebridhe into a restart loop:
[25/04/2023, 04:27:11] Homebridge v2.0.0-beta.1 (HAP v1.0.0-beta.8) (Homebridge) is running on port 51781.
[25/04/2023, 04:27:12] TypeError: Cannot read properties of undefined (reading 'access_token')
at DreoPlatform.discoverDevices (/usr/local/lib/node_modules/homebridge-dreo/src/platform.ts:61:61)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
Please ensure that all errors are caught properly by the plugin so it does not affect the running of other plugins!
Please also check things like the following just to make sure your plugin handles them correctly:
- an email address is provided in the config but the password is left blank
- an email address is provided with a password which is incorrect
Of course it's totally okay that your plugin logs an error in these cases - so long as the user can look at the logs and understand what has gone wrong - and most importantly your plugin can stop working without affecting other plugins that a user may have installed.
from verified.
@bwp91 Thanks for the feedback and suggestions. I added some actual error handling with console messages to address those login issues, they're included in v1.2.0 of the plugin.
from verified.
/check
from verified.
from verified.
Great, for the purposes of verification, the change you have made is perfect.
However, just wanted to query a real-case usage situation, as I noticed that if user/pass is incorrect you remove all the devices:
if (email === undefined || password === undefined) {
this.api.unregisterPlatformAccessories(
PLUGIN_NAME,
PLATFORM_NAME,
this.accessories,
);
this.log.error('error: Invalid email and/or password');
return;
}
Let's say a user has 10 devices with a dreo account and then changes their password in the app. They then restart homebridge without remembering to update their password in homebridge and suddenly all their devices have been removed! would it not be better to just return;
without removing devices? just a thought
Will also post a checklist now as there is one other thing I have noticed with regards to github releases
from verified.
- - The plugin must successfully install.
- - The plugin must implement the Homebridge Plugin Settings GUI.
- - The plugin must not start unless it is configured.
- - The plugin must not execute post-install scripts that modify the user's system in any way.
- - The plugin must not contain any analytics or calls that enable you to track the user.
- - The plugin must not throw unhandled exceptions, the plugin must catch and log its own errors.
- - The plugin must be published to npm and the source code available on GitHub.
- - GitHub releases should be created for every new version of your plugin, with patch notes.
- - The plugin must run on all Active LTS versions of Node.js, at the time of writing this is Node.js v14, v16 and v18.
- - The plugin must not require the user to run Homebridge in a TTY or with non-standard startup parameters, even for initial configuration.
- - If the plugin needs to write files to disk (cache, keys, etc.), it must store them inside the Homebridge storage directory.
Please remember to create a github release with each version of the plugin you release - as this is the information that is shown in the homebridge ui when a user updates the plugin
https://github.com/zyonse/homebridge-dreo/releases
from verified.
...also that for example an npm release of 1.0.0
should have a github tag of v1.0.0
from verified.
Let's say a user has 10 devices with a dreo account and then changes their password in the app. They then restart homebridge without remembering to update their password in homebridge and suddenly all their devices have been removed! would it not be better to just
return;
without removing devices? just a thought😀
The code you referenced would only be triggered if the user removed their username or password from the config file. If they changed their account password in the Dreo app without updating it in homebridge, the plugin would receive an invalid access_token and just 'return;'
Also, just added a github release for the latest npm version.
from verified.
Apologies yes you are correct - I misread the code! All with good intentions! Fab - please continue with the github releases and i will verify the plugin now
from verified.
Congratulations! Your plugin has been verified.
You can now add the Verified by Homebridge badge to your plugin's README:
[![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
If for any reason in the future you can no longer maintain your plugin, please consider transferring it to our unmaintained plugins repo. We can take ownership until another willing developer comes along.
Thank you for your contribution to the Homebridge Community.
https://homebridge.io
from verified.
Will do, thank you!
from verified.
Related Issues (20)
- homebridge-spruce-irrigation HOT 11
- homebridge-level-sense HOT 3
- homebridge-green-mountain-grills HOT 2
- Unverify homebridge-mihome4u HOT 3
- [testing] homebridge-meross HOT 5
- homebridge-resol-vbus HOT 6
- homebridge-fenix-tft-wifi HOT 7
- homebridge-inkbird-wifi-gateway HOT 61
- homebridge-inkbird-wifi-gateway HOT 2
- homebridge-inkbird-wifi-gateway HOT 2
- homebridge-inkbird-wifi-gateway HOT 2
- homebridge-loxone-proxy HOT 4
- homebridge-panasonic-miraie-ac-platform HOT 4
- homebridge-august-door-sense HOT 4
- homebridge-inkbird-wifi-gateway HOT 2
- homebridge-dashboard HOT 4
- homebridge-esp8266-intexsbh20 HOT 24
- homebridge-pentair-screenlogic HOT 4
- homebridge-eggtimer-plugin HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from verified.