Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to update Plugins #26

Open
rjmcfadd opened this issue Jan 14, 2017 · 15 comments
Open

Option to update Plugins #26

rjmcfadd opened this issue Jan 14, 2017 · 15 comments

Comments

@rjmcfadd
Copy link

rjmcfadd commented Jan 14, 2017

Is it possible to add the option to update plugins that have available updates? Right now it looks like the only option is install or uninstall. I'm not sure if this is possible but it would be a great addition if it is. Thank you!

@gismo141
Copy link
Owner

Oh yes indeed that's something I have on my list but I'm not quite sure how I could present the user the interface.

Why would you prefer?

If plugin is installed -> present two buttons side by side (Update and Uninstall)
If plugin is not -> present two button (Install)

Or should I present one to update all installed plugins?

@rjmcfadd
Copy link
Author

Oh awesome! Both options would be great but the being able to update them individually may be better so you have more control. Thanks for the great plugin.

@gismo141
Copy link
Owner

Alright, I'll figure something out in the next days ;)

Thanks for your feedback!

@Samfox2
Copy link

Samfox2 commented Jan 14, 2017

Would be really great to update plugins right from the web interface!

@maplesteve
Copy link

@gismo141 I'm already currently working on the update mechanism (also refactoring, live plugin-search). Will send a pull request shortly...

@gismo141
Copy link
Owner

@maplesteve: sounds great and thanks for your effort!

@Danjohnsonnj
Copy link
Contributor

I'm not sure if this refers to updating the plugin (as in getting the latest version from NPM) or updating the configure file. If it's the latter, I'd like to look at a user flow which would have an update button near the info on the accessory/platform. This should present the same screen as add but with the current config JSON present.

Ideally this should be run through a validator prior to saving, to at least check the syntax like a linter.

First time with something like this, but I'll create a branch on my fork to explore. It's likely @maplesteve may have a more robust solution but I'll give it a go, too.

@maplesteve
Copy link

Hi! It's taking a bit longer than expected, but the major parts are done. I pushed the current state to https://github.com/maplesteve/homebridge-server so that you guys can get an impression where I'm heading. @gismo141, you will maybe find it hard, to recognize your original code, but I wanted to a) split the whole thing into dedicated files and b) leverage the API approach to gain some front end features.
Remember: this is still work in progress, though it's running fine in both of my environments.

@gismo141
Copy link
Owner

@maplesteve 🥇

I just pulled your repo and wow thats awesome!
The code is much better to navigate and as well the small visual changes are great!

Perfect as well that you've already integrated the new table-styles ;)

I'm really looking forward to your pull-request!

@gismo141
Copy link
Owner

Hi @maplesteve: Because I see it atm in your updates - I once had an idea to provide the user a possibility for adding platforms and accessories by scanning the chosen repository for a config-sample.json and presenting the relevant part for editing.

What do you think about it?

@maplesteve
Copy link

Jep. That's exactly what I had in mind and why the user should choose the plugin from the list of installed plugins. The UI would then provide an example config as help.

I see two possibilities for the info provided by the plugin repo:

  • a simple example as JSON (e.g. 'config-sample.json') which can be used as a cheat sheet
  • a more complex JSON (e.g. 'config-options.json') which describes all possible options with type, example and description. This could be used by the UI to generate a field based editor for the configuration.

@gismo141 gismo141 added this to the v2.0.0 milestone Jan 31, 2017
@gismo141 gismo141 added this to Done in v2.0.0 Jan 31, 2017
@rjmcfadd
Copy link
Author

Hi @gismo141, I just wanted to check on the progress of v2.0. Is it close to being ready? Thanks for all your work!

@gismo141
Copy link
Owner

gismo141 commented Apr 4, 2017

Hey @rjmcfadd indeed at the moment I'm on it to implement few additions.
If you're eager you can always clone the v2.0.0 branch and see what works for you what doesn't.

At the moment I still have some probs with the accessories-section but will fix it hopefully throughout the week.

Thanks for your heads up :)

@rjmcfadd
Copy link
Author

rjmcfadd commented May 4, 2017

@gismo141 I just installed v2.0.0 but I'm getting some errors.

When I try to update any of the plugins I get the following error, "Finished with error: EACCES: No rights to write in /usr/lib/node_modules/".

Also, when I try to view the log I get this error, "An error occored: Problem reading file: systemd Error: ENOENT: no such file or directory, access 'systemd'

Please check the config parameter 'log' for homebridge-server."

The log parameter is set at "log": "systemd".

Thanks!

@maplesteve
Copy link

The systemd feature is currently not available in v2. Further I have a lot of refactoring which is not yet commited because it's not complete. I'll try to find some time the next days and update the repo with the current state. Maybe you guys can pick it up from there; Alas, I have very little time at the moment to spare on this fine project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

5 participants