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

Add indi-ipx800v4 Driver #2083

Open
aknotwot opened this issue Jul 21, 2024 · 27 comments
Open

Add indi-ipx800v4 Driver #2083

aknotwot opened this issue Jul 21, 2024 · 27 comments

Comments

@aknotwot
Copy link

No other driver were found.
Driver is stored in GitHub
It's a drive made first to manage the roof. It's a part of Dome device family

The driver communication with IPX800v4 comands through TCP.
IPX800 API

@knro
Copy link
Contributor

knro commented Jul 25, 2024

Thank you. I think this driver needs to be broken down to two drivers:

  • A Relay-only driver
  • A Roll Off Roof driver

The relay driver would be based on INDI::RelayInterface that I just introduced a few days. I can do this and migrate this part of the driver to use IPX800. Then I plan to implement a universal ROR driver that uses the relay driver.

How do you get the limit switch status? via digital input from the same IPX800? I think I need to create another INDI::InputInterface as well.

@aknotwot
Copy link
Author

Hi,
about the limit : in my situation the roof's engine detect by it self the limit. Anyway i added digital inputs to check if roof is opened or closed.
Relay only would be dedicated to the IPX800, the Roll Off Roof driver dedicated to the function affected to the IPX800 ? I agree, currently this driver is too much dependant of my own configuration.
I started to rewrite the driver using your new RollOff Ino driver. But it's realy early version.

Can I help the migration ?
Best Regards,

@knro
Copy link
Contributor

knro commented Jul 26, 2024

My current plan is this:

  • INDI::OutputInterface: This is for digital outputs (On/Off) like Relays and GPIOs.
  • INDI::InputInterface: This is for digital/analog inputs like GPIOs and some observatory controllers (like the IPX800)
  • INDI::ROR driver that you set in it which drivers you want to use as input and output

In the ROR driver you specify the numbers for each. For example, assuming IPX800, we would put this driver as both input and output driver. Then in ROR we say this:

  • Roof Open: DIGITAL_OUTPUT_2,DIGITAL_OUTPUT_3 --> this will send command to output driver to trigger outputs 2 and 3
  • Roof Close: DIGITAL_OUTPUT_1
  • Roof Opened: DIGITAL_INPUT_5
  • Roof Closed: DIGITAL_INPUT_6

Would this work for your case? Btw, the ROR driver is not written yet, it will be next on my TODO after I finish the new indi-gpio driver.

@knro
Copy link
Contributor

knro commented Jul 29, 2024

@aknotwot The INDI::InputInterface and INDI::OutputInterface are now ready to be used. I added Waveshare modbus driver that uses the Output interface, and INDI GPIO driver that uses both Input and Output interfaces. Do you think you can modify your driver to use these interfaces?

@aknotwot
Copy link
Author

aknotwot commented Aug 1, 2024

@aknotwot The INDI::InputInterface and INDI::OutputInterface are now ready to be used. I added Waveshare modbus driver that uses the Output interface, and INDI GPIO driver that uses both Input and Output interfaces. Do you think you can modify your driver to use these interfaces?
Hi.
I can. But not before second part of august. Holidays are starting !

@knro
Copy link
Contributor

knro commented Aug 18, 2024

@aknotwot Let me know if you require any additional help to integrate this driver.

@knro
Copy link
Contributor

knro commented Sep 12, 2024

@aknotwot Any updates on this driver? We're getting close to INDI 2.1.0 release.

@aknotwot
Copy link
Author

@aknotwot Any updates on this driver? We're getting close to INDI 2.1.0 release.

Hi, didn't work on it yet. Will try this weekend. I give you updates sunday evening.

@aknotwot
Copy link
Author

Hi Jasem, starting to work on it. Not sure too understand the full new architecture .

@knro
Copy link
Contributor

knro commented Sep 14, 2024

Did you take a look at the INDI GPIO driver? This is a good example on how to implement both Input and Output interfaces. Please let me know if you have any questions. We could do a quick meeting as well if anything is not clear yet.

@aknotwot
Copy link
Author

Should be ok with the two examples (GPIO and waveshare). Thx.

@aknotwot
Copy link
Author

Should be ok with the two examples (GPIO and waveshare). Thx.

