knro / indiwebmanager

Web Manager for INDI Server
http://www.indilib.org
GNU Lesser General Public License v2.1
44 stars 35 forks source link

Custom drivers registered with KStars 3.6.1 do not appear in the indiwebserver driver list. #53

Open jctk opened 2 years ago

jctk commented 2 years ago

Several drivers are duplicated in the driver list. Even if I select one of them, both are checked when I reload web manager.

To Reproduce

  1. install astroberry-diy. see detail at https://github.com/rkaczorek/astroberry-diy
  2. start indi web manager.
  3. create new profile
  4. check one of "astroberry system" in drivers list.
  5. save profile.
  6. reload indi web manager.
  7. select created profile at step 3.
  8. both "astroberry system" have been checked.

Screenshot image

File list in /usr/share/indi ls.txt

drivers.xml and indi_astroberry_system.xml drivers.zip

jctk commented 2 years ago

more information:

I tried to request following REST API for indi web manager.

get http://smdev.local:8624/api/drivers

I found following two definition of "Astroberry System" in response body.

  {
    "name": "Astroberry System",
    "label": "Astroberry System",
    "skeleton": null,
    "version": "2.10",
    "binary": "indi_astroberry_system",
    "family": "Auxiliary",
    "custom": false,
    "role": ""
  },
  {
    "name": "",
    "label": "Astroberry System",
    "skeleton": null,
    "version": "1.0",
    "binary": "",
    "family": "Auxiliary",
    "custom": true,
    "role": ""
  },
knro commented 2 years ago

The system just reads whatever XML files are in /usr/share/indi so you probably have both in there?

jctk commented 2 years ago

There is only one indi_astroberry_system.xml in /usr/share/indi. And no difinition about 'astroberry system' in drivers.xml.

Please see after the screenshot in the link below. https://github.com/knro/indiwebmanager/issues/53#issue-1393305210 There are directory listing, driver.xml and indi_astroberry_system.xml.

jctk commented 2 years ago

I found the cause of this issue.

"Astroberry System" is registered in the following two places and is shown in the driver list of indi web manager.

Fig.1 image

By the way, where are Custom Drivers stored in Kstars 3.6.1 for StellarMateOS?

I believe the aforementioned "custom" table in ~/.indi/profiles.db was set up by me in a past version of KStars. However, in the current 3.6.1, none of the Custom Drivers are defined in the Custom Drivers dialog (Fig. 2). Is there any way to edit the "custom" table in ~/.indi/profiles.db from Kstars?

Fig.2 image

jctk commented 2 years ago

Hi @knro

KStars 3.6.1 registers custom driver information in table customdrivers in ~/.local/share/kstars/userdb.sqlite. However, indiwebmanager retrieves custom driver information from table custom in ~/.indi/profiles.db.

Therefore, custom drivers registered with old KStars are displayed in the driver list of indiwebmanager. On the other hand, custom drivers registered with KStars 3.6.1 are not displayed in indiwebmanager.

I should change the title of this Isseu.

jctk commented 2 years ago

I have read a little indiwebmanager code. Am I correct in understanding that when INDI Web Manager in KStars Profile Editor is checked, the Custom Driver used in the profile is added to the table custom in profiles.db?

Is there a way to delete a custom driver registered in table custom?

knro commented 2 years ago

Custom drivers should be synced from the client to web manager. Maybe the web manager is bugged and does not reflect all the custom drivers?

jctk commented 2 years ago

It probably works according to the indiwebmanager specification. I believe that the following is the reality of this issue, which I did when I did not know much about Custom Driver.

On Windows11

On StellarMate OS:


The following behavior may be difficult to understand as a specification

For example, how about the following changing ?

jctk commented 2 years ago

Hi @knro You may close it as it behaves as specified. I would be happy if you could improve the specifications to make it easier to use the custom driver settings.