David replied to the topic 'Script to park the telescope' in the forum. 4 years ago

Hello.

Thanks for your answer. I tried the script adapted to my set up but could not make it work.
I wrote a pretty simple script to check if it works, it seems to work when run the module with IDLE, i get this:

{"timestamp_utc": 2019-12-31T01:10:46 ,"roof_status": {"open_ok": 1}}

But when i try with INDI the log at the INDI control panel shows:
"[ERROR] Got no output from script..."
"[WARNING]Soft error occurred during UNSAFE conditions , IGNORE

Any help would be appreciated.

This is my simple script:

#!/usr/bin/python3
import json
import subprocess
from datetime import datetime
encoding = 'utf-8'

now=datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%S%z")

print(json.dumps({
"timestamp_utc": now,
"roof_status": {
"open_ok": 1
}
}))

Read More...