Remote Controlled Power Connector Plugin?

edited September 2017 in Feature Requests
Hello,
Would it be possible to implement this one like in octoprint, too?

https://blog.seidel-philipp.de/anleitung-3d-drucker-mit-octoprint-einschalten-und-ausschalten/

That would be great ! For each Printer a seperate wireless power connector

Regards

Mario Mönch

Comments

  • Hello,

    I've the same request for wireless power connector to be implemented in Repetier Server. Is there already a workarround available with a script?

    Kind regards

    Klaus
  • You just do the same solution as with octoprint. Read manual->advanced setup on how to set up external commands. You can make either a new command that you can put in end gcode like "@unpower" or make a menu entry in the printers context menu to enable/disable power or both. Since these solutions are always very specific there will never be a "specific" version that handles your switch on pi server version, but the generic solution will always work.
  • edited September 2017
    I've added the lines to the extcommands.xml
     
    <command>
                    <name>Drucker01 ON</name>
                    <execute>sudo /home/pi/raspberry-remote/send -p 27 10100 1 1</execute>
                    <confirm>Really POWER ON Drucker 01?</confirm>
            </command>

    after that I rebooted the system and have the new function button.
    But the RepetierServer doesn't run it when I press it.
    If you copy sudo /home/pi/raspberry-remote/send -p 27 10100 1 1 to the bash in putty it works.
    Any suggestions?
  • maybe a problem with the user rights. look at:
    https://www.repetier-server.com/manuals/0.50/index.html

    All commands get executed with the user account and privileges the server daemon runs. So if you want to allow it to shutdown your computer, you need to add RepetierServer to the list of allowed users. To do this, open a shell and enter the following commands:
    # sudo -s
    # echo "repetierserver ALL=NOPASSWD: /sbin/shutdown" > /etc/sudoers.d/repetierserver-shutdown
  • I will take a look this evening thank you
  • Well I need some help with it:
    the Programm I want to run is based in:
    /home/pi/raspberry-remote

    What do I have to enter in order to make repetierserver able to execute it?




  • # sudo -s
    # echo "repetierserver ALL=NOPASSWD: /home/pi/raspberry-remote" > /etc/sudoers.d/repetierserver-remote

    Should add it into the sudoers list, so that sudo does not ask for a password, which is the main problem here you try to solve.
  • edited September 2017
    sudo -s
    echo "repetierserver ALL=NOPASSWD: /home/pi/raspberry-remote/send" > /etc/sudoers.d/repetierserver-remote
    With this I finally got it to work ! Thank you guys for your fast help!


    If anybody wants to know how to install and connect Hardware and Wiring Pi libraries feel free to contact me
  • Repetier said:
    # sudo -s
    # echo "repetierserver ALL=NOPASSWD: /home/pi/raspberry-remote" > /etc/sudoers.d/repetierserver-remote

    Should add it into the sudoers list, so that sudo does not ask for a password, which is the main problem here you try to solve.

    And what about adding the send command to the gcode?

    I added
    "@execute test.sh "
    to the gcode endscript because of params of the send command

    The test.sh is+0777 and contains:

    #!/bin/bash
    sudo /home/pi/raspberry-remote/send -p 27 10100 3 0

    But it's not working
    something I forgot ?


  • Depends on how you did define it. The execute commands need to be defined seperately
    <execute name="poweroff" allowParams="true">/home/pi/test.sh</execute>
    so here the command is 
    @execute play
    and it will run /home/pi/test.sh
    important is to use full path and again it is run as user repetierserver. Means that path must be readable for that user (so all user read/execute permission must be set).

Sign In or Register to comment.