Legedric / ptmagic

Magic addon for Profit Trailer cryptocurrency trading bot.
Other
210 stars 32 forks source link

Can PTMagic successfully run on a Raspberry Pi3? #81

Closed jodee8 closed 6 years ago

jodee8 commented 6 years ago

Hi Legedric, firstly thank you to yourself and your programming partner who have so selflessly provided this amazing piece of software to the community. Just a quick question in regards to the possible installation of PTMagic on a Raspberry Pi3.

I have ProfitTrailer running successfully on a Raspberry Pi3 with very few problems. The pi runs with plenty of headroom, more than enough I am sure to run PTMagic simultaneously with plenty of headroom to spare. I am just wondering if anyone has successfully installed it on a pi3?

I'm running Raspbian (the default Raspberry Pi OS) which is a Debian based OS. The Pi3's run an Arm 32bit architecture (which excludes them from running the 64bit .NET SDK) and I'm unsure if PTMagic requires the full .NET SDK or if it will run with just the .NET Core installation? Version 2.0 of .NET Core is 32bit compatible and can easily be installed on a Raspberry Pi3.

I'm hoping that you or someone else in the community might already have some experience with this and might be able to shed some light on it. Once again, thank you for all you are doing.

TwixRaider commented 6 years ago

PT Magic does not need the full .Net SDK but just the .NET Core 2.0, so in theory it should be able to run. But we do not have Paspberry Pi knowledge and hope that someone else will give it a try. There seems to be a high demand for this. As soon as someone manged to run it we will be glad to post it in our Wiki and celebrate this guy :)

funsports commented 6 years ago

I have PTMagic on Asus Tinkerboard running with two Profit Trailer Bots. The Tinkerboard comes with same design like the Pi3, bot stronger CPU and More RAM.

PTMagic is running, but not the Monitor. You need Dotnet SDK, but there is nothing for ARM Architecture. If you start the Monitor, you get this error https://github.com/Legedric/ptmagic/issues/65 It was great to here that there are a solution in the future to keep the Monitor Running. But now we have to wait for an sdk, or the developer of ptm change something with the Monitor :-)

Ridonia commented 6 years ago

Same here. Got it running on a Pi3 but without Monitor. Obviosely for the very same reasons like "funsport" pointed out

cryptonz commented 6 years ago

PTMagic on Pi3 would be awesome!!!

Legedric commented 6 years ago

@Zamboniman solved his problem from issue #65 and posted a detailed instruction here: https://github.com/Legedric/ptmagic/issues/65#issuecomment-367137560

Maybe that helps soplving the problem with PI as well?

Ridonia commented 6 years ago

@Legedric Unfortunately not. Zambonian got it running because he uses a PC or VPS with a x86 structure. Pi3 uses an ARM processor only capable of handling 32Bits. And like @funsports pointed out, you need the Dotnet SDK for the monitor to work, wich is not available for this platform.

So it looks like in Order to get the Monitor running on a Raspberry, @Legedric would have to deplay a ARM-Version or something like that https://blogs.msdn.microsoft.com/david/2017/07/20/setting_up_raspian_and_dotnet_core_2_0_on_a_raspberry_pi/

SW-Nicki commented 6 years ago

Also ich und sicherlich sehr viele wären wahnsinnig dankbar für eine Installations-Möglichkeit auf dem Raspberry! Ich würde denjenigen, der das ermöglicht auch feiern!

SW-Nicki commented 6 years ago

