feat: Try to start RevPiPyLoad via SSH on the Revolution Pi

If the SSH tunnel is used and RevPiPyLoad is not started on the
Revolution Pi, an attempt is now made to start it.

Signed-off-by: Sven Sager <akira@narux.de>
This commit is contained in:
2023-08-31 15:38:46 +02:00
parent e95bf70993
commit c56c33f4e5
4 changed files with 93 additions and 53 deletions

View File

@@ -33,6 +33,7 @@ class ConnectionFail(IntEnum):
NO_XML_RPC = 1 NO_XML_RPC = 1
SSH_CONNECT = 2 SSH_CONNECT = 2
SSH_AUTH = 4 SSH_AUTH = 4
NO_XML_RPC_VIA_TUNNEL = 9 # Includes NO_XML_RPC Bit
class WidgetData(IntEnum): class WidgetData(IntEnum):
@@ -347,6 +348,10 @@ class ConnectionManager(QtCore.QThread):
) )
try: try:
ssh_tunnel_port = ssh_tunnel_server.connect_by_credentials(revpi_settings.ssh_user, ssh_pass) ssh_tunnel_port = ssh_tunnel_server.connect_by_credentials(revpi_settings.ssh_user, ssh_pass)
if getattr(revpi_settings, "ssh_enable_revpipyload", False):
ssh_tunnel_server.send_cmd("sudo systemctl enable --now revpipyload")
except AuthenticationException: except AuthenticationException:
self.connect_error.emit( self.connect_error.emit(
self.tr("Error"), self.tr( self.tr("Error"), self.tr(
@@ -394,7 +399,7 @@ class ConnectionManager(QtCore.QThread):
"- The RevPiPyLoad XML-RPC service is NOT bind to localhost\n" "- The RevPiPyLoad XML-RPC service is NOT bind to localhost\n"
"- The ACL permission is not set for 127.0.0.1!!!" "- The ACL permission is not set for 127.0.0.1!!!"
), ),
ConnectionFail.NO_XML_RPC, ConnectionFail.NO_XML_RPC_VIA_TUNNEL,
revpi_settings, revpi_settings,
) )
else: else:

View File

