Skip to content

Commit

Permalink
Quite some work done in terms of remote indi driver and server manage…
Browse files Browse the repository at this point in the history
…ment
  • Loading branch information
gnthibault committed Aug 22, 2023
1 parent 5660dde commit 64af878
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 33 deletions.
2 changes: 1 addition & 1 deletion Mount/IndiAbstractMount.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def _setup_abstract_config(self):

def initialize(self):
self.logger.debug("Initializing from IndiAbstractMount")
self.connect(connect_device=True)
IndiMount.unpark(self)
self.logger.debug("Successfully initialized from IndiAbstractMount")

Expand Down Expand Up @@ -128,7 +129,6 @@ def unpark(self):
self.park()
self.start_indi_server()
self.start_indi_driver()
self.connect(connect_device=True)
self.initialize()
self._is_initialized = True
self._is_parked = False
Expand Down
60 changes: 30 additions & 30 deletions conf_files/config_backyard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ observatory:
baud_rate: 57600
polling_ms: 1000
indi_client:
indi_host: localhost
indi_port: 7625
indi_host: robot-scope
indi_port: 7624
config_upbv2:
device_name: Pegasus UPB
device_port: /dev/serial/by-id/usb-Pegasus_Astro_UPBv2_revD_UPB25S4VWV-if00-port0
Expand Down Expand Up @@ -75,8 +75,8 @@ observatory:
FINDER_DEW_HEATER: True
auto_dew_aggressivity: 150 # Number between 50 and 250
indi_client:
indi_host: localhost
indi_port: 7625
indi_host: robot-scope
indi_port: 7624
indi_driver_connect_delay_s: 5
indi_resetable_instruments_driver_map:
ZWO CCD: ZWO CCD ASI290MM Mini
Expand All @@ -86,18 +86,18 @@ observatory:
Arduino telescope controller: Arduino
indi_mount_driver_name: Losmandy Gemini
indi_mount_device_name: Losmandy Gemini
indi_webserver_host: localhost
indi_webserver_host: robot-scope
indi_webserver_port: 8624
indi_client: #TODO TN urgent
indi_host: localhost
indi_port: 7625
indi_host: robot-scope
indi_port: 7624
dome_controller:
module : IndiDomeController
dome_movement_timeout_s: 300
dome_name: Dome Simulator
indi_client :
indi_host : localhost
indi_port : 7625
indi_host : robot-scope
indi_port : 7624
directories:
base: /var/RemoteObservatory
images: images
Expand All @@ -106,7 +106,7 @@ directories:
resources: resources/
targets: resources/targets
mounts: resources/mounts
db:
db:
name: /var/RemoteObservatory/DB
type: file
ntp:
Expand Down Expand Up @@ -138,17 +138,17 @@ calibration:
device_name: Shelyak Spox
port: /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AD0JE0ID-if00-port0
indi_client :
indi_host : localhost
indi_port : 7625
indi_host : robot-scope
indi_port : 7624
mount:
module: IndiG11
mount_name: Losmandy Gemini
equatorial_eod: J2000 # JNOW
tcp_host: 192.168.8.63
tcp_port: 11110
indi_client:
indi_host: localhost
indi_port: 7625
indi_host: robot-scope
indi_port: 7624
cameras:
-
module: IndiASICamera290MMMini
Expand All @@ -171,14 +171,14 @@ cameras:
autofocus_roi_size : 750
autofocus_merit_function: half_flux_radius
indi_client :
indi_host : localhost
indi_host : robot-scope
indi_port : 7627
#use_unique_client: True
indi_webmanager:
module: IndiWebManagerClient
master_host: localhost
master_host: robot-scope
master_port: 8624
host: localhost
host: robot-scope
port: 8627
profile_name: zwo_guiding
-
Expand Down Expand Up @@ -217,8 +217,8 @@ cameras:
# fine: 10000
# coarse: 30000
# indi_client:
# indi_host: localhost
# indi_port: 7625
# indi_host: robot-scope
# indi_port: 7624
#do_filter_wheel: false
#filter_wheel:
# module: IndiFilterWheel
Expand All @@ -233,16 +233,16 @@ cameras:
# SII: 7
# LPR: 8
# indi_client:
# indi_host: localhost
# indi_port: 7625
# indi_host: robot-scope
# indi_port: 7624
indi_client :
indi_host : localhost
indi_host : robot-scope
indi_port : 7626
indi_webmanager: #"PlayerOne CCD Ares-M PRO"@localhost:7626
module: IndiWebManagerClient
master_host: localhost
master_host: robot-scope
master_port: 8624
host: localhost
host: robot-scope
port: 8626
profile_name: playerone_science

