×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

PHP web API

  • Posts: 2
  • Thank you received: 0

PHP web API was created by Benjamin

Hello there,

I'm currently looking for a PHP web API to connect to an INDI server and control the devices. If there is none, is it technically possible to control a device via web-based interface? Then I could start developing an API by myself.

Greetings,
bekro
6 years 2 days ago #24526

Please Log in or Create an account to join the conversation.

Replied by Jasem Mutlaq on topic PHP web API

The only thing close to what you are requesting is INDI Lite by Marco.
it is based on Python for server and React-Redux for client side. I'm not sure if it offers an "API" as well.
6 years 2 days ago #24528

Please Log in or Create an account to join the conversation.

  • Posts: 27
  • Thank you received: 32

Replied by Marco Gulino on topic PHP web API

Hi,
yes, my webapp does provide a REST API, though it's still in a very early stage and lots of refactoring are incoming.

It's already in a quite good shape though, as you can see in the attached image.
The INDI control panel is more or less complete, the main feature though will be the ability of creating and managing sequences.
The following user(s) said Thank You: Jasem Mutlaq
6 years 2 days ago #24530
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 12
  • Thank you received: 1

Replied by Vincent Bouttard on topic PHP web API

Hello
I think that it is possible to use PHP. However, you have to use sockets to speak with the Indi Server ; but be careful beacause all PHP servers don't allow that. Look at php.net and sockets functions to get more informations. Look at asynchronous PHP options too ; this is really important to avoid some blocking issues when you will call with the INDI Server. I think this is not the best way. A better solution should be using Node.js (or Python, like Indi Lite) on the backend.

I'm really interested in Marco's job on Indi Lite. I would like to use a web based GUI (made with React, for example) but with an asynchronous server written in Node.js.
Where is it possible to find your REST API ?

Vincent
6 years 2 days ago #24533

Please Log in or Create an account to join the conversation.

  • Posts: 27
  • Thank you received: 32

Replied by Marco Gulino on topic PHP web API

Well, as I mentioned, it's still very work in progress, so there isn't a public apidocs for the REST API.

However a good starting point is this file: github.com/GuLinux/indi-lite-tools/blob/...backend/indi-lite.py
where you can see all the routes.
('events' in particular is a Server Sent Events route, to get asynchronous messages from the server)
6 years 2 days ago #24536

Please Log in or Create an account to join the conversation.

  • Posts: 12
  • Thank you received: 1

Replied by Vincent Bouttard on topic PHP web API

Thank you Marco,

Your work is more than "in progress". So it will be a really good starting point. I will look at it deeply.
I will try to make something with Node.js.

Vincent
The following user(s) said Thank You: Jasem Mutlaq
6 years 1 day ago #24543

Please Log in or Create an account to join the conversation.

  • Posts: 2
  • Thank you received: 0

Replied by Benjamin on topic PHP web API

That looks really promising. I will definitely have a closer look on that and try to keep you up to date with my progress.

Greetings,
bekro
6 years 1 day ago #24572

Please Log in or Create an account to join the conversation.

  • Posts: 27
  • Thank you received: 32

Replied by Marco Gulino on topic PHP web API

FYI, I just renamed the project to StarQueW, and moved it to a separate repository: github.com/GuLinux/StarQueW

The INDI control panel module is much more stable and fast now, so it kinda deserved to be in its own repo :D
The following user(s) said Thank You: Tarun, Benjamin, Terry Gao
5 years 11 months ago #24791

Please Log in or Create an account to join the conversation.

Time to create page: 1.137 seconds