Gunthy

GUNBOT: The automatic profit generator => Beginners & Help => Topic started by: vlmm on October 29, 2017, 07:18:10 PM

Title: [Guide] Gunbot XT (v8.0.3) using a Raspberry Pi
Post by: vlmm on October 29, 2017, 07:18:10 PM
hi

i am running the bot with a raspberry pi.

i will share what i did. maybe this will help someone and others might post feedback to improve things.
the post was updated for Gunbot XT. And i will include all questions asked here step be step.

You need a licence? Contact me and you will get a 10% discount vlom@protonmail.com

Like it guide? thank you: BTC 14xQzDipMf1tzPQaj6bG7vsUXK1jDNjGkV

the pi
if you install raspian (https://www.raspberrypi.org/documentation/installation/installing-images/) you need a screen (a TV via HDMI works) and a keyboard first. you have to enable the SSH access and for that you have to edit raspi-config (https://www.raspberrypi.org/documentation/configuration/raspi-config.md).

1. installing:



download the version you like. you can do this with wget.
for Gunbot XT
Code: [Select]
wget https://github.com/GuntharDeNiro/BTCT/releases/download/803/Gunbot.XT.Edition.-.Arm.package.zip 
unzip it and

Code: [Select]
unzip Gunbot.XT.Edition.-.Arm.package.zip
cd into the folder.

Code: [Select]
cd Gunbot XT Edition - Arm packaget
then you have to make the "apps" executable. you can do with

Code: [Select]
chmod +x gunthy-arm
for the GUI:
Code: [Select]
chmod +x gunthy-gui-arm
if tis does not work for you then try:

Code: [Select]
chmod u+x gunthy-armor
Code: [Select]
chmod u+x gunthy-gui-arm


2. configuration.

without GUI
because i am running the pi headless i connected to the pi with cyberduck (https://cyberduck.io). Connect with SFTP.

(https://s1.postimg.org/2ehns0lwz3/Screen_Shot_2017-11-01_at_21.39.14.png)

After you did this navigate to the gunbot folder. after that you can click on config.js and afterwards on the text wrangler icon.

(https://s1.postimg.org/5lzvyhmc3z/cyberduck_textwrangler.png)

This will open the config.js in textwrangler.

(https://s1.postimg.org/9sbst3kq7j/textwrangler.png)

Edit what have to be edited and save the file. it will be saved on your raspberry. you don't have to download or upload the config.js

with GUI
cd into the folder and start the GUI-app

Code: [Select]
./gunthy-gui-arm
after that open a browser and type:
localhost:5000

If you have an error message during the launch of ./gunthy-gui-arm then check if port 5000 is already in use. you can do this like this:

Code: [Select]
netstat -lptn
If the port is used then try a reboot.

Code: [Select]
sudo reboot



3. running

without GUI
i am running the raspberry pi headless. thats why i connect via terminal now. before you start bot install screen or a similar tool. https://wiki.alpinelinux.org/wiki/Screen_terminal_multiplexer. Otherwise the bots stops when you close the terminal on your machine.

Code: [Select]
sudo apt-get install screen
after you have done that start the bot. cd into the directory where gunthy-arm is. the type this into your terminal:

Code: [Select]
screen ./gunthy-arm
with ^A d (control A d) you can detach from the session. after that you can close the terminal and the bot keeps running.


with GUI

And if you run your pi headless, than you can use the GUI via VNC.

You need an app on your host and the raspi has to be configured for the VNC use.
See here: https://www.raspberrypi.org/documentation/remote-access/vnc/

This is how it can look like when you use VNC:

(https://s1.postimg.org/1ofp0fkjn3/Screen_Shot_2017-11-06_at_14.50.51.png)




4. checking

you can reconnect to the session with the bot and check if it is running

Code: [Select]
screen -x (if you have only one screen session)


or use

Code: [Select]
screen -listThere are screens on:
        11151.pts-1.mhlab01     (Attached)
        11131.pts-3.mhlab01     (Attached)
2 Sockets in /var/run/screen/S-root.

Code: [Select]
screen -x 11151 (if this is the session with bot)

(https://s1.postimg.org/2tqdpdwt33/running_gunbot.png)

if you want to capture the output of the gunbot screen session you can do the following steps.

Create the file .screenrc in your home directory.

Code: [Select]
sudo nano .screenrc
put this into the file:

Quote
# Always show a status line in the window footer
hardstatus on
hardstatus alwayslastline
hardstatus string "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G} %H %{..Y} %m/%d %C%a "

# Autodetach session on hangup instead of
# terminating screen completely
autodetach on

# Turn off the splash screen
startup_message off

# set log on all windows
deflog on

(https://remysharp.com/2015/04/27/screen)

The next time you start the bot with screen ./gunthy-arm there will a file be created (screenlog.0) in which the output is saved.
Title: Re: Using a raspberry pi 3 and Gunbot Version 5
Post by: Calm N Patience on November 01, 2017, 09:30:22 AM
Hi, Do you connect your Raspberry PI to a monitor or a computer to run a Gunbot?
Title: Re: [Guide] GunBot Version 5 using a Raspberry P 3
Post by: vlmm on November 01, 2017, 07:23:00 PM
you don't need a monitor.
1. you can connect via ssh. all you need to know can be found here:
https://www.raspberrypi.org/documentation/remote-access/ssh/

2. or do it via vnc, then you can use the GUI.
https://www.raspberrypi.org/documentation/remote-access/vnc/

in both ways you need to control the bot via terminal. there isn't a GUI, made Gunbot XT will have one.
Title: Re: [Guide] GunBot Version 5 using a Raspberry P 3
Post by: vlmm on November 01, 2017, 07:25:03 PM
In the .screenrc file you can add this line. termcapinfo xterm* ti@:te@

with that you can scroll through the terminal output. i stopped saving the output because the file gets big rather fast.
Title: Re: [Guide] GunBot Version 5 using a Raspberry P 3
Post by: Calm N Patience on November 02, 2017, 12:15:04 PM
In the .screenrc file you can add this line. termcapinfo xterm* ti@:te@

with that you can scroll through the terminal output. i stopped saving the output because the file gets big rather fast.

I'll get a Raspberry PI 3 and then follow the instruction you gave. I'm really interested to do it. Thanks for the awesome information. it's really helpful.
Title: Re: [Guide] Gunbot XT and GunBot Version 5 using a Raspberry P 3
Post by: vlmm on November 06, 2017, 06:15:49 PM
Gunbot XT is out.

Almost all you need to know you can find here:
https://github.com/GuntharDeNiro/BTCT/wiki/ARM-installation

or in the posts above this one.

I made the first tests. It runs. If you need a GUI then you have one too.

If you have an error message during the launch of ./gunthy-gui-arm then check if port 5000 is already in use. you can do this like this:

Code: [Select]
netstat -lptn
If the port is used then try a reboot.

Code: [Select]
sudo reboot
Start the GUI via terminal. You have to be in the folder of the executable.

Code: [Select]
./gunthy-gui-arm
If you want to able to close the terminal window then use screen again.

Code: [Select]
screen ./gunthy-gui-arm
And if you run your pi headless, than you can use the GUI via VNC.

You need an app on you host and raspi has to be configured for the VNC use.
See here: https://www.raspberrypi.org/documentation/remote-access/vnc/

This is how it can look like when you use VNC:

(https://s1.postimg.org/1ofp0fkjn3/Screen_Shot_2017-11-06_at_14.50.51.png)
Title: Re: [Guide] Gunbot XT and GunBot Version 5 using a Raspberry P 3
Post by: Calm N Patience on November 07, 2017, 09:30:01 AM
Hi, I'll use two bots on Raspberry PI. How many pairs can we trade on PI? Should I get SD card 32gb or 16gb? Also will Raspberry PI LCD screen good for VNC use? Thank you very much.
Title: Re: [Guide] Gunbot XT and GunBot Version 5 using a Raspberry P 3
Post by: vlmm on November 07, 2017, 05:17:27 PM
at the moment i have 34 pairs.

if you want to use VNC you don't need any screen. thats what it is for. if you really need a GUI.

this is how it will look like when you use VNC:

(https://s1.postimg.org/1ofp0fkjn3/Screen_Shot_2017-11-06_at_14.50.51.png)
Title: Re: [Guide] Gunbot XT and GunBot Version 5 using a Raspberry P 3
Post by: Calm N Patience on November 08, 2017, 01:38:21 AM
at the moment i have 34 pairs.

if you want to use VNC you don't need any screen. thats what it is for. if you really need a GUI.

this is how it will look like when you use VNC:

(https://s1.postimg.org/1ofp0fkjn3/Screen_Shot_2017-11-06_at_14.50.51.png)

Thanks for all these information. I'm going to get Raspberry PI first. There is still a lot of things need to learn to put everything in place.
Title: Re: [Guide] Gunbot XT and GunBot Version 5 using a Raspberry P 3
Post by: Calm N Patience on November 13, 2017, 10:09:51 AM
Finally I received  Raspberry PI 3 today ;D. I'm goint to setup the pi now. I want to use it like you do with VNC on headless PI. For using VNC on headless PI, do we have to setup the PI headlessly or actually we can set it up on monitor then just install the VNC to the PI? Thanks.
Title: Re: [Guide] Gunbot XT and GunBot Version 5 using a Raspberry P 3
Post by: vlmm on November 13, 2017, 07:21:46 PM
if you install raspian (https://www.raspberrypi.org/documentation/installation/installing-images/) you need a screen (a TV via HDMI works) and a keyboard first. you have to enable the SSH access and for that you have to edit raspi-config (https://www.raspberrypi.org/documentation/configuration/raspi-config.md).



Title: Re: [Guide] Gunbot XT and GunBot Version 5 using a Raspberry P 3
Post by: Calm N Patience on November 15, 2017, 12:17:39 PM
Hi,

Finally I've done all the setup and installed gunbot on pi.  I followed all the instruction from you and typed on the console, after I hit the screen ./gunbot-arm it came out (screen is terminating), then i tried without the screen I typed ./gunbot-arm and it came out with (bash: ./ProfitTrailer.cmd: Permission denied)

I'm not sure what went wrong? Maybe I've another gunbot file on my laptop as I used the laptop ran the bot before I got this PI. What do you think might went wrong?
Title: Re: [Guide] Gunbot XT and GunBot Version 5 using a Raspberry P 3
Post by: vlmm on November 15, 2017, 07:28:26 PM
you did a:
Code: [Select]
chmod +x gunthy-arm
what you can try is:
Code: [Select]
chmod u+x gunthy-arm
Title: Re: [Guide] Gunbot XT and GunBot Version 5 using a Raspberry P 3
Post by: Calm N Patience on November 16, 2017, 06:08:42 AM
Hi, Thanks for these instructions, my bot is running now, and I use screen on terminal, it really helps from keeping the bot running while the terminal is off. But how can I turn the bot off? There isn't any instruction on how to turn off the screen and the bot.
Title: Re: [Guide] Gunbot XT and GunBot Version 5 using a Raspberry P 3
Post by: vlmm on November 17, 2017, 03:20:17 PM
the instructions for screen can be found here:
https://wiki.alpinelinux.org/wiki/Screen_terminal_multiplexer
the most import is:

Code: [Select]
screen -listshow all running sessions

Code: [Select]
screen -x NUMBERconnect to a session.

Code: [Select]
^A dDetach from a session

Code: [Select]
^A kkill a session



if you want to stop gunbot then connect to the gunbot screen session and
Code: [Select]
^C
Title: Re: [Guide] Gunbot XT and GunBot Version 5 using a Raspberry P 3
Post by: Calm N Patience on November 17, 2017, 09:18:56 PM
the instructions for screen can be found here:
https://wiki.alpinelinux.org/wiki/Screen_terminal_multiplexer
the most import is:

Code: [Select]
screen -listshow all running sessions

Code: [Select]
screen -x NUMBERconnect to a session.

Code: [Select]
^A dDetach from a session

Code: [Select]
^A kkill a session



if you want to stop gunbot then connect to the gunbot screen session and
Code: [Select]
^C

Thanks man. You're the master.
Title: Re: [Guide] Gunbot XT using a Raspberry Pi
Post by: vlmm on November 18, 2017, 04:03:47 PM
thank you, feel free to use my donation BTC address with some of your profits.
Title: Re: [Guide] Gunbot XT (v7) using a Raspberry Pi
Post by: MagicDude4Eva on December 31, 2017, 03:23:33 PM
I created an alias in .bashrc which will re-attach to the same screen if it exists:

Code: [Select]
alias gbs="cd /home/pi/gunbot/GunbotArm; screen -S "GunBot" -d -R /home/pi/gunbot/GunbotArm/gunthy-arm"
Title: Re: [Guide] Gunbot XT and GunBot Version 5 using a Raspberry P 3
Post by: Robsteady on January 01, 2018, 08:22:17 PM
at the moment i have 34 pairs.

if you want to use VNC you don't need any screen. thats what it is for. if you really need a GUI.

this is how it will look like when you use VNC:

(https://s1.postimg.org/1ofp0fkjn3/Screen_Shot_2017-11-06_at_14.50.51.png)

Another option is to just visit [RaspberryPi's IP address]:5000 from the browser on another computer on the network. I just find it a slightly more "elegant" way of interacting with the bot once it's running.
Title: Re: [Guide] Gunbot XT (v7) using a Raspberry Pi
Post by: kalintri on January 10, 2018, 03:12:45 PM
Hi All,

I am trying to install GB XT (7.0.2) on Raspberry Pi 3B.
I have copied the folder and changed the permissions, but when I try to start it I am getting a "Segmentation fault". I am attaching a screenshot. The Pi is running Raspbian Stretch with GUI, which has been updated and upgraded and other software is running on it just fine without such fault.
I have tried running it both with and without "sudo", but the result is the same.

Any ideas and help how I might resolve that will be much appreciated.
Title: Re: [Guide] Gunbot XT (v8.0.3) using a Raspberry Pi
Post by: vlmm on January 31, 2018, 06:53:31 PM
sorry for the delay. i never saw this message related to gunbot. i can't help you.
Title: Re: [Guide] Gunbot XT (v8.0.3) using a Raspberry Pi
Post by: vlmm on January 31, 2018, 06:53:58 PM
updated to version 8.0.3
Title: Re: [Guide] Gunbot XT (v8.0.3) using a Raspberry Pi
Post by: RudeAyelo on February 08, 2018, 08:27:28 AM
I'm having this issue with WebSockets when running the Dashboard of the GUI in my Rasp 3 (with Gunbot 8.0.3):

WebSocket connection to 'ws://127.0.0.1:5942/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED

it eventually turns into lots of:

WebSocket connection to 'ws://127.0.0.1:5942/' failed: Error in connection establishment: net::ERR_INSUFFICIENT_RESOURCES

Anyone experienced the same issue and know how to fix it?
Title: Re: [Guide] Gunbot XT (v8.0.3) using a Raspberry Pi
Post by: TWalsh on May 14, 2018, 10:27:22 AM
Is it possible to use the GMON gui when using a Raspberry Pi?
What folder would you point it at on the first command?
Would it have to run on the Pi itself or can I run it on my pc that I'm using to vnc into the Pi?