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

Driver Aliases #26

Open
knro opened this issue Jul 22, 2018 · 13 comments
Open

Driver Aliases #26

knro opened this issue Jul 22, 2018 · 13 comments

Comments

@knro
Copy link
Owner

knro commented Jul 22, 2018

Right now, the manager can only start drivers after parsing the drivers list. But there is no ability to specify an alias for the driver. For example, suppose I want to create a profile with 2 SBIG cameras: "SBIG FOO" and "SBIG BAR". There is no way to do this now.

So what would the best solution to approach this? Any thoughts? @juanmb @sterne-jaeger would appreciate your input on this!

@sterne-jaeger
Copy link
Contributor

I think we reached the limits of the simple multiple select dropdown for defining a profile. Besides the missing option for adding aliases (or more general: adding new drivers on the fly), there is no option to add or remove single drivers without restarting indiserver.

I would suggest reworking the profile handling to cover both. What about the following:

  • separate starting/stopping of indiserver from starting/stopping single drivers
  • use a list of drivers instead of a single multiple select, where each list entry is editable (for example for changing its label)
  • use the drivers.xml as input for adding new drivers - maybe sticking to the multiple select option, which makes it very comfortable
  • add start/stop/edit/delete buttons for each drivers entry

Does this make sense to you?

@knro
Copy link
Owner Author

knro commented Jul 22, 2018

I think adding a new driver feature would be the same as alias (it is actually the same), so maybe adding that for now would be sufficient. Maybe also enable remote restart of a specific driver since @juanmb added support for that.

I like the idea of separating server from drivers. We can break down the steps into 2 separate ones, but this requires a LOT of rework and time which I don't have unfortunately.

@juanmb
Copy link
Contributor

juanmb commented Jul 23, 2018

I would suggest trying Flask-Admin to make a new, more flexible, web interface without adding much code. I have some experience with Flask-Admin in previous projects and it simplifies the frontend code if your design follows a certain schema.

I could make a quick prototype this week to test it out.

@knro
Copy link
Owner Author

knro commented Jul 23, 2018

Ok sounds good, if it remains as simple as the current implementation then fantastic! I created a branch called customdrivers where I added some code for custom drivers but I will work on the rest later tonight. So we could have the ability to start INDI server standalone or for a specific profile, and also the ability to start/stop drivers at will as @sterne-jaeger suggested.

For the time being, I'd like to implement the custom drivers functionality (without a GUI even, just the API necessary to get it works). I already implemented custom drivers in KStars, and this was a long requested feature since many users cannot operate their devices if they have multiples of them (like SBIG).

Of course, users can also copy an exiting XML and edit it manually, but in the next release, it should be very easy to create a custom driver or driver alias without having to hack at the console.

@knro
Copy link
Owner Author

knro commented Jul 24, 2018

@juanmb @sterne-jaeger Ok I think I finished the "necessary" changes are customdrivers branch. Can you please check it out to make sure I didn't ruin anything? A simple test here indicated all is good.

@sterne-jaeger
Copy link
Contributor

I made a quick check, looks good.

@knro
Copy link
Owner Author

knro commented Jul 25, 2018

Ok thanks, I merged into master now. Hopefully we don't have any issues.

@knro
Copy link
Owner Author

knro commented Jul 25, 2018

@juanmb Can you please update the package for pip?

@juanmb
Copy link
Contributor

juanmb commented Jul 25, 2018

OK, I uploaded the new version to PyPI. I sent you a PR also.
I made a quick test and it seems to work OK.

@juanmb
Copy link
Contributor

juanmb commented Aug 3, 2018

@knro @sterne-jaeger Still working on it!

captura de pantalla de 2018-08-03 16-57-01

@knro
Copy link
Owner Author

knro commented Jan 20, 2020

@juanmb It's been a while. What's the update on this?

@juanmb
Copy link
Contributor

juanmb commented Jan 22, 2020

I started working on other projects and I almost forgot about this!

I just uploaded the current status of this project to a new repository: https://github.com/juanmb/indi-admin.
I would like to continue working on this code, but I'm not sure I can find the time for it :(

@pchev
Copy link

pchev commented Oct 8, 2020

One of my user get the problem when trying to use a SBIG ST-I camera.
Even there is a "SBIG ST-I" entry in indi_sbig.xml the driver is started with the default name "SBIG CCD" making some confusion and preventing to use it along with another SBIG CCD.

May I suggest that the following is added to the start command in indi_server.py at line 37 so at least the name defined in drivers.xml is taken into account:
' -n "%s"' % driver.label

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

No branches or pull requests

4 participants