:Zu Legedric: Ganz, ganz großes Kompliment an das Programm (kann es aber momentan wg. dem 'Raspberry-Problem' leider nur durchlesen - macht aber einen super Eindruck!). Die Community ist total begeistert, dass jemand uns das so kostenlos zur Verfügung stellt - das kann man gar nicht genug loben! Wir (die scheinbar doch nicht ganz so kleine 'Raspberry-Gemeinschaft) hoffen halt da auch noch auf eine Lösung.......

cryptonz commented 6 years ago

I hope they come up with a solution for Raspberry Pi configurations. Would be AWESOME.....

funsports commented 6 years ago

@SW-Nicki The Installation is not the Point, the PTMagic is running, but not the Monitor for. The ARM Technolegy is the Point and that you need somethink from the SDK. I Think a lot of People use Low Voltage mini PCs like the Pi or the Tinkerboard with ARM. I hope the Same, that Legendric try to found a way, that the Monitor is Running on an Pi.


@SW-Nicki Die Installation ist nicht das Problem, PTMagic selbst läuft ja, nur der Monitor nicht. Es wird das SDK benötigt, bzw eine bestimmte Aplikation, die nicht für ARM verfügbar ist. Ich bin mir sicher, dass es genug Leute gibt, die mini PCs mit geringem Stromverbrauch benutzen. Die Anschaffung ist günstig, der Stromverbrauch ist gering und die Community ist groß. Ich hoffe das @Legedric hier vielleicht an einer Lösung arbeitet, bzw in betracht zieht, dass wäre sicher klasse.

JHenneberg commented 6 years ago

from what I understand from my research it is right now not possible because of the lake of support for ASP.Net for the ARM architecture. This is not smth anyone of us can solve here. But there is the possibility that PTMagic is compiled in a certain way that this ASP.Net is not needed, only the .NET Core 2.0 (not the SDK).

https://github.com/dotnet/designs/issues/10 https://dzone.com/articles/running-aspnet-core-2-apps-on-windows-10-iot-core

cryptonz commented 6 years ago

@funsports

Can you explain: "The Installation is not the Point, the PTMagic is running, but not the Monitor for." Does that mean that it will "feed" into PT but the web GUI of PTM does not work? Thanks PS: You can also reply in german...

jodee8 commented 6 years ago

Hello everyone, I can confirm that PTMagic.dll is up and running successfully on Raspberry Pi3 with default Debian Raspbian OS (32bit .NET Core 2.0 install required). However I can also confirm that Monitor.dll cannot currently run successfully due to its dependancy on the 64bit .NET SDK. PTMagic.dll is feeding settings successfully into Profit Trailer's trading folder and is updating with changing market trends successfully.

Thank you to Legedric, Twixraider and the team for providing this extremely useful software.

I think to further support the growing Arm32 (RaspberryPi, Arduino, TinkerBoard etc) community and to get Monitor.dll running successfully, would require the dev team to look at removing any 64bit SDK dependencies from the source code and rather, opting for default 32bit .NET Core dependencies only. I believe this would be quite the challenge and would require some serious coding skills to find a way around using the much more flexible SDK, to have the same functionality, yet only use the resources of .NET Core. This may be a challenge well beyond the scope of this project?

Once again, thank you to Legedric, Twixraider and the team for your amazing efforts thus far.

funsports commented 6 years ago

@Cryptonz Ja so ist es. die gepostete Anleitung von @Ridonia, etwas weiter oben sollte klappen.

Pugamall commented 6 years ago

My CMD window shows this during install "Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package dotnet-sdk-2.1.4 E: Couldn't find any package by glob 'dotnet-sdk-2.1.4' E: Couldn't find any package by regex 'dotnet-sdk-2.1.4'

(but it had just downloaded it all prev to that)

I have tried a number of times, with different versions, and even the script that basically installs and does it all for you supplied by a fellow user on a discord channel

but go through the motions anyway, I run "Start PTMagic.cmd" but it comes up un a txt editor window type thing and says " dotnet PTMagic.dll pause"

and thats it, if anyone has any ideas or experienced this and got round it, please reply and help a frustrated about to through his Pi out the window guy pleas :D

jodee8 commented 6 years ago

@Pugamall you’ll need to ensure that you have the correct .NET Core 2.0 version for it to be able to run on a Pi3. Check out this guide and just skip to step 3... https://blogs.msdn.microsoft.com/david/2017/07/20/setting_up_raspian_and_dotnet_core_2_0_on_a_raspberry_pi/

Another thing... Try running PTMagic.dll directly in your terminal window. navigate to your PTMagic folder for me it is as follows... cd ProfitTrailer/PTMagic Then use dotnet PTMagic.dll That should launch PTMagic. (Just a reminder that currently Monitor.dll cannot be run on an Arm32 based Pi)

cryptonz commented 6 years ago

Hi Legedric, is a Raspbery Pi3 fix still on the roadmap for new releases? (all features) Thank you.

Legedric commented 6 years ago

At the moment we have no plans to concentrate on bringing this to PI. We don't own one and we have other tasks to focus on at the moment.
So I am not saying it is never coming but it is not on our list right now.

synapse1 commented 6 years ago

I came up with a way to run PT on the Pi and then PTmagic in a virtual pc on my unraid media server. It wont suit everyone but its on option for someone who also has windows running on the same network.

I created an smb share on the pi and run PT from there. on Windows I then mapped the network drive. Then from PTMagic I can point to the ProfitTrailer path as the mapped network drive (eg Z:\ETHprofitTrailer\ or Z:\BTCprofitTrailer\)

one day it would be nice to run both on the Pi so I know it wont be fighting for resources on the unraid media server.

Legedric commented 6 years ago

For all the PI users, please try this package and see if the monitor works on a PI environment: http://www.profit-trailer-magic.com/files/PTMagic_1.3.1_PI.zip

We are still not actively supporting PI right now, so please do understand this is only a "try" to see if this may already be a solution for you.

ghost commented 6 years ago

Well... I think you did a great job! Monitor works on RPI! Please keep this PI branch alive! ;-)

