Repetier Server extcommands
Hello,
I have seen a lot of threads for external commands in extcommands.xml but don't understand it at all.
My task is to use the wireless power switches which also used with octoprint and raspberry-remote.
1. What I need is to switch on and of with an additional button. The buttons I created and they are there.
Manually from the prompt switching works fine.
<command>
<name>Drucker_Strom_an</name>
<execute>sudo ./raspberry-remote/send 10101 1 1</execute>
</command>
<command>
<name>Drucker_Strom_aus</name>
<execute>sudo ./raspberry-remote/send 10101 1 0</execute>
</command>
Sadely this doesn't work and I think it could depend on user rights.
2. I want to switch from gcode automatically after a print via @execute
Is there any manual to follow and get it done step by step.
Sorry if there is already a complete solution which I didn't find until now.
But I think this is not only in my interest to get this fixed.
Thanks a lot for your support
Klaus
I have seen a lot of threads for external commands in extcommands.xml but don't understand it at all.
My task is to use the wireless power switches which also used with octoprint and raspberry-remote.
1. What I need is to switch on and of with an additional button. The buttons I created and they are there.
Manually from the prompt switching works fine.
<command>
<name>Drucker_Strom_an</name>
<execute>sudo ./raspberry-remote/send 10101 1 1</execute>
</command>
<command>
<name>Drucker_Strom_aus</name>
<execute>sudo ./raspberry-remote/send 10101 1 0</execute>
</command>
Sadely this doesn't work and I think it could depend on user rights.
2. I want to switch from gcode automatically after a print via @execute
Is there any manual to follow and get it done step by step.
Sorry if there is already a complete solution which I didn't find until now.
But I think this is not only in my interest to get this fixed.
Thanks a lot for your support
Klaus
Comments
./raspberry-remote/send
is relative path which is bad. You do not know what path server is using as base, so I think server is just not finding the command. See /var/lib/Repetier-Server/log/server.log for feedback or more hints. Also make sure sudo is callable without password query from linux like described in manual. server runs as repetierserver so that use should be able to run sudo without password prompt.
Klaus
<command>
<name>Drucker_Strom_an</name>
<execute>sudo /home/pi/raspberry-remote/send 10101 1 1</execute>
</command>
<command>
<name>Drucker_Strom_aus</name>
<execute>sudo /home/pi/raspberry-remote/send 10101 1 0</execute>
</command>
also tried
<command>
<name>Drucker_Strom_an</name>
<execute>sudo ./home/pi/raspberry-remote/send 10101 1 1</execute>
</command>
<command>
<name>Drucker_Strom_aus</name>
<execute>sudo ./home/pi/raspberry-remote/send 10101 1 0</execute>
</command>
and here the last part of the log:
2018-02-15 20:50:22: Starting Network ...
2018-02-15 20:50:22: Active features:4095
2018-02-15 20:50:22: Reading printer configurations ...
2018-02-15 20:50:22: Reading printer config /var/lib/Repetier-Server/configs/ShapercubeCoreXY.xml
2018-02-15 20:50:22: Starting printjob manager thread for ShapercubeCoreXY
2018-02-15 20:50:22: Starting printer threads ...
2018-02-15 20:50:22: Starting printer thread for ShapercubeCoreXY
2018-02-15 20:50:24: Starting work dispatcher subsystem ...
2018-02-15 20:50:24: Starting user database ...
2018-02-15 20:50:24: Importing wifi connections from /boot/repetier-network.xml
2018-02-15 20:50:24: Importing wifi connections from /var/lib/Repetier-Server/database/repetier-network.xml
2018-02-15 20:50:24: Importing wifi connections from /var/lib/Repetier-Server/database/repetier-network-stored.xml
2018-02-15 20:50:24: Initalizing LUA ...
2018-02-15 20:50:24: Starting wifi watcher ...
2018-02-15 20:50:24: Register LUA cloud services
2018-02-15 20:50:24: add Repetier-Renderer
2018-02-15 20:50:24: LUA initalization finished.
2018-02-15 20:50:24: Starting web server ...
2018-02-15 20:50:24: Work dispatcher thread started.
2018-02-15 20:50:24: Webserver started.
2018-02-15 20:50:26: New SSID Not Connected
2018-02-15 20:50:26: Client closed connection unexpectedly
2018-02-15 20:50:37: Starting external command sudo with 4 parameters.
2018-02-15 20:50:41: Starting external command sudo with 4 parameters.
2018-02-15 20:51:14: Closing websocket for missing ping
2018-02-15 20:53:06: Activating access point