Hi Jasem, i won't be able to finish update of my driver in the next 2 weeks. I you were, perhaps you shouldn't wait for them to publish the new indi release. I will be ready for next.

Best Regards,

@aknotwot
Copy link
Author

aknotwot commented Oct 6, 2024

Hi @knro . Back on track. Work in progress. Trying first to implement new Input/Output Interfaces, then will see how to use ROR. Regards,

@knro
Copy link
Contributor

knro commented Oct 7, 2024

@aknotwot Great! A couple of users are waiting for this driver! Let me know if you need any help.

@aknotwot
Copy link
Author

aknotwot commented Oct 8, 2024

Hi @knro . Some news. Hard to fully understand the architecture. Mostly don't understand how to use universal_ror driver...

@knro
Copy link
Contributor

knro commented Oct 9, 2024

@aknotwot Can you please read the ROR Guide? Let me know if anything is not clear.

@aknotwot
Copy link
Author

aknotwot commented Oct 9, 2024

@aknotwot Can you please read the ROR Guide? Let me know if anything is not clear.

Hi, hi did. Yesterday evening was wondering why we can provide an IP to universal_ror, but i couldn't to my "defaultdevice" IPX800?

@knro
Copy link
Contributor

knro commented Oct 9, 2024

What do you mean an IP to universal ROR? Please clarify. You can also join us on Discord if you want faster response other than here.

@aknotwot
Copy link
Author

@knro, i'm struggling to add an IP adress to the IPX driver , tried many things ...connection is failing...
Can you tell what is wrong in this example, or perhaps a better way to add an IP manager in IPX800 as a defaultDevice.

Thanks for you help.

` IPPortTP.update(texts, names, n);
IPPortTP.setState(IPS_OK);
IPPortTP.apply();
saveConfig(IPPortTP);
LOG_DEBUG("Updating Connection - End1 ");
ipAddress = IPPortTP[0].text;
myPortFD= atoi(IPPortTP[1].text);
LOG_DEBUG(ipAddress);
LOG_DEBUG(IPPortTP[1].text);
LOG_DEBUG("Updating Connection - Starting");
tcpConnection = new Connection::TCP(this);
tcpConnection->setConnectionType(Connection::TCP::TYPE_TCP);
/tcpConnection->setDefaultHost(ipAddress);
tcpConnection->setDefaultPort(myPortFD);
/
tcpConnection->setDefaultHost("192.168.1.220");
tcpConnection->setDefaultPort(9870);

	LOG_DEBUG("Updating Connection - Handshake");
	tcpConnection->registerHandshake([&]()
	{
		LOG_DEBUG("Updating Connection - Call Handshake");
		return Handshake();
	}
	
	);
	registerConnection(tcpConnection);`

@knro
Copy link
Contributor

knro commented Oct 11, 2024

Do not define your own property, use the tcpCOnnection. Let me see if I can make the driver migration easy for you.

@aknotwot
Copy link
Author

aknotwot commented Oct 11, 2024 via email

@knro
Copy link
Contributor

knro commented Oct 11, 2024

Ok I took a look at the driver and it needs substantial changes. I already started on a skeleton driver for IPX800 but need to know the following:

  1. It appears from documentation an API key is used, not username and password?
  2. We need Digital Inputs, Analog Inputs, and Digital Outputs.
  3. Which commands used for DI, AI, and DO exactly? GetR to get all digital output status? I looked up the documentation but it was in French.

@aknotwot
Copy link
Author

aknotwot commented Oct 11, 2024 via email

@aknotwot
Copy link
Author

aknotwot commented Oct 13, 2024 via email

@aknotwot
Copy link
Author

Hi @knro still working on the topic. I modify the name of the driver : indi-ipx800, allowing it to be more generic cf here : https://github.com/aknotwot/indi-ipx800 . Later i will implement V3, V5 commands. Integration with Input/Outpout Interface work well. But still more difficulties to make universal ror behave correctly. I can't test my roof in real condition because of bad weather ... :-/

@knro
Copy link
Contributor

knro commented Nov 23, 2024

@aknotwot Can you please submit the driver to INDI core (not 3rd party)?

@aknotwot
Copy link
Author

@aknotwot Can you please submit the driver to INDI core (not 3rd party)?

Hi jasem, yes sorry, busy days. Will look at it tomorrow 👍

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

No branches or pull requests

2 participants