GithubHelp home page GithubHelp logo

briffy / piscesqoldashboard Goto Github PK

View Code? Open in Web Editor NEW
43.0 12.0 25.0 24.68 MB

This is a replacement dashboard for the Pisces Helium Miner

Shell 35.06% Erlang 0.54% PHP 25.28% CSS 18.47% JavaScript 20.15% Hack 0.50%

piscesqoldashboard's Introduction

Pisces QoL Dashboard

This is a replacement dashboard for the Pisces Helium Miner.

The dashboard that ships with the Pisces P100 has a number of security and performance issues. The main things this dashboard fixes are:

  • Lack of any authentication on the frontend.
  • Removal of ability to run root level code from the web server.
  • Changes to the way data is polled so that the dashboard doesn't hang for ~30 seconds while waiting for GPS/Bluetooth/Helium miner to report back statuses.
  • Enabling of WiFi support (not tested with mining).

Important Notes

This dashboard is in no way supported by, or affiliated with, the Pisces dev team.

By installing this dashboard, you are inheritently making the device more secure by removing the device's ability to install things like this dashboard from the web server.

A result of this is that in the event you need to troubleshoot your device, Pisces will have one fewer tool to assist you (although arguably this should never have been a tool for them to use in the first place). I have taken steps to avoid this so please read the important information below:

Installing this script creates a sudo user called "admin" with the password "admin". When you first log in to the dashboard, it is imperative that you visit Tools > Reset Password and update this password.

Installation Instructions

  1. Find the internal IP address of your Pisces miner.
  2. Use the following link, replacing YOURIP with the IP address of your miner:
  1. Log in at https://YOURIP
  • Username: admin
  • Password: admin
  1. Click "Tools"
  2. Click "Reset Password"
  3. Enter a secure password and click submit.
  4. Enjoy!

Updating

As of v0.1.1, the dashboard now has an updater. If you are running version v0.1.0 then you will have to manually update this one. Follow the instructions below:

  1. Log in via SSH (either PuTTY or click start > type "cmd" and press enter, then type "ssh admin@your-miner-ip").
  2. Run the following commands:

Removal Instructions

  1. Connect via SSH to your miner (either using PuTTY or open cmd and type: ssh admin@YOURIP)
  2. Enter the admin username and the password you set.
  3. Type the following command: sudo bash /var/dashboard/uninstall.sh

