Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Power on/off button
#11
@philippe05

That comment line is a trick which allows spc_moode.py to be invoked as if it were a shell script. It doesn't make the code "compliant" with anything. Since it starts the script in python3 it leads to the same result as I showed.

Regards,
Kent
Reply
#12
(04-09-2022, 02:22 PM)maartin Wrote:
(04-09-2022, 08:38 AM)philippe05 Wrote: Hi Martin, The Audiophonics python script you mentionned is indicated for Volumio. Use the "all in one" moOde dedicated script, without confit.txt changes (the script also makes GPIO settings).
Regards,
Philippe

Thanks Philippe, that is what i did meanwhile. Except for the changes in /configt.txt, I changed them as proposed, otherwise the LED is blinking.

What is still not working is Softpower Off. Maybe due to:

Quote:The script needs to be updated to Python3
Thanks Kent for the hint.

As i do not speak any Python, maybe someone can help me sort it out. I have the module and will test it, with pleasure.

AtB
Martin

Speaking only of the offending print statements, all three need enclosing parentheses:

Code:
#line 57 reads

            print "ShutDown order received, RaspBerry pi will now shutdown..."

#should read

            print ("ShutDown order received, RaspBerry pi will now shutdown...")

---

#line 87 reads

    print 'Argument:', sys.argv[1]

#should read

    print ('Argument:', sys.argv[1])

---

#line 90 reads

    print 'Argument:', sys.argv[1]

#should read

    print ('Argument:', sys.argv[1])

Changing those 3 lines should get you past the syntax errors.

Regards,
Kent
Reply
#13
(04-09-2022, 02:36 PM)TheOldPresbyope Wrote:
(04-09-2022, 02:22 PM)maartin Wrote:
(04-09-2022, 08:38 AM)philippe05 Wrote: Hi Martin, The Audiophonics python script you mentionned is indicated for Volumio. Use the "all in one" moOde dedicated script, without confit.txt changes (the script also makes GPIO settings).
Regards,
Philippe

Thanks Philippe, that is what i did meanwhile. Except for the changes in /configt.txt, I changed them as proposed, otherwise the LED is blinking.

What is still not working is Softpower Off. Maybe due to:

Quote:The script needs to be updated to Python3
Thanks Kent for the hint.

As i do not speak any Python, maybe someone can help me sort it out. I have the module and will test it, with pleasure.

AtB
Martin

Speaking only of the offending print statements, all three need enclosing parentheses:

Code:
#line 57 reads

            print "ShutDown order received, RaspBerry pi will now shutdown..."

#should read

            print ("ShutDown order received, RaspBerry pi will now shutdown...")

---

#line 87 reads

    print 'Argument:', sys.argv[1]

#should read

    print ('Argument:', sys.argv[1])

---

#line 90 reads

    print 'Argument:', sys.argv[1]

#should read

    print ('Argument:', sys.argv[1])

Changing those 3 lines should get you past the syntax errors.

Regards,
Kent


Very nice Kent! It is working:
On/Off with Button, Led blinks while startup, constant on when running.

Softpower off/reboot working aswell.

Very nice indeed!

Now my trusty Rasptouch is working flawless again, on Moode 8.01.

THANKs to all Moodies!

AtB

martin
Reply


Forum Jump: