Compare commits
3 Commits
2eb907e383
...
a282a95c4e
Author | SHA1 | Date | |
---|---|---|---|
a282a95c4e | |||
07555845a1 | |||
f721f92b59 |
12
README.md
12
README.md
@ -34,6 +34,7 @@ hideWindowWhenIdle=true
|
|||||||
|
|
||||||
logFolderPath=/var/log/rhasspyVisualConversationTool
|
logFolderPath=/var/log/rhasspyVisualConversationTool
|
||||||
logLevel=5
|
logLevel=5
|
||||||
|
logFileEnabled=false
|
||||||
|
|
||||||
mqttClientServerHostname=mqtt.yourServer.com
|
mqttClientServerHostname=mqtt.yourServer.com
|
||||||
mqttClientServerPort=1883
|
mqttClientServerPort=1883
|
||||||
@ -60,6 +61,8 @@ Put this content into the file (adapt the folder if you changed it above):
|
|||||||
```
|
```
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
export DISPLAY=:0.0
|
||||||
|
|
||||||
while(true)
|
while(true)
|
||||||
do
|
do
|
||||||
cd /home/pi/RhasspyVisualConversationTool/
|
cd /home/pi/RhasspyVisualConversationTool/
|
||||||
@ -72,6 +75,15 @@ done
|
|||||||
|
|
||||||
Make it runnable: _chmod 775 /home/pi/Desktop/startConversationTool.sh_
|
Make it runnable: _chmod 775 /home/pi/Desktop/startConversationTool.sh_
|
||||||
|
|
||||||
|
### Install xdotool to wake up the screen automatically
|
||||||
|
When you address Rhasspy the screen will be turned on. For that feature the external application xdotool is utilized.
|
||||||
|
|
||||||
|
You may still need to install it by executing
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo apt install -y xdotool
|
||||||
|
```
|
||||||
|
|
||||||
### Make the script autostart with the graphical user interface
|
### Make the script autostart with the graphical user interface
|
||||||
|
|
||||||
Create this file: _/home/pi/.config/autostart/conversationTool.desktop_
|
Create this file: _/home/pi/.config/autostart/conversationTool.desktop_
|
||||||
|
3
RhasspyVisualConversationTool/.gitignore
vendored
3
RhasspyVisualConversationTool/.gitignore
vendored
@ -74,4 +74,5 @@ RhasspyVisualConversationTool*8883
|
|||||||
RhasspyVisualConversationTool*1883
|
RhasspyVisualConversationTool*1883
|
||||||
keystore.jks
|
keystore.jks
|
||||||
res
|
res
|
||||||
RhasspyVisualConversationTool-settings.ini
|
RhasspyVisualConversationTool-settings.ini
|
||||||
|
/RhasspyVisualConversationToolLogFile.txt
|
||||||
|
@ -127,14 +127,14 @@ public class GUI
|
|||||||
if(!initialConnectionEstablished)
|
if(!initialConnectionEstablished)
|
||||||
initialConnectionEstablished = true;
|
initialConnectionEstablished = true;
|
||||||
|
|
||||||
connectionStatusTextField.setText("Connected to: " + Settings.mqttClientServerHostname);
|
connectionStatusTextField.setText("Connected: " + "to " + Settings.mqttClientServerHostname);
|
||||||
|
|
||||||
if(Settings.hideWindowWhenIdle)
|
if(Settings.hideWindowWhenIdle)
|
||||||
minimizeDelayed();
|
minimizeDelayed();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
connectionStatusTextField.setText("Not connected");
|
connectionStatusTextField.setText("Connected: " + String.valueOf(MQTT.getInstance().getClient().isConnected()));
|
||||||
getFocus();
|
getFocus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -337,31 +337,36 @@ public class GUI
|
|||||||
@Override
|
@Override
|
||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
try
|
Miscellaneous.runExternalApplication("/usr/bin/xdotool key ctrl", 0, null, null);
|
||||||
{
|
|
||||||
/*
|
|
||||||
* Move the mouse cursor
|
|
||||||
*
|
|
||||||
* Using this amount of movements has proven relatively reliable.
|
|
||||||
* Using less has not always woken up the screen or only woke it
|
|
||||||
* up, but did not also unblank it, resulting in a well-lit, but
|
|
||||||
* still black screen.
|
|
||||||
*/
|
|
||||||
|
|
||||||
Robot robot = new Robot();
|
|
||||||
for(int xCoord = 500; xCoord < 550; xCoord++)
|
|
||||||
for(int yCoord = 500; yCoord < 550; yCoord++)
|
|
||||||
robot.mouseMove(xCoord, yCoord);
|
|
||||||
}
|
|
||||||
catch(Exception e)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}});
|
}});
|
||||||
|
|
||||||
t.start();
|
t.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void moveMouseCursor()
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Move the mouse cursor
|
||||||
|
*
|
||||||
|
* Using this amount of movements has proven relatively reliable.
|
||||||
|
* Using less has not always woken up the screen or only woke it
|
||||||
|
* up, but did not also unblank it, resulting in a well-lit, but
|
||||||
|
* still black screen.
|
||||||
|
*/
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Robot robot = new Robot();
|
||||||
|
for(int xCoord = 500; xCoord < 550; xCoord++)
|
||||||
|
for(int yCoord = 500; yCoord < 550; yCoord++)
|
||||||
|
robot.mouseMove(xCoord, yCoord);
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void getFocus()
|
void getFocus()
|
||||||
{
|
{
|
||||||
java.awt.EventQueue.invokeLater(new Runnable()
|
java.awt.EventQueue.invokeLater(new Runnable()
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user