Installation of Repetier Server

https://www.repetier-server.com/manuals/0.85/index.html

sudo su
#There are sometimes some unreleases fixes which are not on the main repo. so manually try some release files:
wget http://download.repetier.com/files/server/debian-armhf/Repetier-Server-0.94.1-Linux.deb
dpkg -i Repetier-Server-0.94.1-Linux.deb
rm Repetier-Server-0.94.1-Linux.deb

Config File /usr/local/Repetier-Server/etc/RepetierServer.xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<server>
    <installation-directory>/usr/local/Repetier-Server/</installation-directory>
    <storage-directory>/var/lib/Repetier-Server/</storage-directory>
    <default-language>en</default-language>
    <port>3344</port>
    <disableIPV6>true</disableIPV6><!-- setting to false can cause problems with external access -->
    <logging>true</logging>
    <backlog-size>1000</backlog-size>
    <update-info-url>http://download.repetier-server.com/files/server/debian-armel/updateinfo.txt</update-info-url>
    <printer-frontend-url>/modules/front2/www/app.html</printer-frontend-url>
    <web-frontend-url>/</web-frontend-url>
</server>

Restart Repetier Server

service RepetierServer status
service RepetierServer restart

Apache virtual host

See mkcert & Go for SSL cert generation

sudo a2enmod proxy proxy_wstunnel proxy_http
vim /etc/apache2/sites-enabled/repetier-server.conf
<VirtualHost *:3345>
        ServerName localhost
        ServerAdmin some_mail@domain.de
        SSLEngine on
        SSLCertificateFile /etc/ssl/certs/trikarus.pem
        SSLCertificateKeyFile /etc/ssl/private/trikarus-key.pem
        RewriteEngine on
        ProxyRequests Off
        ProxyPreserveHost on
        ProxyPass /socket/ ws://localhost:3344/socket/
        ProxyPassReverse /socket/ ws://localhost:3344/socket/
        ProxyPass / http://localhost:3344/
        ProxyPassReverse / http://localhost:3344/
        ErrorLog ${APACHE_LOG_DIR}/error-repetier-server.log
        CustomLog ${APACHE_LOG_DIR}/access-repetier-server.log combined
        <location "/mod/front/">
                AuthType Basic
                AuthName "Authentication Required"
                AuthUserFile "/etc/apache2/htusers"
                Require valid-user
        </location>
        <location "/modules/front2/">
                AuthType Basic
                AuthName "Authentication Required"
                AuthUserFile "/etc/apache2/htusers"
                Require valid-user
        </location>
</VirtualHost>

(info) The htuser is shared with Duet Web Control. See Duet 2 and Duet Web Control

(info) the front2 web view is accesible by /modules/front2/www/app.html which automatically redirects to /modules/front2/app/app.html. If you enter /modules/front2/app/app.html it will not load the view correctly. So always use the /www/ variant. Preceding user:password@ in URL string also sometimes fails to load the inner content.

vim /etc/apache2/ports.conf
Listen 3345

Updates/Upgrades

.... can be done within the application frontend! (smile)

Trikarus (USB Serial) Printer config

  • Duet used RTS/DTR values each "high to low" and communicates by baud rate 115200
  • Duet is connected by USB Serial. The network connection is used to allow internal/external (secured) access to Duet Web Control. Access by network from Repetier Server is not really useful because it can only communicate over unsecure Telnet protocol (SSH not yet implemented)

PlugIns

At the moment there are not plugins installed. General information about plugins can be found at https://www.repetier-server.com/monitoring-plugins

RepRapFirmware support

Repetier Server console output is configured by RepRapFirmware.xml. This file contains information on how to parse Controller output.

Commands like M350 or M666 do not show full output lines because Repetier filters out too much. See https://forum.repetier.com/discussion/comment/32471#Comment_32471. To see "bug free" output check the console output from Duet Web Control instead.

If colons (:) are to be transferred in M117 or M118, please note:

