Installation of Repetier Server
Config File /usr/local/Repetier-Server/etc/RepetierServer.xml
Restart Repetier Server
Apache virtual host
See mkcert & Go for SSL cert generation
The htuser is shared with Duet Web Control. See Duet 2 and Duet Web Control
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.
.... can be done within the application frontend!
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)
At the moment there are not plugins installed. General information about plugins can be found at https://www.repetier-server.com/monitoring-plugins
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:
API Scripting with curl
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.
The script has the method "send_gcode" to send GCodes while ignoring their output
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
API scripting with websockets and bash
Better do it directly using Python instead of using bash and websockets!
Install websocat tool
Check some basic commands
And if you want to run websocat feedback loop all the time you can pipe all the output into screen session
External Commands - configuration, permissions, icons
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
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".
to make the commands work you need to check the permissions (e.g. chmod 755) on the according files and folders
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:
Now put the icons into that directory and restart Repetier Server
Finally make use of the commands
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.
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