Legedric commented 6 years ago

Will do, thanks for testing!

ghost commented 6 years ago

Running 2 instances on RPI, using approx. 350MB ram (but is slowely increasing, need to watch this), CPU usage is 6% max (when it uses CPU)

edit: Oh, the RAM-usage suddenly drops!

cryptonz commented 6 years ago

@TomBos do you have a step by step guide for the RPI setup? or is it the same as the Linux one? Thank you.

cryptonz commented 6 years ago

solved with latest version - thank you

funsports commented 6 years ago

@Legedric Good Job!! Working on Asus Tinkerboard too!

hugocnobre commented 6 years ago

i installed .net core but i can't run pt magic anyways... i have followed this process: https://blogs.msdn.microsoft.com/david/2017/07/20/setting_up_raspian_and_dotnet_core_2_0_on_a_raspberry_pi/

pi@raspberrypi:~/PTMagic 1.4.0/PTMagic $ dotnet PTMagic.dll It was not possible to find any compatible framework version The specified framework 'Microsoft.NETCore.App', version '2.0.0' was not found.

i get this with pm2 log 1|PTMagic | 2018-03-26 02:47 +01:00: It was not possible to find any compatible framework version 1|PTMagic | The specified framework 'Microsoft.NETCore.App', version '2.0.0' was not found. 1|PTMagic | - Check application dependencies and target a framework version installed at: 1|PTMagic | / 1|PTMagic | - Alternatively, install the framework version '2.0.0'. 1|PTMagic | 2018-03-26 12:00 +01:00: It was not possible to find any compatible framework version 1|PTMagic | The specified framework 'Microsoft.NETCore.App', version '2.0.0' was not found. 1|PTMagic | - Check application dependencies and target a framework version installed at: 1|PTMagic | / 1|PTMagic | - Alternatively, install the framework version '2.0.0'. 1|PTMagic | 2018-03-26 14:09 +01:00: It was not possible to find any compatible framework version 1|PTMagic | The specified framework 'Microsoft.NETCore.App', version '2.0.0' was not found. 1|PTMagic | - Check application dependencies and target a framework version installed at: 1|PTMagic | / 1|PTMagic | - Alternatively, install the framework version '2.0.0'. can anyone help me ? @everyone

nickb512 commented 6 years ago

I'm having the same problem. Keep hitting road blocks with getting this running. Have spent most of the day looking at it now plus a good few hours last week.

Exactly the same boat as @Heler554

jodee8 commented 6 years ago

@Heler555 and @nickb512 which version of .NET Core are you running?

nickb512 commented 6 years ago

Microsoft .NET Core Shared Framework Host

Version : 2.0.7-servicing-26322-01

(That’s what I get from dotnet —info)

jodee8 commented 6 years ago

