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

seletek does not work with autofocus #712

Closed
Quilex opened this issue Sep 13, 2018 · 13 comments
Closed

seletek does not work with autofocus #712

Quilex opened this issue Sep 13, 2018 · 13 comments
Labels
need info More information is requested to diagnose the issue

Comments

@Quilex
Copy link

Quilex commented Sep 13, 2018

Hi.
Sorry mi bad English.

Web traslator.

When trying to perform autofocus, with ekos, the camera makes the first capture, seletek moves the focuser and the process remains stopped.
It is as if the camera is waiting for Seletek to notify him that he has finished moving the focus.
It does not produce any error that I see.

Tested on 2 computers; (Mint 19)

  • original seletek + qhy9;
  • seletek armadillo + Atik

Thanks in advance.


Al intentar realizar autofoco, con ekos, la camara realiza la primera captura, seletek mueve el enfocador y el proceso se queda parado.
Es como si la camara se quedara esperando a que seletek le avise que termino de mover el foco.
No produce ningun error que yo vea.

Probado en 2 ordenadores; (Mint 19)

  • seletek original + qhy9;
  • seletek armadillo + Atik

Gracias anticipadas.

@mmastria
Copy link
Contributor

mmastria commented Sep 30, 2018

Same issue here.

If I move the focuser via Indi Control Panel, it reports Ok when position is reached (log window).
If I try to autofocus, Ekos behaviour as the focuser never reaches the desired position (wait indefinitely). The focuser itself moves correctly and stop at the correct position.

I started 2 instances of indi_armadillo_focus (two different users at os level on different ports, separated .indi folder). One instance control the focuser of first telescope via "Main" port, the second instance control the focuser of the second telescope via "Exp" port. I connect to each instance over network from two RPI controlling devices on each telescope. The behaviour described occurs with both instances, and this behaviour is the same even if I use/start only one (Main port) instance, or if I connect from local computer (where de server driver is running). I updated the "Armadillo 2" firmware, nothing changes.

Mastria.

@knro
Copy link
Contributor

knro commented Sep 30, 2018

Enable logging and then attach log. Does the LED light for the position property become "Green" or remains at "Yellow"?

@mmastria
Copy link
Contributor

Enable logging and then attach log. Does the LED light for the position property become "Green" or remains at "Yellow"?

I can't replicate this right now (weather conditions). Maybe only the next weekend. It's a valid test if I use a "simulator CCD" with "real armadillo focuser"? I think this doesn't make sense (as a valid test).

@Quilex
Copy link
Author

Quilex commented Oct 15, 2018

I regret not having written before, I am moving from home and I have the telescope dismantled.
As soon as I can, I'll send a log,
Greetings.

@knro knro added the need info More information is requested to diagnose the issue label Oct 26, 2018
@mmastria
Copy link
Contributor

mmastria commented Nov 3, 2018

indi_armadillo_focus_22:45:32.log
I uploaded this log. During this session, when I tried to do auto-focus, the driver reported "Focuser reached requested position.", the light got back to green but Ekos didn't recognised and wait forever.

This log have several moves because I commanded each move "manually", take a snapshot, and moved again and again.

I think (not sure) that this first block was auto-focus that failed, no clues:

