×

INDI Library v1.9.9 Released (30 Nov 2022)

Bi-monthly INDI Library released with new drivers and bug fixes.

[SOLVED] Scripts not working on SM 1.6

  • Posts: 10
  • Thank you received: 0
Hello everyone,
I just updated to SM 1.6 and I have issues with python scripts running raspberry GPIO pins.
I use gpiozero to move a DIY servo dust cap and rpi.gpio to operate an EL panel with PWM commands for flats.
These scripts work just fine if launched in shell and until SM 1.5 also worked in Scheduler, Capture and Dome Scripting modules.
I tried all I could to thoubleshoot this issue, I hope that someone may halp figuring out what it might be... thanks!
Fabio
 
1 year 2 months ago #75717

Please Log in or Create an account to join the conversation.

Maybe you need to install some packages? Can you post a sample small script I can test?
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
1 year 2 months ago #75735

Please Log in or Create an account to join the conversation.

  • Posts: 10
  • Thank you received: 0
Hi Jasem and thanks for the reply,
I use very simple scripts to open/close the cap of the telescope and turning on/off the flat EL light, I attach the code for opening the cap (please unzip as I cannot enclose .py files).
This code is running without issues if I launch from shell with command "python2 open.py" therefore I don't think I miss packages to install...
Thanks for your help!
Fabio
1 year 2 months ago #75777
Attachments:

Please Log in or Create an account to join the conversation.

It's possible this is related to pytbon2 which is deprecated? it's not hard to migrate to Python3
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
1 year 2 months ago #75778

Please Log in or Create an account to join the conversation.

  • Posts: 10
  • Thank you received: 0
Sorry Jasem, it was just a typo, I already use "python3 open.py" command
1 year 2 months ago #75779

Please Log in or Create an account to join the conversation.

Did you reinstall gpiozero package? it doesn't come with Stellarmate.
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
1 year 2 months ago #75781

Please Log in or Create an account to join the conversation.

  • Posts: 10
  • Thank you received: 0
Yes, gpiozero is installed in its latest version 1.6.2-1
1 year 2 months ago #75783

Please Log in or Create an account to join the conversation.

Running this as sudo makes a difference? any issues reporting on dmesg or journalctl -f ?
 
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
1 year 2 months ago #75784

Please Log in or Create an account to join the conversation.

  • Posts: 10
  • Thank you received: 0
I just tried, both commands return this error:
v3d fec00000.v3d: MMU error from client L2T (0) at 0x5621000, pte invalid
1 year 2 months ago #75789

Please Log in or Create an account to join the conversation.

I don't think that's related. Running as root, same issue? Could be also some permission issue. Could there a conflict with pigpiod? There is a service running... maybe you can turn that off

sudo systemctl stop pigpiod

then test again?
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
1 year 2 months ago #75792

Please Log in or Create an account to join the conversation.

  • Posts: 10
  • Thank you received: 0
sudo systemctl stop pigpiod did not change the behaviour:

- script runs ok from shell with "python3 script.py" (both as stellarmate and root)
- same script fails in capture/scheduler/dome module with error message in INDI Control Panel messages box

I agree that it seems a permission issue but I do not understand why this is happening only though ekos
1 year 2 months ago #75796

Please Log in or Create an account to join the conversation.

What if you change to:
#!/usr/bin/python3

Does it make any difference?
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
1 year 2 months ago #75797

Please Log in or Create an account to join the conversation.

Time to create page: 0.310 seconds