#this change might affect other settings and is not used right now
vim /usr/local/Repetier-Server/firmware/RepRapFirmware.xml
#change from
<com okAfterResend="false" protocol="ascii" allowColonInAscii="false"/>

#to
<com okAfterResend="false" protocol="ascii" allowColonInAscii="true"/>

API Scripting with curl

https://www.repetier-server.com/manuals/programming/API/index.html

For sending commands to Repetier Server API some URL encode/decode functions are required. It can be done directly with curl argument or with the following bash script which needs to be sourced with "source" command to execute it's functions from command line.

#https://gist.github.com/cdown/1163649
vim /opt/urlcoder.sh
urlencode() {
    # urlencode <string>
    old_lc_collate=$LC_COLLATE
    LC_COLLATE=C
    
    local length="${#1}"
    for (( i = 0; i < length; i++ )); do
        local c="${1:i:1}"
        case $c in
            [a-zA-Z0-9.~_-]) printf "$c" ;;
            *) printf '%%%02X' "'$c" ;;
        esac
    done
    
    LC_COLLATE=$old_lc_collate
}

urldecode() {
    # urldecode <string>

    local url_encoded="${1//+/ }"
    printf '%b' "${url_encoded//%/\\x}"
}
#make functions available and test the output
source /opt/urlcoder.sh && urlencode "G1 X0 Y10"
#add to .bashrc at the bottom (root/flcmanage)
source /opt/urlcoder.sh

/opt/repetier-conf.sh

#!/bin/bash
export API_KEY="KEY" # some valid API key
export HOST="localhost"          # default: localhost
export PORT="3344"               # default: 3344
export WS="ws"                   # might also be wss
export SLUG="myPrinter"          # the printer name (see URLs in browser to get the slug name)
export HTTP_PROTO="http"

source "/opt/urlcoder.sh"        # source methods to use them in this script