@@ -229,62 +229,62 @@ Wurde eine Hardwarekonfiguration in piCtory erzeugt?</translation>
<context> <context>
<name>ConnectionManager</name> <name>ConnectionManager</name>
<message> <message>
<location filename="../helper.py" line="533"/> <location filename="../helper.py" line="538"/>
<source>SIMULATING</source> <source>SIMULATING</source>
<translation>SIMULATION</translation> <translation>SIMULATION</translation>
</message> </message>
<message> <message>
<location filename="../helper.py" line="536"/> <location filename="../helper.py" line="541"/>
<source>NOT CONNECTED</source> <source>NOT CONNECTED</source>
<translation>NICHT VERBUNDEN</translation> <translation>NICHT VERBUNDEN</translation>
</message> </message>
<message> <message>
<location filename="../helper.py" line="553"/> <location filename="../helper.py" line="558"/>
<source>SERVER ERROR</source> <source>SERVER ERROR</source>
<translation>SERVER FEHLER</translation> <translation>SERVER FEHLER</translation>
</message> </message>
<message> <message>
<location filename="../helper.py" line="578"/> <location filename="../helper.py" line="583"/>
<source>RUNNING</source> <source>RUNNING</source>
<translation>LÄUFT</translation> <translation>LÄUFT</translation>
</message> </message>
<message> <message>
<location filename="../helper.py" line="580"/> <location filename="../helper.py" line="585"/>
<source>PLC FILE NOT FOUND</source> <source>PLC FILE NOT FOUND</source>
<translation>SPS PROGRAMM NICHT GEFUNDEN</translation> <translation>SPS PROGRAMM NICHT GEFUNDEN</translation>
</message> </message>
<message> <message>
<location filename="../helper.py" line="582"/> <location filename="../helper.py" line="587"/>
<source>NOT RUNNING (NO STATUS)</source> <source>NOT RUNNING (NO STATUS)</source>
<translation>LÄUFT NICHT (KEIN STATUS)</translation> <translation>LÄUFT NICHT (KEIN STATUS)</translation>
</message> </message>
<message> <message>
<location filename="../helper.py" line="584"/> <location filename="../helper.py" line="589"/>
<source>PROGRAM KILLED</source> <source>PROGRAM KILLED</source>
<translation>PROGRAMM GETÖTET</translation> <translation>PROGRAMM GETÖTET</translation>
</message> </message>
<message> <message>
<location filename="../helper.py" line="586"/> <location filename="../helper.py" line="591"/>
<source>PROGRAM TERMED</source> <source>PROGRAM TERMED</source>
<translation>PROGRAMM BEENDET</translation> <translation>PROGRAMM BEENDET</translation>
</message> </message>
<message> <message>
<location filename="../helper.py" line="588"/> <location filename="../helper.py" line="593"/>
<source>NOT RUNNING</source> <source>NOT RUNNING</source>
<translation>LÄUFT NICHT</translation> <translation>LÄUFT NICHT</translation>
</message> </message>
<message> <message>
<location filename="../helper.py" line="590"/> <location filename="../helper.py" line="595"/>
<source>FINISHED WITH CODE {0}</source> <source>FINISHED WITH CODE {0}</source>
<translation>BEENDET MIT CODE {0}</translation> <translation>BEENDET MIT CODE {0}</translation>
</message> </message>
<message> <message>
<location filename="../helper.py" line="401"/> <location filename="../helper.py" line="406"/>
<source>Error</source> <source>Error</source>
<translation>Fehler</translation> <translation>Fehler</translation>
</message> </message>
<message> <message>
<location filename="../helper.py" line="351"/> <location filename="../helper.py" line="356"/>
<source>The combination of username and password was rejected from the SSH server. <source>The combination of username and password was rejected from the SSH server.
Try again.</source> Try again.</source>
@@ -293,7 +293,7 @@ Try again.</source>
Bitte erneut versuchen.</translation> Bitte erneut versuchen.</translation>
</message> </message>
<message> <message>
<location filename="../helper.py" line="363"/> <location filename="../helper.py" line="368"/>
<source>Could not establish a SSH connection to server: <source>Could not establish a SSH connection to server:
{0}</source> {0}</source>
@@ -352,7 +352,7 @@ Das kann eine der folgenden Ursachen haben:
Benutze &quot;Über SSH verbinden&quot; um eine verschlüsselte Verbindung aufzubauen oder führe &apos;sudo revpipyload_secure_installation&apos; auf dem Revolution Pi aus, um eine direkte Verbindung zu konfigurieren!</translation> Benutze &quot;Über SSH verbinden&quot; um eine verschlüsselte Verbindung aufzubauen oder führe &apos;sudo revpipyload_secure_installation&apos; auf dem Revolution Pi aus, um eine direkte Verbindung zu konfigurieren!</translation>
</message> </message>
<message> <message>
<location filename="../helper.py" line="401"/> <location filename="../helper.py" line="406"/>
<source>Can not connect to RevPiPyLoad XML-RPC service! <source>Can not connect to RevPiPyLoad XML-RPC service!
This could have the following reasons: This could have the following reasons:
@@ -373,7 +373,7 @@ Das kann eine der folgenden Ursachen haben:
Benutze &quot;Über SSH verbinden&quot; um eine verschlüsselte Verbindung aufzubauen oder führe &apos;sudo revpipyload_secure_installation&apos; auf dem Revolution Pi aus, um eine direkte Verbindung zu konfigurieren!</translation> Benutze &quot;Über SSH verbinden&quot; um eine verschlüsselte Verbindung aufzubauen oder führe &apos;sudo revpipyload_secure_installation&apos; auf dem Revolution Pi aus, um eine direkte Verbindung zu konfigurieren!</translation>
</message> </message>
<message> <message>
<location filename="../helper.py" line="389"/> <location filename="../helper.py" line="394"/>
<source>Can not connect to RevPiPyLoad service through SSH tunnel! <source>Can not connect to RevPiPyLoad service through SSH tunnel!
This could have the following reasons: This could have the following reasons:
@@ -426,37 +426,37 @@ Das kann eine der folgenden Ursachen haben:
<context> <context>
<name>DebugIos</name> <name>DebugIos</name>
<message> <message>
<location filename="../debugios.py" line="213"/> <location filename="../debugios.py" line="228"/>
<source>signed</source> <source>signed</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../debugios.py" line="218"/> <location filename="../debugios.py" line="233"/>
<source>big_endian</source> <source>big_endian</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../debugios.py" line="204"/> <location filename="../debugios.py" line="219"/>
<source>as text</source> <source>as text</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../debugios.py" line="206"/> <location filename="../debugios.py" line="221"/>
<source>as number</source> <source>as number</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="../debugios.py" line="365"/> <location filename="../debugios.py" line="377"/>
<source>Can not use format text</source> <source>Can not use format text</source>
<translation>Formatierung nicht möglich</translation> <translation>Formatierung nicht möglich</translation>
</message> </message>
<message> <message>
<location filename="../debugios.py" line="365"/> <location filename="../debugios.py" line="377"/>
<source>Can not convert bytes {0} to a text for IO &apos;{1}&apos;. Switch to number format instead!</source> <source>Can not convert bytes {0} to a text for IO &apos;{1}&apos;. Switch to number format instead!</source>
<translation>Kann bytes {0} für &apos;{1}&apos; nicht in Text konvertieren. Wechseln Sie auf Nummernformat!</translation> <translation>Kann bytes {0} für &apos;{1}&apos; nicht in Text konvertieren. Wechseln Sie auf Nummernformat!</translation>
</message> </message>
<message> <message>
<location filename="../debugios.py" line="224"/> <location filename="../debugios.py" line="239"/>
<source>switch wordorder</source> <source>switch wordorder</source>
<translation>Wordorder tauschen</translation> <translation>Wordorder tauschen</translation>
</message> </message>
@@ -489,86 +489,86 @@ Ungesicherte Änderungen gehen verloren.</translation>
<context> <context>
<name>RevPiCommander</name> <name>RevPiCommander</name>
<message> <message>
<location filename="../revpicommander.py" line="308"/> <location filename="../revpicommander.py" line="320"/>
<source>Simulator started...</source> <source>Simulator started...</source>
<translation>Simulator gestartet...</translation> <translation>Simulator gestartet...</translation>
</message> </message>
<message> <message>
<location filename="../revpicommander.py" line="317"/> <location filename="../revpicommander.py" line="329"/>
<source>Can not start...</source> <source>Can not start...</source>
<translation>Kann nicht gestartet werden...</translation> <translation>Kann nicht gestartet werden...</translation>
</message> </message>
<message> <message>
<location filename="../revpicommander.py" line="510"/> <location filename="../revpicommander.py" line="522"/>
<source>Warning</source> <source>Warning</source>
<translation>Warnung</translation> <translation>Warnung</translation>
</message> </message>
<message> <message>
<location filename="../revpicommander.py" line="333"/> <location filename="../revpicommander.py" line="345"/>
<source>This version of Logviewer ist not supported in version {0} of RevPiPyLoad on your RevPi! You need at least version 0.4.1.</source> <source>This version of Logviewer ist not supported in version {0} of RevPiPyLoad on your RevPi! You need at least version 0.4.1.</source>
<translation>Diese Version vom Logbetrachter wird in RevPiPyLoad Version {0} nicht unterstützt! Es wird mindestens Version 0.4.1 benötigt.</translation> <translation>Diese Version vom Logbetrachter wird in RevPiPyLoad Version {0} nicht unterstützt! Es wird mindestens Version 0.4.1 benötigt.</translation>
</message> </message>
<message> <message>
<location filename="../revpicommander.py" line="383"/> <location filename="../revpicommander.py" line="395"/>
<source>XML-RPC access mode in the RevPiPyLoad configuration is too small to access this dialog!</source> <source>XML-RPC access mode in the RevPiPyLoad configuration is too small to access this dialog!</source>
<translation>XML-RPC Zugriffsberechtigung in der RevPiPyLoad Konfiguraiton ist zu klein für diese Einstellungen!</translation> <translation>XML-RPC Zugriffsberechtigung in der RevPiPyLoad Konfiguraiton ist zu klein für diese Einstellungen!</translation>
</message> </message>
<message> <message>
<location filename="../revpicommander.py" line="537"/> <location filename="../revpicommander.py" line="549"/>
<source>Error</source> <source>Error</source>
<translation>Fehler</translation> <translation>Fehler</translation>
</message> </message>
<message> <message>
<location filename="../revpicommander.py" line="363"/> <location filename="../revpicommander.py" line="375"/>
<source>The Version of RevPiPyLoad on your Revolution Pi ({0}) is to old. This Version of RevPiCommander require at least version 0.6.0 of RevPiPyLoad. Please update your Revolution Pi!</source> <source>The Version of RevPiPyLoad on your Revolution Pi ({0}) is to old. This Version of RevPiCommander require at least version 0.6.0 of RevPiPyLoad. Please update your Revolution Pi!</source>
<translation>Die Version von RevPiPyLoad ({0}) auf dem Revolution Pi ist zu alt. Diese Version vom RevPiCommander braucht mindestens Version 0.6.0. Bitte aktualisiere deinen Revolution Pi!</translation> <translation>Die Version von RevPiPyLoad ({0}) auf dem Revolution Pi ist zu alt. Diese Version vom RevPiCommander braucht mindestens Version 0.6.0. Bitte aktualisiere deinen Revolution Pi!</translation>
</message> </message>
<message> <message>
<location filename="../revpicommander.py" line="416"/> <location filename="../revpicommander.py" line="428"/>
<source>Question</source> <source>Question</source>
<translation>Frage</translation> <translation>Frage</translation>
</message> </message>
<message> <message>
<location filename="../revpicommander.py" line="416"/> <location filename="../revpicommander.py" line="428"/>
<source>Are you sure to reset piControl? <source>Are you sure to reset piControl?
The pictory configuration will be reloaded. During that time the process image will be interrupted and could rise errors on running control programs!</source> The pictory configuration will be reloaded. During that time the process image will be interrupted and could rise errors on running control programs!</source>
<translation>Soll piControl wirklich zurückgesetzt werden? <translation>Soll piControl wirklich zurückgesetzt werden?
Die piCtory Konfiguration wird neu geladen. Das Prozessabbild wird in dieser Zeit nicht verfügbar sein und es könnten Fehler in Steuerungsprogrammen ausgelöst werden!</translation> Die piCtory Konfiguration wird neu geladen. Das Prozessabbild wird in dieser Zeit nicht verfügbar sein und es könnten Fehler in Steuerungsprogrammen ausgelöst werden!</translation>
</message> </message>
<message> <message>
<location filename="../revpicommander.py" line="429"/> <location filename="../revpicommander.py" line="441"/>
<source>Success</source> <source>Success</source>
<translation>Erfolgreich</translation> <translation>Erfolgreich</translation>
</message> </message>
<message> <message>
<location filename="../revpicommander.py" line="429"/> <location filename="../revpicommander.py" line="441"/>
<source>piControl reset executed successfully</source> <source>piControl reset executed successfully</source>
<translation>piControl wurde erfolgreich zurückgesetzt</translation> <translation>piControl wurde erfolgreich zurückgesetzt</translation>
</message> </message>
<message> <message>
<location filename="../revpicommander.py" line="436"/> <location filename="../revpicommander.py" line="448"/>
<source>piControl reset could not be executed successfully</source> <source>piControl reset could not be executed successfully</source>
<translation>piControl konnte nicht zurückgesetzt werden</translation> <translation>piControl konnte nicht zurückgesetzt werden</translation>
</message> </message>
<message> <message>
<location filename="../revpicommander.py" line="484"/> <location filename="../revpicommander.py" line="496"/>
<source>Reset to piCtory defaults...</source> <source>Reset to piCtory defaults...</source>
<translation>Standardwerte von piCtory laden...</translation> <translation>Standardwerte von piCtory laden...</translation>
</message> </message>
<message> <message>
<location filename="../revpicommander.py" line="510"/> <location filename="../revpicommander.py" line="522"/>
<source>The watch mode ist not supported in version {0} of RevPiPyLoad on your RevPi! You need at least version 0.5.3! Maybe the python3-revpimodio2 module is not installed on your RevPi at least version 2.0.0.</source> <source>The watch mode ist not supported in version {0} of RevPiPyLoad on your RevPi! You need at least version 0.5.3! Maybe the python3-revpimodio2 module is not installed on your RevPi at least version 2.0.0.</source>
<translation>Der SPS Betrachter ist in Version {0} von RevPiPyLoad auf dem Rev Pi nicht unterstützt! Es muss mindestens Version 0.5.3 installiert sein! Vielleicht fehlt auch das python3-revpimodio2 Modul, welches mindestens Version 2.0.0 haben muss.</translation> <translation>Der SPS Betrachter ist in Version {0} von RevPiPyLoad auf dem Rev Pi nicht unterstützt! Es muss mindestens Version 0.5.3 installiert sein! Vielleicht fehlt auch das python3-revpimodio2 Modul, welches mindestens Version 2.0.0 haben muss.</translation>
</message> </message>
<message> <message>
<location filename="../revpicommander.py" line="522"/> <location filename="../revpicommander.py" line="534"/>
<source>Can not load this function, because your ACL level is to low! <source>Can not load this function, because your ACL level is to low!
You need at least level 1 to read or level 3 to write.</source> You need at least level 1 to read or level 3 to write.</source>
<translation>Für diese Funktion ist das Berechtigungslevel zu gering! <translation>Für diese Funktion ist das Berechtigungslevel zu gering!
Es muss mindestens Level 1 zum Lesen oder Level 3 zu Schreiben sein.</translation> Es muss mindestens Level 1 zum Lesen oder Level 3 zu Schreiben sein.</translation>
</message> </message>
<message> <message>
<location filename="../revpicommander.py" line="537"/> <location filename="../revpicommander.py" line="549"/>
<source>Can not load piCtory configuration. <source>Can not load piCtory configuration.
Did you create a hardware configuration? Please check this in piCtory!</source> Did you create a hardware configuration? Please check this in piCtory!</source>
<translation>Kann piCtory Konfiguration nicht laden. <translation>Kann piCtory Konfiguration nicht laden.
@@ -588,7 +588,7 @@ Das kann eine der folgenden Ursachen haben: Der Rev Pi ist nicht online, der XML
Führe &apos;sudo revpipyload_secure_installation&apos; auf dem Revolution Pi aus um diese Funktion zu konfigurieren!</translation> Führe &apos;sudo revpipyload_secure_installation&apos; auf dem Revolution Pi aus um diese Funktion zu konfigurieren!</translation>
</message> </message>
<message> <message>
<location filename="../revpicommander.py" line="308"/> <location filename="../revpicommander.py" line="320"/>
<source>The simulator is running! <source>The simulator is running!
You can work with this simulator if your call RevPiModIO with this additional parameters: You can work with this simulator if your call RevPiModIO with this additional parameters:
@@ -605,42 +605,65 @@ configrsc={1}
Dies kann aus der Textbox oben kopiert werden.</translation> Dies kann aus der Textbox oben kopiert werden.</translation>
</message> </message>
<message> <message>
<location filename="../revpicommander.py" line="317"/> <location filename="../revpicommander.py" line="329"/>
<source>Can not start the simulator! Maybe the piCtory file is corrupt or you have no write permissions for &apos;{0}&apos;.</source> <source>Can not start the simulator! Maybe the piCtory file is corrupt or you have no write permissions for &apos;{0}&apos;.</source>
<translation>Kann Simulator nicht starten! Vielleicht ist die piCtory Datei defekt oder es gibt keine Schreibberechtigung für &apos;{0}&apos;.</translation> <translation>Kann Simulator nicht starten! Vielleicht ist die piCtory Datei defekt oder es gibt keine Schreibberechtigung für &apos;{0}&apos;.</translation>
</message> </message>
<message> <message>
<location filename="../revpicommander.py" line="484"/> <location filename="../revpicommander.py" line="496"/>
<source>Do you want to reset your process image to {0} values? <source>Do you want to reset your process image to {0} values?
You have to stop other RevPiModIO programs before doing that, because they could reset the outputs.</source> You have to stop other RevPiModIO programs before doing that, because they could reset the outputs.</source>
<translation>Soll das virtuelle Prozessabbild auf {0} zurückgesetzt werden? <translation>Soll das virtuelle Prozessabbild auf {0} zurückgesetzt werden?
Es sollten alle RevPiModIO Programme vorher beendet werden, da diese ihre IO Werte sofort wieder schreiben würden.</translation> Es sollten alle RevPiModIO Programme vorher beendet werden, da diese ihre IO Werte sofort wieder schreiben würden.</translation>
</message> </message>
<message> <message>
<location filename="../revpicommander.py" line="484"/> <location filename="../revpicommander.py" line="496"/>
<source>zero</source> <source>zero</source>
<translation>null</translation> <translation>null</translation>
</message> </message>
<message> <message>
<location filename="../revpicommander.py" line="484"/> <location filename="../revpicommander.py" line="496"/>
<source>piCtory default</source> <source>piCtory default</source>
<translation>piCtory Standardwerte</translation> <translation>piCtory Standardwerte</translation>
</message> </message>
<message> <message>
<location filename="../revpicommander.py" line="238"/> <location filename="../revpicommander.py" line="250"/>
<source>Revolution Pi connected!</source> <source>Revolution Pi connected!</source>
<translation>Revolution Pi verbunden!</translation> <translation>Revolution Pi verbunden!</translation>
</message> </message>
<message> <message>
<location filename="../revpicommander.py" line="275"/> <location filename="../revpicommander.py" line="287"/>
<source>Connecting...</source> <source>Connecting...</source>
<translation>Verbinde...</translation> <translation>Verbinde...</translation>
</message> </message>
<message> <message>
<location filename="../revpicommander.py" line="238"/> <location filename="../revpicommander.py" line="250"/>
<source>Establish a connection to the Revolution Pi...</source> <source>Establish a connection to the Revolution Pi...</source>
<translation>Baue eine Verbindung zum Revolution Pi auf...</translation> <translation>Baue eine Verbindung zum Revolution Pi auf...</translation>
</message> </message>
<message>
<location filename="../revpicommander.py" line="133"/>
<source>Can not connect to RevPiPyLoad service through SSH tunnel!
We are trying to activate this service now and reconnect. The settings can be changed at any time via web status.</source>
<translation type="obsolete">Über den SSH Tunnel kann keine Verbindung zu RevPiPyLoad hergestellt werden!
Wir werden versuchen den Dienst zu starten und eine neue Verbindung herzustellen. Diese Einstellung kann im Webstatus geändert werden.</translation>
</message>
<message>
<location filename="../revpicommander.py" line="133"/>
<source>Information</source>
<translation>Information</translation>
</message>
<message>
<location filename="../revpicommander.py" line="133"/>
<source>Can not connect to RevPiPyLoad service through SSH tunnel!
We are trying to activate this service now and reconnect. The settings can be changed at any time via &apos;webstatus&apos;.</source>
<translation>Vielleicht läuft der RevPiPyLoad Dienst nicht.
Wir versuchen diesen Dienst jetzt zu aktivieren und verbinden uns neu. Die Einstellungen können über &apos;Webstatus&apos; jederzeit geändert werden.</translation>
</message>
</context> </context>
<context> <context>
<name>RevPiFiles</name> <name>RevPiFiles</name>
@@ -1216,12 +1239,12 @@ Dies ist kein Fehler von RevPi Commander.</translation>
<context> <context>
<name>Simulator</name> <name>Simulator</name>
<message> <message>
<location filename="../simulator.py" line="79"/> <location filename="../simulator.py" line="80"/>
<source>Select downloaded piCtory file...</source> <source>Select downloaded piCtory file...</source>
<translation>Heruntergeladene piCtory Datei auswählen...</translation> <translation>Heruntergeladene piCtory Datei auswählen...</translation>
</message> </message>
<message> <message>
<location filename="../simulator.py" line="79"/> <location filename="../simulator.py" line="80"/>
<source>piCtory file (*.rsc);;All files (*.*)</source> <source>piCtory file (*.rsc);;All files (*.*)</source>
<translation>piCtory Datei (*.rsc);;Alle Dateien (*.*)</translation> <translation>piCtory Datei (*.rsc);;Alle Dateien (*.*)</translation>
</message> </message>

View File

@@ -128,6 +128,18 @@ class RevPiCommander(QtWidgets.QMainWindow, Ui_win_revpicommander):
:param fail_code: Type of error :param fail_code: Type of error
:param revpi_settings: Settings of the revpi with the error :param revpi_settings: Settings of the revpi with the error
""" """
if fail_code is ConnectionFail.NO_XML_RPC_VIA_TUNNEL:
# If RevPiPyLoad is not running, we can try to activate it via ssh
QtWidgets.QMessageBox.information(
self, self.tr("Information"), self.tr(
"Can not connect to RevPiPyLoad service through SSH tunnel!\n\n"
"We are trying to activate this service now and reconnect. The settings can be "
"changed at any time via 'webstatus'."
),
)
revpi_settings.ssh_enable_revpipyload = True
self._pyload_connect(revpi_settings, False)
else:
QtWidgets.QMessageBox.critical(self, title, text) QtWidgets.QMessageBox.critical(self, title, text)
if fail_code is ConnectionFail.SSH_AUTH: if fail_code is ConnectionFail.SSH_AUTH:
# On failed credentials, we try to connect again and remove password form keychain, if exists # On failed credentials, we try to connect again and remove password form keychain, if exists