Server 1.4.10 cannot get then to execute via GCODE

I gave my best effort to research this extensively and re-read all literature multiple times.
  • I gave scripts execute permissions via a+x.
  • I have used an absolute path in extcommands.xml (path is /db/) See commands below
  • I can run the scripts via ssh with or without sudo and they function as designed
  • Repetier host logs show no errors when using the @execute commands (Command is visible to Repetier Server)
Repetier host when trying both ;@execute and @execute
21:23:34.551 : ;@execute printeron
21:23:38.497 : @execute printeron
21:29:18.741 : @execute idleoff
21:29:21.598 : ;@execute idleoff


pertinent extcommands.xml data (Does not work w/ or w/o sudo):
<execute name="printeron" allowParams="true">sudo /db/printeron.sh</execute>
<execute name="idleoff" allowParams="true">sudo /db/printeroff.sh</execute>

Any help would be very much appreciated.

Thanks
Dave

Comments

  • When you say they work with sudo did you test them as user repetierserver? Default user pi can execute anything with sudo, but repetierserver only what was defined in /etc/sudoers.d files. As test become root
    sudo -i
    and then test your command to see error messages:
    sudo -u repetierserver /db/printeron.sh


  • To be clear I meant logged in as user pi they work with or without running sudo.  As a test (I saw this in some of your examples in your online manual) I tried to sudo the command in extcommands.xml as you will see in my OP.

    pertinent extcommands.xml data (Does not work w/ or w/o sudo):
    <execute name="printeron" allowParams="true">sudo /db/printeron.sh</execute>
    <execute name="idleoff" allowParams="true">sudo /db/printeroff.sh</execute>

    pi@Repetier:~ $ sudo -i
    root@Repetier:~# sudo -u repetierserver /db/printeron.sh
    root@Repetier:~# sudo -u repetierserver /db/printeron.sh
    root@Repetier:~#

    This works fine and no error.

    Dave

  • Sorry my command is bad it runs as user repetieruser so that would be equivalent of having it without sudo in extcommands. To simulate it with sudo you must run
    sudo -i
    sudo -u repetierserver sudo /db/printeron.sh

    And if you then get something like

    We trust you have received the usual lecture from the local System
    Administrator. It usually boils down to these three things:

        #1) Respect the privacy of others.
        #2) Think before you type.
        #3) With great power comes great responsibility.

    [sudo] password for repetierserver:
    sudo: a password is required


    it means the scripts are not in sudoers.d permission files. Did you add them there in list of allowed commands?

  • I just realized I transposed two letters in repetier (I always seem to do this w/ that name).  Is there a way to add just the folder, or does each script need to be defined individually?

    Dave
  • Little update, I can now run the commands using the user repetierserver however they still do not work in repetier host when using gcode.

    sudo -u repetierserver sudo /db/printeron.sh works fine.  However @execute printeron in gcode sitll does not.  No error, just an echo of my gcode in the host log UI,

    Dave
  • Disregard, I finally got it.  Thanks for all the help.  I think it's about time I get another pro license as i'm going to be going w/ your pi image for this next setup.  How complicated are setting up multiple PI cams going to be?  In the past I had to use mpg_streamer which worked but was clunky.  I see there is a new way but I do little to nothing w/a  pi these days.  
  • Multiple pi cams are not supported. Only one will start. For multiple cams you can however use usb webcams with mjpg support.
  • edited July 2023
    Well that is unfortunate.  Even if I were to use a camera multiplexor like this?  One more question if you don't mind.  I noticed that in pro I can rotate the camera but when I go to the actual web url (http://192.168.15.4:9000/?action=stream) the image is still upside down.  Is there a way to not only change what repetier server pro shows but also what is sent to the web stream?  When I used a raspian image I just used a -rot command but I just switched over to your image yesterday and the camera is handled differently.

    Thanks
    Dave 



  • Webcams are completely handled in script in /usr/local/Repetier-Setup/bin especially 
    startAllCams which is called to restart all mjpg streamer and mjpgStart which starts the cam in command line. So you can of course theak them to send extra parameter or modify pi cam detection to support more cams. It is just that it is not integrated at the moment.
    With the new pi cam library I also have 100% load for that cam because the arducam version I use as it was the only one supporting this seems to not support mjpg - at least with my original pi cam, also I kno wit has that capability.
    If you find a tweak to the scripts supporting more cams feel free to send them so I can include the improved version for updates.
Sign In or Register to comment.