send_gcode() {
    CMD='{"cmd":"'$1'"}'
    CMD=${CMD// /%20} #replace regular whitespaces with pre-encoded %20 whitespace because urlencode does not work with normal whi    tespaces correctly
    ENC_CMD=$(urlencode $CMD) # build some encoded command
    ENC_CMD=${ENC_CMD//%2520/%20} #repair the previously encoeded whitespaces
    curl --silent "${HTTP_PROTO}://${HOST}:${PORT}/printer/api/${SLUG}?apikey=${API_KEY}&a=send&data=$ENC_CMD" > /dev/null
}

The script has the method "send_gcode" to send GCodes while ignoring their output

source /opt/repetier-conf.sh
send_gcode 'M291 P\"Everything done. Ready to print!\"'

(info) For printing messages to Repetier Server console we use M291 instead of M117 or M118 because those commands seem to block the system buffer ("Mesg:15:12:09.888: Buffer used:73 Enforced free byte:71 lines stored:1"). This makes Repetier Server unresponsible.

For all other purposes we can use example requests like

#List all models
curl "http://localhost:3344/printer/api/Trikarus?apikey=SOMEAPIKEY&a=listModels" | jq

#Log File Overview
curl "http://localhost:3344/printer/api/Trikarus?apikey=SOMEAPIKEY&a=listLogs" | jq

#Printer states
curl "http://localhost:3344/printer/api/Trikarus?apikey=4SOMEAPIKEY&a=stateList" | jq


best way: add # before line
#colons will be printed on console:
CMD='{"cmd":"#M118 P0 S\"Smart Stepper '${AXIS}': ctrlmode: '${CTRLMODE}' | \""}'

#colons will be ignored if preceding "#" is not used
CMD='{"cmd":"M118 P0 S\"Smart Stepper '${AXIS}': ctrlmode: '${CTRLMODE}' | \""}'

API scripting with websockets and bash

(warning) Better do it directly using Python instead of using bash and websockets!

Install websocat tool

cd /usr/bin
wget https://github.com/vi/websocat/releases/download/v2.0.0-alpha0/websocat_arm-linux
chmod +x websocat_arm-linux
ln -sf websocat_arm-linux websocat

Check some basic commands

# call the websocket from Repetier Server instance - some basic command
./websocat ws://localhost:3344/socket

# the result:
{"callback_id":-1,"data":[{"data":{"session":"&e!gy3fXxXBOdb^HO80QwDqV%Tnu76AF"},"event":"loginRequired","printer":""}],"eventList":true}

#So Just attach the apikey to login accordingly:
websocat ws://localhost:3344/socket?apikey=SOMEAPIKEY

# And to send something to Repetier, use thins for instance:
echo '{"callback_id":-1,"data":{},"action":"stateList","printer":"myPrinter"}' | websocat ws://localhost:3344/socket?apikey=SOMEAPIKEY

# To grep out some event just do
websocat ws://localhost:3344/socket?apikey=SOMEAPIKEY | grep IP

And if you want to run websocat feedback loop all the time you can pipe all the output into screen session

vim /opt/repetier-monitor/repetier-monitor.sh
#!/bin/bash
#this script will get all the websocket output from Repetier Server by writing it into log file
# define some basic stuff
API_KEY="YOURKEY" # some valid API key
HOST="localhost"          # default: localhost
PORT="3344"               # default: 3344
WS="ws"                   # might also be wss
SLUG="myPrinter"           # the printer name (see URLs in browser to get the slug name)
LOG_FILE="/opt/repetier-monitor/websocat_out.log"

#make a new screen to deal with websocat session. nohup and & background streaming did not work
screen -d -m sh -c "websocat '${WS}://${HOST}:${PORT}/socket?apikey=${API_KEY}' | tee ${LOG_FILE}"
#run the script
chmod +x /opt/repetier-monitor/repetier-monitor.sh
/opt/repetier-monitor/repetier-monitor.sh
screen -list #check if it's running. If you want to show the screen itself run screen -R to attach to the detached screen session

# check output log (what you really want)
tail -f /opt/repetier-monitor/websocat_out.log

Events

See /#!/printerConfig/Trikarus/gcodes → tab "advanced"

(info) Use https://regex101.com to check if the entered regex is working correctly

IP Address

This works for DHCP addresses and static IP addresses (smile)

^.*Network is enabled, configured IP address:.*, actual IP address.*$

Duet Status (M408 S3)

^.*status.*mcu.*vin.*

Z Probe at min stop

^Endstops.X*.*Y.*Z.*probe: at min stop

External Commands - configuration, permissions, icons

https://www.repetier-server.com/manuals/0.94/index.html

Sometimes it is usefull to be able to call some external commands from the web interface. For example if you are running the server from a Raspberry-PI and want to shut it down, it would b econvenient to do so savely without opening a ssh terminal. For that reason you can extend the top right menu with external commands, which then appear there. On the other side you might want to run some commands on special positions of the print. The server therefor has the @execute command allowing to call an external programm. For security reasons it is not possible to call arbitrary commands. Instead you have to write a extcommands.xml file which you drop in your databbase subdirectory inside your storage directory (see installation where this is for your os).

Below you see an example of such a code. After adding/changing the file, you need to restart the server. Make sure your file keeps valid!

External commands list

vim /var/lib/Repetier-Server/database/extcommands.xml
<config>
    <!--
       If you want to run external commands, enter them in this configuration with
       full path. You will see them in the main menu. Copy this file into the
       <storage>/database directory.

       Security consideration: The reason there is no online editor for this is simply
       security. The commands you enter here are executed with the privileges of the
       daemon running the server. If you would allow online configuration, a hacker could
       simply add any command he needs to hack your system.

         Commands are normally visible in the global menu. If you want one to appear only in
         in the printer menu, add the attribute "slug" with the slugname as value to command tag
       where it should show up. You see the slugname when you select a printer as part of the path.
    -->
    <command>
        <name>Shutdown Server</name>
        <execute>sudo /sbin/shutdown -h now</execute>
        <confirm>Really shut down the server?</confirm>
        <!-- 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>Reboot Server</name>
        <execute>sudo /sbin/shutdown -r now</execute>
        <confirm>Really reboot the server?</confirm>
    </command>
    <command slug="Trikarus" icon="/led-on.svg">
        <name>LED Spot on</name>
        <execute>python3.7 /opt/gpio/ledspot-on.py</execute>
        <local>true</local>
        <remote>true</remote>
        <config-permission>true</config-permission>
    </command>
    <command slug="Trikarus" icon="/led-off.svg">
        <name>LED Spot off</name>
        <confirm>Really turn off the lights? :-(</confirm>
        <execute>python3.7 /opt/gpio/ledspot-off.py</execute>
        <local>true</local>
        <remote>true</remote>
        <config-permission>true</config-permission>
    </command>
    <command slug="Trikarus" icon="/psu-on.svg">
        <name>Power Supply on</name>
        <execute>python3.7 /opt/gpio/psu-on.py</execute>
        <local>true</local>
        <remote>true</remote>
        <config-permission>true</config-permission>
    </command>
    <command slug="Trikarus" icon="/psu-off.svg">
        <name>Power Supply off</name>
        <confirm>Really shut down PSU?</confirm>
        <execute>python3.7 /opt/gpio/psu-off.py</execute>
        <local>true</local>
        <remote>true</remote>
        <config-permission>true</config-permission>
    </command>
    <command slug="Trikarus" icon="/webcam.svg">
        <name>Send Webcam Screenshot by mail</name>
        <execute>sudo /opt/sendcamimage.sh</execute>
        <local>true</local>
        <remote>true</remote>
    </command>
    <command slug="Trikarus" icon="/webcam.svg">
        <name>Webcam 100% Zoom</name>
        <execute>sudo /opt/webcam-default.sh</execute>
        <local>true</local>
        <remote>true</remote>
    </command>
    <command slug="Trikarus" icon="/webcam.svg">
        <name>Webcam 500% Zoom</name>
        <execute>sudo /opt/webcam-zoomed.sh</execute>
        <local>true</local>
        <remote>true</remote>
    </command>
    <command slug="Trikarus" icon="/usb-off.svg">
        <name>Internal RPI 4 Port Hub - Power off</name>
        <confirm>Really switch off USB Power from onboard ports? It's required to turn PSU off before!</confirm>
        <execute>sudo /opt/uhubctl/uhubctl -r 500 -l 1-1 -p 2 -a off</execute>
        <local>true</local>
        <remote>true</remote>
        <config-permission>true</config-permission>
    </command>
    <command slug="Trikarus" icon="/usb-on.svg">
        <name>Internal RPI 4 Port Hub - Power on</name>
        <confirm>Please remember to turn on PSU again separately!</confirm>
        <execute>sudo /opt/uhubctl/uhubctl -l 1-1 -p 2 -a on</execute>
        <local>true</local>
        <remote>true</remote>
        <config-permission>true</config-permission>
    </command>
    <command slug="Trikarus" icon="/ip.svg">
        <name>Update /etc/hosts with recent Duet IP</name>
        <execute>/opt/sendDeviceIPsByMail.sh</execute>
        <local>true</local>
        <remote>true</remote>
        <config-permission>true</config-permission>
    </command>
    <command slug="Trikarus" icon="/prepare_print.svg">
        <name>Prepare for printing</name>
        <execute>sudo /opt/sms_modes/sms_prepare.sh</execute>
        <local>true</local>
        <remote>true</remote>
        <config-permission>true</config-permission>
    </command>
    <command slug="Trikarus" icon="/random-enable.svg">
        <name>Random positions mode - on</name>
        <confirm>Really turn on random mode? :-(</confirm>
        <execute>sudo /opt/sms_modes/sms_random.sh start</execute>
        <local>true</local>
        <remote>true</remote>
        <config-permission>true</config-permission>
    </command>
    <command slug="Trikarus" icon="/random-disable.svg">
        <name>Random positions mode - off</name>
        <execute>sudo /opt/sms_modes/sms_random.sh stop</execute>
        <local>true</local>
        <remote>true</remote>
        <config-permission>true</config-permission>
    </command>
    <command slug="Trikarus" icon="/torque_all.svg">
        <name>Smart Stepper - Torque all</name>
        <execute>sudo /opt/sms_modes/sms_torque_all.sh</execute>
        <local>true</local>
        <remote>true</remote>
        <config-permission>true</config-permission>
    </command>
    <command slug="Trikarus" icon="/torque_a.svg">
        <name>Smart Stepper - Torque A</name>
        <execute>sudo /opt/sms_modes/sms_torque_a.sh</execute>
        <local>true</local>
        <remote>true</remote>
        <config-permission>true</config-permission>
    </command>
    <command slug="Trikarus" icon="/torque_b.svg">
        <name>Smart Stepper - Torque B</name>
        <execute>sudo /opt/sms_modes/sms_torque_b.sh</execute>
        <local>true</local>
        <remote>true</remote>
        <config-permission>true</config-permission>
    </command>
    <command slug="Trikarus" icon="/torque_c.svg">
        <name>Smart Stepper - Torque C</name>
        <execute>sudo /opt/sms_modes/sms_torque_c.sh</execute>
        <local>true</local>
        <remote>true</remote>
        <config-permission>true</config-permission>
    </command>
    <command slug="Trikarus" icon="/torque_d.svg">
        <name>Smart Stepper - Torque D</name>
        <execute>sudo /opt/sms_modes/sms_torque_d.sh</execute>
        <local>true</local>
        <remote>true</remote>
        <config-permission>true</config-permission>
    </command>
    <command slug="Trikarus" icon="/mode_spid.svg">
        <name>Smart Stepper - sPID all</name>
        <execute>sudo /opt/sms_modes/sms_spid_all.sh</execute>
        <local>true</local>
        <remote>true</remote>
        <config-permission>true</config-permission>
    </command>
    <command slug="Trikarus" icon="/tighten_abc.svg">
        <name>Smart Stepper - Tighten ABC</name>
        <execute>sudo /opt/sms_modes/sms_tighten_abc.sh</execute>
        <local>true</local>
        <remote>true</remote>
        <config-permission>true</config-permission>
    </command>
    <command slug="Trikarus" icon="/tighten_d.svg">
        <name>Smart Stepper - Tighten D</name>
        <execute>sudo /opt/sms_modes/sms_tighten_d.sh</execute>
        <local>true</local>
        <remote>true</remote>
        <config-permission>true</config-permission>
    </command>
    <command slug="Trikarus" icon="/release_abc.svg">
        <name>Smart Stepper - Release ABC</name>
        <execute>sudo /opt/sms_modes/sms_release_abc.sh</execute>
        <local>true</local>
        <remote>true</remote>
        <config-permission>true</config-permission>
    </command>
    <command slug="Trikarus" icon="/release_d.svg">
        <name>Smart Stepper - Release D</name>
        <execute>sudo /opt/sms_modes/sms_release_d.sh</execute>
        <local>true</local>
        <remote>true</remote>
        <config-permission>true</config-permission>
    </command>
    <command slug="Trikarus" icon="/smooth_all.svg">
        <name>Smart Stepper - Smooth all</name>
        <execute>sudo /opt/sms_modes/sms_smooth_all.sh</execute>
        <local>true</local>
        <remote>true</remote>
        <config-permission>true</config-permission>
    </command>
    <command slug="Trikarus" icon="/smooth_a.svg">
        <name>Smart Stepper - Smooth A</name>
        <execute>sudo /opt/sms_modes/sms_smooth_a.sh</execute>
        <local>true</local>
        <remote>true</remote>
        <config-permission>true</config-permission>
    </command>
    <command slug="Trikarus" icon="/smooth_b.svg">
        <name>Smart Stepper - Smooth B</name>
        <execute>sudo /opt/sms_modes/sms_smooth_b.sh</execute>
        <local>true</local>
        <remote>true</remote>
        <config-permission>true</config-permission>
    </command>
    <command slug="Trikarus" icon="/smooth_c.svg">
        <name>Smart Stepper - Smooth C</name>
        <execute>sudo /opt/sms_modes/sms_smooth_c.sh</execute>
        <local>true</local>
        <remote>true</remote>
        <config-permission>true</config-permission>
    </command>
    <command slug="Trikarus" icon="/smooth_d.svg">
        <name>Smart Stepper - Smooth D</name>
        <execute>sudo /opt/sms_modes/sms_smooth_d.sh</execute>
        <local>true</local>
        <remote>true</remote>
        <config-permission>true</config-permission>
    </command>
    <command slug="Trikarus" icon="/zup.svg">
        <name>Smart Stepper - Z Up</name>
        <execute>sudo /opt/sms_modes/sms_zup.sh</execute>
        <local>true</local>
        <remote>true</remote>
        <config-permission>true</config-permission>
    </command>
    <command slug="Trikarus" icon="/zdown.svg">
        <name>Smart Stepper - Z Down</name>
        <execute>sudo /opt/sms_modes/sms_zdown.sh</execute>
        <local>true</local>
        <remote>true</remote>
        <config-permission>true</config-permission>
    </command>
    <command slug="Trikarus" icon="/setzero.svg">
        <name>Smart Stepper - Set Zero</name>
        <execute>sudo /opt/sms_modes/sms_setzero.sh</execute>
        <local>true</local>
        <remote>true</remote>
        <config-permission>true</config-permission>
    </command>
    <command slug="Trikarus" icon="/reboot.svg">
        <name>Smart Stepper - Reboot</name>
        <execute>sudo /opt/sms_modes/sms_reboot.sh</execute>
        <local>true</local>
        <remote>true</remote>
        <config-permission>true</config-permission>
    </command>
    <!--
        G-code files can contain
        @execute cmd param1 param2
        commands. To prevent external users from executing unwanted or dangerous commands,
        only commands defined here are allowed to execute. More over, only the shortcuts
        defined here are to be used as cmd in @execute. Prevent parameter where ever possible.
    -->
    <execute name="play" allowParams="true">/usr/bin/afplay</execute>
    <!-- play the sound file on moc os x -->
</config>

The commands in execute tag are executed asynchronously by default. That means the server will not wait for them to finish and directly continous sending g-code. Normally a good thing as it does not disturb the print. In case you want the server to wait for the command to finish, e.g. because you wait for some starting condition you can add the attribute sync="true". In that case you also have the option to stop the print if the returned error code is not 0. To enable this add attribute stopOnFail="true".

(info) to make the commands work you need to check the permissions (e.g. chmod 755) on the according files and folders

sudo permissions

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:

vim /etc/sudoers.d/repetierserver-perms
repetierserver ALL=NOPASSWD: /usr/local/Repetier-Setup/bin/manageWifiAccess
repetierserver ALL=NOPASSWD: /usr/local/Repetier-Setup/bin/installWebcam2
repetierserver ALL=NOPASSWD: /usr/local/Repetier-Setup/bin/screensaver
repetierserver ALL=NOPASSWD: /opt/sendcamimage.sh
repetierserver ALL=NOPASSWD: /opt/webcam-default.sh
repetierserver ALL=NOPASSWD: /opt/webcam-zoomed.sh
repetierserver ALL=NOPASSWD: /sbin/shutdown
repetierserver ALL=NOPASSWD: /opt/uhubctl/uhubctl
repetierserver ALL=NOPASSWD: /opt/sms_modes/sms_reboot.sh
repetierserver ALL=NOPASSWD: /opt/sms_modes/sms_setzero.sh
repetierserver ALL=NOPASSWD: /opt/sms_modes/sms_smooth_all.sh
repetierserver ALL=NOPASSWD: /opt/sms_modes/sms_smooth_a.sh
repetierserver ALL=NOPASSWD: /opt/sms_modes/sms_smooth_b.sh
repetierserver ALL=NOPASSWD: /opt/sms_modes/sms_smooth_c.sh
repetierserver ALL=NOPASSWD: /opt/sms_modes/sms_smooth_d.sh
repetierserver ALL=NOPASSWD: /opt/sms_modes/sms_spid_all.sh
repetierserver ALL=NOPASSWD: /opt/sms_modes/sms_torque_all.sh
repetierserver ALL=NOPASSWD: /opt/sms_modes/sms_torque_a.sh
repetierserver ALL=NOPASSWD: /opt/sms_modes/sms_torque_b.sh
repetierserver ALL=NOPASSWD: /opt/sms_modes/sms_torque_c.sh
repetierserver ALL=NOPASSWD: /opt/sms_modes/sms_torque_d.sh
repetierserver ALL=NOPASSWD: /opt/sms_modes/sms_tighten_abc.sh
repetierserver ALL=NOPASSWD: /opt/sms_modes/sms_tighten_d.sh
repetierserver ALL=NOPASSWD: /opt/sms_modes/sms_release_abc.sh
repetierserver ALL=NOPASSWD: /opt/sms_modes/sms_release_d.sh
repetierserver ALL=NOPASSWD: /opt/sms_modes/sms_zdown.sh
repetierserver ALL=NOPASSWD: /opt/sms_modes/sms_zup.sh
repetierserver ALL=NOPASSWD: /opt/sms_modes/sms_prepare.sh
repetierserver ALL=NOPASSWD: /opt/sms_modes/sms_random.sh start
repetierserver ALL=NOPASSWD: /opt/sms_modes/sms_random.sh stop

Icons

vim /var/lib/Repetier-Server/database/RepetierServer.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<server>
<branding>
    <shadow-www-directory>/var/lib/Repetier-Server/shadow</shadow-www-directory>
</branding>
</server>
cd /var/lib/Repetier-Server/
mkdir shadow/
chown repetierserver:dialout shadow/

Now put the icons into that directory and restart Repetier Server

Finally make use of the commands

(info) This is an older screenshot!

Often users have problems adding new commands on linux. Here are some common pitfals that we know users run into:

  • Changes are only available after a restart of Repetier-Server, see installation section for how to do this.
  • Commands are executed with the username Repetier-Server runs. On Linux this is normally repetierserver. Make sure the complete path to your executeable is accessible for other users.
  • Use an absolute path to the executeable. It gets started from a different path so local or relative path will often not work.
  • The script must be executeable, so make sure the executeable flag is set: chmod a+x filename
  • If a script requires root permission start it with sudo and make sure that command is in the list of allowed sudoers for repetierserver just as shown in the shutdown example.
  • If you add parameters to teh script in @execute, you need to set allowParams true. This can be a security risk if you execute gcodes from external sources!

Alternative Startup Configuration Settings

By default the installer creates a startup configuration file RepetierServer.xml, which defines most important start parameter like storage location and a port to listen to. Because this gets overwritten with each update, we provide a mechanism to change these parameters permanently. In addition to this config file, the server tries to load two more config files if present. These files are RepetierServer-extra.xml at the same location where RepetierServer.xml resides (installation directory/bin/ for Windows and intsallation directory/etc/ for Linux and Mac) and storage directory/database/RepetierServer.xml.

Logs

The log files can be found in

  • /var/lib/Repetier-Server/logs, or
  • since Repetier Server 0.94.0 you can view them directly in the user interface

UI Control of Trikarus

  • Left control is the hotend fan
  • center control is the print fan (blower)
  • right control are the three laser pointers


  • No labels
Write a comment…