Expand All @@ -267,13 +267,13 @@ cameras:
autofocus_roi_size: 750
autofocus_merit_function: half_flux_radius #vollath_F4
indi_client:
indi_host: localhost
indi_host: robot-scope
indi_port: 7628
indi_webmanager:
module: IndiWebManagerClient
master_host: localhost
master_host: robot-scope
master_port: 8624
host: localhost
host: robot-scope
port: 8628
profile_name: altair_pointing
pointer:
Expand All @@ -293,7 +293,7 @@ offset_pointer:
max_pointing_error_seconds: 2.5
guider:
module : GuiderPHD2
host : 127.0.0.1
host : robot-scope
port : 4400
do_calibration : False
profile_name : backyard
Expand Down Expand Up @@ -321,8 +321,8 @@ weather_service :
MAX_WEATHER_WIND_GUST_KPH : 30
MAX_WEATHER_CLOUD_COVER : 5
indi_client :
indi_host : localhost
indi_port : 7625
indi_host : robot-scope
indi_port : 7624
vizualization_service:
module: SceneVizualization
delay_sky_update_s: 1
Expand Down
7 changes: 7 additions & 0 deletions documentation/papers/bibtex/bibtex.bib
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ @misc{f_v_hessmann
author={F. V. Hessmann}
}

% 2x CDK700 for radial velocity on minerva us project
@article{criswell10miniature,
title={MINIATURE EXOPLANET RADIAL VELOCITY ARRAY (MINERVA) I. DESIGN, COMMISSIONING, AND FIRST SCIENCE RESULTS},
author={Criswell10, Chantanelle Nava and Robinson, Connor and Sliski, David H and Hedrick11, Richard and Ivarsen11, Kevin and Hjelstrom12, Annie and de Vera12, Jon and Szentgyorgyi10, Andrew},
publisher={Citeseer}
}

% Meteor spectroscopy
@article{espartero2018autonomous,
title={Autonomous spectrographic system to analyse the main elements of fireballs and meteors},
Expand Down
Binary file added documentation/reference_papers/1411.3724.pdf
Binary file not shown.
7 changes: 6 additions & 1 deletion helper/IndiWebManagerClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import json
import logging
import requests
import time
import urllib.parse

class IndiWebManagerDummy:
Expand Down Expand Up @@ -91,6 +92,7 @@ def start_server(self, device_name=None):
self.logger.debug(f"start_server - url {req} - code {response.status_code} - response:{response.text}")
assert response.status_code == 200
if self.master_host and self.master_port and device_name:
time.sleep(5)
self.logger.debug(
f"We are also going to start driver on master server {self.master_host}:{self.master_port}")
self.restart_driver(driver_name=self.build_remote_driver_name(device_name), master=True)
Expand Down Expand Up @@ -200,7 +202,10 @@ def start_driver(self, driver_name, check_started=True, master=False):
return
try:
base_url = f"http://{host}:{port}"
req = f"{base_url}/api/drivers/start/{urllib.parse.quote(driver_name)}"
if master:
req = f"{base_url}/api/drivers/start_remote/{urllib.parse.quote(driver_name)}"
else:
req = f"{base_url}/api/drivers/start/{urllib.parse.quote(driver_name)}"
response = requests.post(req)
self.logger.debug(
f"start_driver {driver_name} - url {req} - code {response.status_code} - response:{response.text}")
Expand Down
1 change: 1 addition & 0 deletions infrastructure/indiwebmanager.service
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ WantedBy=multi-user.target
#sudo systemctl enable indiwebmanager.service
#sudo systemctl restart indiwebmanager.service
#sudo systemctl status indiwebmanager.service
#journalctl -u indiwebmanager.service

#git clone https://github.com/knro/indiwebmanager (push)
#python ./setup.py install --prefix /home/gnthibault/.local/
Expand Down
1 change: 1 addition & 0 deletions infrastructure/indiwebmanager_guiding_camera.service
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ WantedBy=multi-user.target
#sudo systemctl enable indiwebmanager_guiding_camera.service
#sudo systemctl restart indiwebmanager_guiding_camera.service
#sudo systemctl status indiwebmanager_guiding_camera.service
#journalctl -u indiwebmanager_guiding_camera.service

#git clone https://github.com/knro/indiwebmanager (push)
#python ./setup.py install --prefix /home/gnthibault/.local/
Expand Down
1 change: 1 addition & 0 deletions infrastructure/indiwebmanager_pointing_camera.service
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ WantedBy=multi-user.target
#sudo systemctl enable indiwebmanager_pointing_camera.service
#sudo systemctl restart indiwebmanager_pointing_camera.service
#sudo systemctl status indiwebmanager_pointing_camera.service
#journalctl -u indiwebmanager_pointing_camera.service

#git clone https://github.com/knro/indiwebmanager (push)
#python ./setup.py install --prefix /home/gnthibault/.local/
Expand Down
1 change: 1 addition & 0 deletions infrastructure/indiwebmanager_science_camera.service
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ WantedBy=multi-user.target
#sudo systemctl enable indiwebmanager_science_camera.service
#sudo systemctl restart indiwebmanager_science_camera.service
#sudo systemctl status indiwebmanager_science_camera.service
#journalctl -u indiwebmanager_science_camera.service

#git clone https://github.com/knro/indiwebmanager (push)
#python ./setup.py install --prefix /home/gnthibault/.local/
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/phd2.service
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ After=multi-user.target
Type=idle
User=gnthibault
Environment=LD_LIBRARY_PATH=/usr/local/lib:/usr/lib
Environment="DISPLAY=:10"
Environment="DISPLAY=:0"
# "XAUTHORITY=/home/gnthibault/.Xauthority"
ExecStartPre=rm -f /home/gnthibault/phd2.1
ExecStart=/usr/bin/phd2
Expand Down

0 comments on commit 64af878

Please sign in to comment.