I tried to use the scripting tool but again, I don't know how to connect the local python script with the Dome Scripting driver.

let me explain:
this would be my script in order to switch the GPIO Pin on the RPi 4B:


import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM) # GPIO number

RELAIS_1_GPIO = 17
GPIO.setup(RELAIS_1_GPIO, GPIO.OUT) # GPIO Mode


GPIO.output(RELAIS_1_GPIO, GPIO.HIGH) # on, opens the roof

wait(20000) # wait 20s to be sure it is completely open
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The "open.py" script is like:

#!/usr/bin/python
#
# Open shutter script for INDI Dome Scripting Gateway
#
# Arguments: none
# Exit code: 0 for success, 1 for failure
#

import sys

coordinates = open('/tmp/indi-status', 'r')
str = coordinates.readline()
coordinates.close()
str = str[0] + ' 1 ' + str[4:]
coordinates = open('/tmp/indi-status', 'w')
coordinates.truncate()
coordinates.write(str)
coordinates.close()

sys.exit(0)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I can not see the interaction between both scripts? Shall I integrate "my script" into "open.py" script????

Sorry for the stupid question.

Gunter

Read More...