This is the version I'm running on my Pi which runs PTMagic just fine... Microsoft .NET Core Shared Framework Host Version : 2.0.4

Perhaps try removing .NET and then reinstall it by following Step 3 from these instructions... https://blogs.msdn.microsoft.com/david/2017/07/20/setting_up_raspian_and_dotnet_core_2_0_on_a_raspberry_pi/

nickb512 commented 6 years ago

Those are the instructions I followed, and it installed the above version. I have tried to find a source for older versions but the links on github only seem to be for the latest release. Do you have the package for v2.0.4 you could upload?

hugocnobre commented 6 years ago

@jodee8 dotnet --info Microsoft .NET Core Shared Framework Host

Version : 2.0.7-servicing-26322-01 Build : c83e7f269ec6513de5d266e707aad5a444bb6b4d

hugocnobre commented 6 years ago

@jodee8

Only found this: https://github.com/dotnet/core/blob/master/release-notes/download-archives/2.0.4-download.md

but it's not an arm32 version.

nickb512 commented 6 years ago

Ok we are in business. 2.0.4 works, not 2.0.7.

@Heler554 do the following...

Remove the new version by doing: cd /opt sudo rm -rf dotnet

Then repeat the instructions on this page (step 3): https://blogs.msdn.microsoft.com/david/2017/07/20/setting_up_raspian_and_dotnet_core_2_0_on_a_raspberry_pi/

BUT use this as the download URL: https://dotnetcli.blob.core.windows.net/dotnet/Runtime/2.0.4/dotnet-runtime-2.0.4-linux-arm.tar.gz

So the second command becomes: curl -sSL -o dotnet.tar.gz https://dotnetcli.blob.core.windows.net/dotnet/Runtime/2.0.4/dotnet-runtime-2.0.4-linux-arm.tar.gz

jodee8 commented 6 years ago

@nickb512 well done mate!

hugocnobre commented 6 years ago

yap it works. https://github.com/Heler554/ProfitTrailer/wiki/PTMagic-on-Raspberry-Pi

  1. sudo apt-get install curl libunwind8 gettext
  2. curl -sSL -o dotnet.tar.gz https://dotnetcli.blob.core.windows.net/dotnet/Runtime/2.0.4/dotnet-runtime-2.0.4-linux-arm.tar.gz
  3. sudo mkdir -p /opt/dotnet && sudo tar zxf dotnet-runtime-2.0.4-linux-arm.tar.gz -C /opt/dotnet
  4. sudo ln -s /opt/dotnet/dotnet /usr/local/bin
  5. dotnet --help
ghost commented 6 years ago

@cryptonz Sorry, I've never read your message! (untill now)

BTW, I used the steps described in the ProfiTrailer Wiki. But at the moment I'm not using the RPI. The performance was not good enough for me.

kkoenen commented 6 years ago

sudo mkdir -p /opt/dotnet && sudo tar zxf dotnet-runtime-2.0.4-linux-arm.tar.gz -C /opt/dotnet

Is that bold part a typo? Shouldn't that read dotnet.tar.gz?

Jthwaits commented 5 years ago

Hi guys, has anyone had any luck with the 2x version of PTM, or are we restricted to using PT1x in conjunction with PTM1.5?

kkoenen commented 5 years ago

Hi guys, has anyone had any luck with the 2x version of PTM...

Yes, I'm running newest version of PT and PTM on a Pi. No problems. You need to follow the guides closely, though. There are some tricky parts wrt Coinmarketcap API and configuring the details.

Jthwaits commented 5 years ago

Yes, I'm running newest version of PT and PTM on a Pi. No problems. You need to follow the guides closely, though. There are some tricky parts wrt Coinmarketcap API and configuring the details.

May I ask what your path format is to your PTM? I've tried in Nix forward slashes, as well as double backslashes as support suggests but still get the error.

Also, are you using dotnet runtime 2.0.4 as the tutorial suggests, or the SDK as well?

I've just linked what I get: https://pastebin.com/RdJDWGui I just thought I'd ask here whether it was limited to PTM1.5 as the tutorial asks, as I'm trying with the latest version to no avail.