DEBUG 10920.389376 sec : Abs move to 50360
DEBUG 10920.389571 sec : Tx [!step goto 0 50360 0#]
DEBUG 10920.406129 sec : Rx [!step goto 0 50360 0:0#]
INFO 10920.406291 sec : Focuser is moving to position 50360
DEBUG 10920.485697 sec : Tx [!step getpos 0#]
DEBUG 10920.499997 sec : Rx [!step getpos 0:50269#]
DEBUG 10920.517207 sec : Tx [!step getpos 0#]
DEBUG 10920.532613 sec : Rx [!step getpos 0:50272#]
DEBUG 10921.501216 sec : Tx [!step getpos 0#]
DEBUG 10921.522406 sec : Rx [!step getpos 0:50360#]
DEBUG 10921.532882 sec : Tx [!step getpos 0#]
DEBUG 10921.547513 sec : Rx [!step getpos 0:50360#]
INFO 10921.547740 sec : Focuser reached requested position.
DEBUG 10921.547970 sec : Tx [!read temps 1#]
DEBUG 10921.562603 sec : Rx [!read temps 1:294#]

The other moves was commanded by me:

DEBUG 10945.281240 sec : Tx [!read temps 1#]
DEBUG 10945.296211 sec : Rx [!read temps 1:294#]
INFO 10963.382501 sec : Focuser is moving to position 50460
INFO 10964.852433 sec : Focuser reached requested position.
INFO 10984.873556 sec : Focuser is moving to position 50360
INFO 10986.469650 sec : Focuser reached requested position.
INFO 10992.323293 sec : Focuser is moving to position 50260
INFO 10993.664562 sec : Focuser reached requested position.

When the weather permits, I'll try a better log. But yes, the green light works OK, and message that focuser reached position works too.

Maybe an important information:

Few months ago, the auto-focus worked perfectly "only" one time.
In this event, I was running Ekos on the same hardware (Linux Desktop) where armadillo was plugged in (USB). In all other events I'm using in a cascading connection:

today:
Ekos on Macbook --> RaspberryPi/Raspbian with several devices --> Other RaspberryPi/Raspbian with Armadillo

When worked:
Ekos on Linux Desktop --> Armadillo (local desktop USB connection)
--> RaspberryPi (remote with other devices)

I use the Main port of Armadillo for main focuser on the east telescope and the Exp port of the same Armadillo for main focuser on the west telescope (second telescope). This way of use is not related with the problem.

Today configuration on "Other Raspberry Pi" - where Armadillo is connected on USB port:

mkfifo ~/.indi/indiFIFO
/usr/bin/indiserver -p 7624 -m 100 -v -f ~/.indi/indiFIFO &
echo "start indi_wiringpi_gpio -n "Power System" -c "$HOME/.indi/Power System_config.xml"" > ~/.indi/indiFIFO
/usr/share/indi/scripts/indi_wiringpi_gpio.py
echo "start indi_watcher_weather -n "AAG Solo Weather" -c "$HOME/.indi/AAG Solo Weather_config.xml"" > ~/.indi/indiFIFO
/usr/share/indi/scripts/indi_watcher_weather.py
echo "start indi_vantage_weather -n "Vantage" -c "$HOME/.indi/Vantage_config.xml"" > ~/.indi/indiFIFO
/usr/share/indi/scripts/indi_vantage_weather.py
echo "start indi_meta_weather -n "Weather Meta" -c "$HOME/.indi/Weather Meta_config.xml"" > ~/.indi/indiFIFO
/usr/share/indi/scripts/indi_meta_weather.py
echo "start indi_script_dome -n "Dome Scripting Gateway" -c "$HOME/.indi/Dome Scripting Gateway_config.xml"" > ~/.indi/indiFIFO
echo "start indi_watchdog -n "WatchDog" -c "$HOME/.indi/WatchDog_config.xml"" > ~/.indi/indiFIFO
echo "start indi_armadillo_focus -n "Armadillo focuser Main" -c "$HOME/.indi/Armadillo focuser main_config.xml"" > ~/.indi/indiFIFO
echo "start indi_armadillo_focus -n "Armadillo focuser Exp" -c "$HOME/.indi/Armadillo focuser exp_config.xml"" > ~/.indi/indiFIFO
echo "start indi_rtlsdr_detector -n "RTL-SDR Receiver" -c "$HOME/.indi/RTL-SDR Receiver_config.xml"" > ~/.indi/indiFIFO
echo "start indi_webcam_ccd -n "Observ Cam" -c "$HOME/.indi/Observ Cam_config.xml"" > ~/.indi/indiFIFO

Today configuration on "first" RaspberryPi that I connect from Ekos on MacOs:
This control East telescope and other devices and connect to Armadillo remotely:

mkfifo ~/.indi/indiFIFO
/usr/bin/indiserver -p 7624 -m 100 -v -f ~/.indi/indiFIFO &
echo "start indi_ieq_telescope -n "iOptron CEM60" -c "$HOME/.indi/iOptron CEM60_config.xml"" > ~/.indi/indiFIFO
echo "start indi_atik_ccd -n "Atik 383L+" -c "$HOME/.indi/Atik 383L+_config.xml"" > ~/.indi/indiFIFO
echo "start indi_sx_wheel -n "SX Wheel" -c "$HOME/.indi/SX Wheel_config.xml"" > ~/.indi/indiFIFO
echo "start indi_qhy_ccd -n "QHY5LII-M" -c "$HOME/.indi/QHY5LII-M_config.xml"" > ~/.indi/indiFIFO
echo "start indi_astrometry -n "Astrometry" -c "$HOME/.indi/Astrometry_config.xml"" > ~/.indi/indiFIFO
echo "start indi_watchdog -n "WatchDog" -c "$HOME/.indi/WatchDog_config.xml"" > ~/.indi/indiFIFO
echo "start "Armadillo focuser Main"@system-obs:7624" > ~/.indi/indiFIFO
echo "start "Weather Meta"@system-obs:7624" > ~/.indi/indiFIFO
echo "start "Dome Scripting Gateway"@system-obs:7624" > ~/.indi/indiFIFO
echo "start "Observ Cam"@system-obs:7624" > ~/.indi/indiFIFO
echo "start indi_v4l2_ccd -n "East Camera" -c "$HOME/.indi/East Camera_config.xml"" > ~/.indi/indiFIFO

Mastria.

@knro
Copy link
Contributor

knro commented Nov 3, 2018

Seems INDI driver is working fine, and the problem is with Ekos. Turn on verbose logging in Ekos , make sure "Focus" is selected and then attach log. We should probably move this to bugs.kde.org

@Quilex
Copy link
Author

Quilex commented Nov 4, 2018

Hi.
I continued with the change of address, but I follow the thread.

//// mmastria say.

Maybe an important information:

Few months ago, the auto-focus worked perfectly "only" one time.
In this event, I was running Ekos on the same hardware (Linux Desktop) where armadillo was plugged in (USB). In all other events I'm using in a cascading connection:

//// End say.

Are you saying that you connected the Armadillo directly to the computer and it worked?

I always connect the cable to a USB hub together with other devices, ccd, etc ... and connect it to the computer.

I can ask a friend of mine to try the direct connection.

Greetings.

@mmastria
Copy link
Contributor

mmastria commented Nov 4, 2018

Quilex, there's 2 scenarios here:

1 - Armadillo connected to computer where Ekos is running (with or without usb-hub)
2 - Armadillo connected to raspberryPi running indiserver, and Ekos running in other computer connecting to raspberryPi remotely (over network).

Your scenario is the 1st. My scenario "today" is 2nd.

What I said is that auto-focus worked one time only, and, by coincidence or not, it was connected on the USB port of computer that was running Ekos (scenario 1).

When the weather permits and I'll try several scenarios to se if I can identify at least one situation that auto-focus works. If I can do that, with logs running in all scenarios, I can post here something that really helps knro to identify the problem.

Mastria

@Quilex
Copy link
Author

Quilex commented Nov 4, 2018

Ok, ty Mastria.

@mmastria
Copy link
Contributor

Today I could take some tests. Attached some logs and pictures.
log.zip

I indetified what happening, but not why.

There's 4 tests in log file:
1 - Moved focuser in and out from control panel
2 -Moved focuser in and out from Ekos client (focus Tab)
3 - First autofocus try, after send "move command" stop waiting forever
4 - A successfull autofocus using a "trick" to bypass the waiting situation.

The problem occur only when Ekos send "move" command to indi. The driver moves and in driver log there's information about "reached position", but not in Ekos log on screen. In this situation, the "Absolute Position" ligth stays YELLOW. (see below).

3-ekos_autofocus_waiting-forever

The "trick" I used was, after each focuser move, I manually sent 1 tick move. After this, the YELLOW ligth change to GREEN and Ekos continues the autofocus procedure. Doing this after each Ekos move command to focuser and finally I got the focus. (see below)...

4-ekos_trick_autofocus-moving_1_tick_manually_afer_each_autofocus_move

So the problem is, when Ekos send a "move" command, the light stays YELLOW, when I send a "move" command from Control Panel, the ligth changes to GREEN.

I hope these logs and report help to solve the problem.

Thanks,
Mastria.

@knro
Copy link
Contributor

knro commented Nov 18, 2018

Thanks, I just checked the code and fixed an issue where it doesn't update the client that its status is OK. Please either compile the driver from GIT, or wait until the nightly PPA update later tonight and try there.

@mmastria
Copy link
Contributor

I could test tonight, it worked perfectly (I tested only "main" focuser, but I believe that the "exp" will work too). You can close this issue.

Thanks again!
Mastria

@knro knro closed this as completed Nov 25, 2018
@Quilex
Copy link
Author

Quilex commented Nov 26, 2018

Tnx Mmastria and Knro for help. I can try next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need info More information is requested to diagnose the issue
Projects
None yet
Development

No branches or pull requests

3 participants