Caveats

  • It's not using jQuery or anything fancy to pull statuses on stuff. If you click a button to enable/disable a service, manually refresh a few times until it updates.
  • You will likely get a "This site is not secure" banner when you first connect. This is because I've enabled HTTPS by default with a self-signed certificate. The reason it is "not secure" is because web browsers prefer certificates to be signed by an authority, not just yourself. I promise though, HTTPS with a self-signed certificate is way more secure than standard HTTP (don't take my word for it, Google "https vs http") because at least your data is being encrypted this way. If you care enough, go buy a certificate for a couple of bucks and add it into /etc/ssl/ (you've got root access now).

Change Log

  • v0.2.9

    • Hotfix to resolve issue with miner updater.
  • v0.2.8

    • Fixed a couple of bugs in auto-update.
  • v0.2.7

    • No changes, just an update to fix permissions on some stuff related to the VPN.
  • v0.2.6

    • Very very minor bug fix to the VPN display status.
  • v0.2.5

    • Added VPN support for all you off-grid setups and people on CGNAT.
  • v0.2.4

    • Fixed bug introduced in previous release that would lock the miner update to the latest non GA version.
  • v0.2.3

    • Actually put ALL the fixes in from the previous update this time...
  • v0.2.2

    • Potential fix for miner height not displaying correctly and causing it to show as perpetually syncing (thanks to fraggy2k).
    • Modified witness log output to better capture the full witness event.
    • Added uptime to the home screen.
  • v0.2.1

    • Removed seed connector from the auto-maintain script. Seems more and more like a Helium issue every day and no amount of smashing is going to fix it (helium/miner#1205)
    • Fixed faulty logic with sync checker.
    • Split auto-maintain and auto-update into separate functions.
    • Removed an option in the miner update that may cause problems for the US based miners that are starting to appear.
  • v0.2.0

    • Added a seed node smasher into the automaintain. This digs and connects to the Helium seed nodes every hour, hopefully help with low activity on the blockchain. Or it'll DDoS the seed nodes. Let's find out.
    • Changed the sync status script to be less sensitive (THANKS SHRYKEZ).
    • Modified the blockchain clear to check for any status other than "Up" instead of specifically looking for the "exited" status.
    • Changed log files to be in reverse order.
  • v0.1.9

    • Added a "Logs" section.
    • Modified the miner update docker run command to add region override and change the port bindings to try and alleviate low beacon/challenge issues, running a miner update is recommended.
    • Merged Shrykez sync checker.
  • v0.1.8

    • Fixed the FastSync button.
    • Added an "AutoMaintain" option. Enable the spanner in the services menu and now miner/dashboard updates will be taken care of. It will also automatically try and keep track of your block height and perform a fast sync if you drift too much, as well as doing basic troubleshooting steps when it detects problems with your miner docker.
  • v0.1.7

    • Fixed the dashboard updater so it doesn't nuke the logs during update and avoids any caching issues.
  • v0.1.6

    • Fixed possible bug with "_GA" being appended to the version string.
  • v0.1.5

    • Minor quality of life fixes.
    • Updated to use wget instead of curl to avoid DDoS issues with Helium API.
    • Changed miner updater to pull the latest sys config from this github (updated from Helium miner gitgub and modified for use with the Pisces:https://github.com/helium/miner/blob/master/config/sys.config)
  • v0.1.4

    • If the miner docker has already locked up due to blockchain corruption then docker stop isn't aggressive enough to stop it. This has been changed to docker kill and I have also changed the method for removing the files as when it grows past a certain point, rm cannot deal with it in one hit.
  • v0.1.3

  • v0.1.2

    • Fixed bug with docker updater. If no config has been downloaded by Pisces (either updates disabled or haven't run) then it would stop the docker from being enabled. Now it will use the current config if no new config from Pisces is found.
  • v0.1.1

    • Added functionality: clear blockchain data, update miner docker and update dashboard.
    • A few quality of life enhancements, tweaking of minor bugs and updating styles.
    • Merged fix for remote IP lookup.

Buy me a beer

If you like my work, sling me some crypto:

  • ETH: 0x5130357514BA058a78855E9A6B071E0E91e39aCd
  • HNT: 13eyzqK1Dqqnj2dBHxBoWhbnGcdA7ZWh9kpejg4MTE6QzdRMU9p

piscesqoldashboard's People

Contributors

briffy avatar greenward avatar iotzo avatar shrykez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

piscesqoldashboard's Issues

APi helium - You are being limited

curl request with original user agent return "429 You are being limited. The ip or client you are using has been identified as a potential source of traffic issues against the helium api. If you need assistance please email [email protected] and we will get back to you promptly."

please force a specific user-agent to avoid this limitation.

Need to upgrade apt cache before installing php-7.3-fpm

As seen in discord, for the install script :

root@raspberrypi:~# apt-get install php7.3-fpm Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: php-pear The following NEW packages will be installed: php7.3-fpm 0 upgraded, 1 newly installed, 0 to remove and 20 not upgraded. Need to get 1,286 kB of archives. After this operation, 4,628 kB of additional disk space will be used. Err:1 http://deb.debian.org/debian-security buster/updates/main arm64 php7.3-fpm arm64 7.3.29-1~deb10u1 404 Not Found [IP: 199.232.174.132 80] E: Failed to fetch http://deb.debian.org/debian-security/pool/updates/main/p/php7.3/php7.3-fpm_7.3.29-1~deb10u1_arm64.deb 404 Not Found [IP: 199.232.174.132 80] E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? root@raspberrypi:~#

Solved with :

~# apt-get update

Then :

root@raspberrypi:~# apt-get -y install nginx php-fpm php7.3-fpm

update doesn't work

hi when i click the update i see that immediately this screen:
image

before I click the start:
image

curl: (60) SSL certificate problem: self signed certificate

root@raspberrypi:~# docker exec miner miner info height && curl https://api.helium.io/v1/blocks/height &&echo
34768 1302549
curl: (60) SSL certificate problem: self signed certificate
More details here: https://curl.haxx.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

and dashboard error:

Remote IP:302 Found
nginx/1.14.2

Admin account locked after reseting password

I made all installation and reseted the password.

I am not able now to access to the panel. It says incorrect password but I am pretty sure I did it correctly. I used some special characters and this could affect.

Is there any way to reset the password?

I have seen an identical issue (#17) and the author posted a solution that seems to not be working anymore.

I get a 404.

Any idea?

Problem with miner update

Hello,

few days ago I tried update of miner, cause new version was available was in dashboard.
old docker container was removed, but after that it stuck and don't replaced it with the new one.
No UP/DW bandwidth on network.
Could you please help me how to update miner? Maybe manually from ssh?
Dashboard now shows nothing in "miner version" and docker container is gone.

Thanks a lot for help !

404

I have the Piscea miner 40 feet up. Can't get into the blasted dashboard.

I have its IP address and I have tried the usual way - BELOW - with IP inserted

http://………/action.php?action=shell&cmd=wget
https://github.com/briffy/PiscesQoLDashboard#readme

I am not great at IP stuff to be honest but OK at most stuff.

Please help.... :-) Anybody

page not found installation PesciQoLDashboard

Hello good evening, I tried with the installation of the page not found installation PesciQoLDashboard through the link indicated:
http: // my ip miner / action.php? action = shell & cmd = sudo wget https://raw.githubusercontent.com/briffy/PiscesQoLDashboard/main/install.sh -O - | sudo bash
but ece out the writing on the Connection Failed page.
The ip address is taste taken from my modem plus I have another problem I can no longer enter the miner configuration via pices-web-controller
.I am using firefox do I have to use another browser?
thanks if you can give me some advice
Emanuele.

High disk I/O resources due to Systemd scripts logging too much

Hello.

Too many systemd timers (installed by the dashboard) are logging to /var/log/syslog
This should not be a problem in a regular HDD or SSD, but it is a very intensive writing rate for a SD Card and it is increasing the IO workload.
Some of the check scripts are also logging sudo commands to /var/log/auth.log

-rw-r----- 1 root adm 13M Feb 7 11:12 syslog
-rw-r----- 1 root adm 28M Feb 7 00:00 syslog.1
-rw-r----- 1 root adm 1.7M Feb 6 00:00 syslog.2.gz
-rw-r----- 1 root adm 1.9M Feb 5 00:00 syslog.3.gz
-rw-r----- 1 root adm 1.8M Feb 4 00:00 syslog.4.gz
-rw-r----- 1 root adm 1.8M Feb 3 00:00 syslog.5.gz
-rw-r----- 1 root adm 2.0M Feb 2 00:00 syslog.6.gz

Feb 7 01:23:24 raspberrypi systemd[1]: vpn-check.service: Succeeded.
Feb 7 01:23:24 raspberrypi systemd[1]: pf-check.service: Succeeded.
Feb 7 01:23:25 raspberrypi systemd[1]: cpu-check.service: Succeeded.
Feb 7 01:23:25 raspberrypi systemd[1]: Started Miner status checker.
Feb 7 01:23:25 raspberrypi systemd[1]: miner-check.service: Succeeded.
Feb 7 01:23:26 raspberrypi systemd[1]: bt-check.service: Succeeded.
Feb 7 01:23:26 raspberrypi systemd[1]: Started BlueTooth Advertise service start/stop flag checker.
Feb 7 01:23:26 raspberrypi systemd[1]: bt-service-check.service: Succeeded.
Feb 7 01:23:26 raspberrypi systemd[1]: Started Reboot flag checker.
Feb 7 01:23:26 raspberrypi systemd[1]: reboot-check.service: Succeeded.
Feb 7 01:23:26 raspberrypi systemd[1]: Started Miner service start/stop flag checker.
Feb 7 01:23:26 raspberrypi systemd[1]: miner-service-check.service: Succeeded.
Feb 7 01:23:26 raspberrypi systemd[1]: Started WiFi service start/stop flag checker.
Feb 7 01:23:26 raspberrypi systemd[1]: wifi-service-check.service: Succeeded.
Feb 7 01:23:28 raspberrypi systemd[1]: Started BlueTooth Advertise service start/stop flag checker.
Feb 7 01:23:28 raspberrypi systemd[1]: bt-service-check.service: Succeeded.
Feb 7 01:23:29 raspberrypi systemd[1]: Started Bluetooth status checker.
Feb 7 01:23:30 raspberrypi systemd[1]: Started BlueTooth Advertise service start/stop flag checker.
Feb 7 01:23:30 raspberrypi systemd[1]: bt-service-check.service: Succeeded.
Feb 7 01:23:30 raspberrypi systemd[1]: bt-check.service: Succeeded.
Feb 7 01:23:31 raspberrypi systemd[1]: Started Reboot flag checker.
Feb 7 01:23:31 raspberrypi systemd[1]: reboot-check.service: Succeeded.
Feb 7 01:23:31 raspberrypi systemd[1]: Started Miner service start/stop flag checker.
Feb 7 01:23:31 raspberrypi systemd[1]: miner-service-check.service: Succeeded.
Feb 7 01:23:31 raspberrypi systemd[1]: Started WiFi service start/stop flag checker.
Feb 7 01:23:31 raspberrypi systemd[1]: wifi-service-check.service: Succeeded.
Feb 7 01:23:32 raspberrypi systemd[1]: Started BlueTooth Advertise service start/stop flag checker.
Feb 7 01:23:32 raspberrypi systemd[1]: bt-service-check.service: Succeeded.
Feb 7 01:23:34 raspberrypi systemd[1]: Started BlueTooth Advertise service start/stop flag checker.
Feb 7 01:23:34 raspberrypi systemd[1]: bt-service-check.service: Succeeded.
Feb 7 01:23:34 raspberrypi systemd[1]: Started Bluetooth status checker.
Feb 7 01:23:36 raspberrypi systemd[1]: bt-check.service: Succeeded.
Feb 7 01:23:36 raspberrypi systemd[1]: Started BlueTooth Advertise service start/stop flag checker.
Feb 7 01:23:36 raspberrypi systemd[1]: bt-service-check.service: Succeeded.
Feb 7 01:23:36 raspberrypi systemd[1]: Started Reboot flag checker.
Feb 7 01:23:36 raspberrypi systemd[1]: reboot-check.service: Succeeded.
Feb 7 01:23:36 raspberrypi systemd[1]: Started Miner service start/stop flag checker.
Feb 7 01:23:36 raspberrypi systemd[1]: miner-service-check.service: Succeeded.
Feb 7 01:23:36 raspberrypi systemd[1]: Started WiFi service start/stop flag checker.
Feb 7 01:23:37 raspberrypi systemd[1]: wifi-service-check.service: Succeeded.
Feb 7 01:23:38 raspberrypi systemd[1]: Started BlueTooth Advertise service start/stop flag checker.
Feb 7 01:23:38 raspberrypi systemd[1]: bt-service-check.service: Succeeded.
Feb 7 01:23:39 raspberrypi systemd[1]: Started New WiFi Config checker.
Feb 7 01:23:39 raspberrypi systemd[1]: wifi-config-check.service: Succeeded.
Feb 7 01:23:39 raspberrypi systemd[1]: Started Check the status of fastsync.
Feb 7 01:23:39 raspberrypi systemd[1]: fastsync-check.service: Succeeded.
Feb 7 01:23:39 raspberrypi systemd[1]: Started Dashboard updater checker.
Feb 7 01:23:39 raspberrypi systemd[1]: update-dashboard-check.service: Succeeded.

Log time

Because all logs are UTC time, can something be done to fix logs time to actual time?

Password reset fails

When you first log in to the dashboard, it is imperative that you visit Tools > Reset Password and update this password.

I cannot login after changing the password.

Is there any solution for it?

Question on exporrting log

Hello,
I need to format and analise logs with something like elastic, logstrash and so.
apart from this, I need to fetch miner's log from the pisces 100 with qol and put them on another host.
How do I do this?
Hw do I access logs from another machine (for example trough scp or similar)? Im not that skilled with docker.
Basically: what command do I have to issue from another host to fetch logs?

wrong infoheight

Some people complain about a wrong block height and that the miner is syncing

I think the output filter in monitor-scripts/info-height.sh is not exact enough (in some situations)

infoheight

Question

Hello good.
I have several Pisces and I am using the panel, which is very good, but in one of them I have been having problems for a week, it marks me offline, I have discovered that the disk is at 100% and that is why it cannot continue mining, I have restarted and nothing solution is there?

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 61101516 60917344 0 100% /
devtmpfs 1777324 0 1777324 0% /dev
tmpfs 1943052 0 1943052 0% /dev/shm
tmpfs 1943052 8768 1934284 1% /run
tmpfs 5120 4 5116 1% /run/lock
tmpfs 1943052 0 1943052 0% /sys/fs/cgroup
/dev/mmcblk0p1 258095 30302 227793 12% /boot
overlay 61101516 60917344 0 100% /var/lib/docker/overlay2/f87c1d2e2eed71c691bcda36d848e50ac68264056a52eb73e9d060a686abc546/merged
overlay 61101516 60917344 0 100% /var/lib/docker/overlay2/cec4cae0bc5e03e45d64d1a008bc07f08a31c9134c8ff0d71ec650b196ae22a8/merged
shm 65536 0 65536 0% /var/lib/docker/containers/099a33cf462df64a3c1d39ef981f8ca956f18a09eb165ddaee0d38f44a7ca8d4/mounts/shm
shm 65536 0 65536 0% /var/lib/docker/containers/8fa688733bcc36ca379d9fc5dc1ba0db71b38e78f666ca311ceed771444f709e/mounts/shm
tmpfs 388608 0 388608 0% /run/user/1001

thanks

Force Ethernet link to 10/100baseT on the RPi 4

Problem: The P100 cannot establish a link with many switches/routers that support 1000BaseT. The reason seems to be linked to the PoE subsystem on the P100 which cannot handle 1000BaseT. When the switch and the RPi auto negotiate 1000BaseT, the link fails. Therefore, a workaround is to use a switch limited to 100BaseT or manually reducing the port speed at the switch. However not all switches/routers support this feature, which leaves the user no other option than to buy new equipment.

Solution: Limiting the advertised link modes on the RPi should fix this.

This is done with:

sudo ethtool -s eth0 advertise 0x0f 

As per these values:

    advertise N
        Sets the speed and duplex advertised by autonegotiation.  The 
        argument is a hexadecimal value using one or a combination of
        the following values:
          0x001       10baseT Half
          0x002       10baseT Full
          0x004       100baseT Half
          0x008       100baseT Full
          0x010       1000baseT Half       (not supported by IEEE standards)
          0x020       1000baseT Full

To make the changes persistent, edit /etc/rc.local and add :

 # Fix Pisces 1Gb Ethernet problem
 /sbin/ethtool -s eth0 advertise 0x0f &

After the line

  # By default this script does nothing.

There is probably a better place to implement this change, but I couldn't make it work in /etc/network/if-pre-up.d/ethtool .

Ideally this change should be in incorporated to new P100 miners before shipping. Also, to the Version-0-18-EU-2021-11-06.img available for download. Once tested, perhaps you can pass this information on to the Pisces team.

In the meantime, adding this to the QoL dashboard would be very helpful. Those affected by this problem could connect their device through WiFi (the ethernet cable only provides power at this point), install the QoL Dashboard, reboot and have a working Ethernet link.

Links:

Locked/forgotten Admin password

Hello i have locked my Admin password by gettig invalid password when trying to log in to sudo
what actions can i take to gain access to my miner again?

[Feature Request] Check Port Status

I wonder if we/you can implement a simple portscan to the Home or Info page and check If 44158 is open?
With colored text if the setup is ok or relayed and hoover text with short information that forwarding the port is recommended.

A short idea is this Code:
if [ `curl -v --silent REMOTEIP:44158 2>&1 | grep -o multistream` == "multistream" ]; then echo "open"; else echo "closed"; fi

Bluetooth doesn't work

Bluetooth does not connect and is not visible. Is there an alternative solution to connect it to the app.

In the web interface it is shown as activated.
but will turn off automatically at some point

Bluetooth on setup

Hi, just bought a Pisces 100 Miner. I followed all the setups and plugged into my router. I get no bluetooth thru Helium app to get this going. Cable is fine. It appears when hooked up, I get no connectivity on the router either. No lights saying it has power. Is there some specials sequence to fire this up or just a defecifive unit? thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.