@execute in gcode not working...

Hi,

I changed the extcommands.xml to have additional commands for light on and light off (relais connected to the gpio of the pi). The command in the main menu work well, but ";@execute lighton" and ";@execute lightoff" do not work. Here are my definitions:

        <command>
                <name>Light On</name>
                <execute>/home/pi/scripts/lighton.sh</execute>
                <!-- Define if command should show up in local printer interface, default true.-->
                <local>true</local>
                <!-- Define if command should show up in remote printer interface, default true.-->
                <remote>true</remote>
                <!-- Define if command should show up only for users with print permission, default true.-->
                <print-permission>true</print-permission>
                <!-- Define if command should show up only for users with add files permission, default false.-->
                <add-permission>true</add-permission>
                <!-- Define if command should show up only for users with del files permission, default false.-->
                <del-permission>true</del-permission>
                <!-- Define if command should show up only for users with configuration permission, default false.-->
                <config-permission>true</config-permission>
        </command>
        <command>
                <name>Light Off</name>
                <execute>/home/pi/scripts/lightoff.sh</execute>
                <!-- Define if command should show up in local printer interface, default true.-->
                <local>true</local>
                <!-- Define if command should show up in remote printer interface, default true.-->
                <remote>true</remote>
                <!-- Define if command should show up only for users with print permission, default true.-->
                <print-permission>true</print-permission>
                <!-- Define if command should show up only for users with add files permission, default false.-->
                <add-permission>true</add-permission>
                <!-- Define if command should show up only for users with del files permission, default false.-->
                <del-permission>true</del-permission>
                <!-- Define if command should show up only for users with configuration permission, default false.-->
                <config-permission>true</config-permission>
        </command>
        <execute name="lighton" allowParams="false">/home/pi/scripts/lighton.sh></execute>
        <execute name="lightoff" allowParams="false">/home/pi/scripts/lightoff.sh></execute>

What's wrong with it? Has anybody any idea?

Thanks in advance!

Alex

Comments

  • I forgot: I run Repetier Server Pro 0.91.2 on a Raspberry Pi 3+.
  •         <execute name="lighton" allowParams="false">/home/pi/scripts/lighton.sh></execute>
            <execute name="lightoff" allowParams="false">/home/pi/scripts/lightoff.sh></execute>
    there is an extra > after .sh making the command fail.

            <execute name="lighton" allowParams="false">/home/pi/scripts/lighton.sh</execute>
            <execute name="lightoff" allowParams="false">/home/pi/scripts/lightoff.sh</execute>

    should be correct. At least then the syntax is ok. If light in menu work I assume you have already solved the user permission problems (mean it is executed as repetieruser not pi).
  • Repetier said:
            <execute name="lighton" allowParams="false">/home/pi/scripts/lighton.sh></execute>
            <execute name="lightoff" allowParams="false">/home/pi/scripts/lightoff.sh></execute>
    there is an extra > after .sh making the command fail.

            <execute name="lighton" allowParams="false">/home/pi/scripts/lighton.sh</execute>
            <execute name="lightoff" allowParams="false">/home/pi/scripts/lightoff.sh</execute>

    should be correct. At least then the syntax is ok. If light in menu work I assume you have already solved the user permission problems (mean it is executed as repetieruser not pi).
    Oh shit. Sometimes you look through the code and do not see the most simple thing.

    Thank you so much!

    Alex
Sign In or Register to comment.