storjWidget for iOS / Android

I created a widget for iOS and Android (not yet tested) that shows aggregated information about multiple Storj nodes:

In case you also want to add that on your phone, you can find the storjWidget-Exporter here:
storjWidget-Exporter

And the Scriptable-widget here:
storjWidget

Installation:

  1. Run storjWidget-Exporter:
    docker run -d --restart always -p 3123:3123 -e NODES_LIST=192.168.188.59:14002,myNodesIp.com:14002 mb17/storjwidget

You need to set the environment variable NODES_LIST. Please add a comma-separated list of all your node id addresses and their Storj-api ports.

  1. Install Scriptable on your phone.
  2. Set the url in the storjWidget.js to the url of your storjWidget-Exporter (e.g. let url = 192.168.188.63:3123).
  3. Add the widget to your widgets-bar/homescreen.

The widget gets updated automatically by iOS. This happens every 4-7 minutes but may be different on your phone.

I am very happy to receive feedback or pull requests if you have ideas to improve it.

Scriptable is also available for Android. As I don’t have any Android device, it would be nice if someone could test if that is also working. Thanks

16 Likes

I know this might be annoying question but will you in future add compatibility with windows storage nodes?

Love the look of it

1 Like

Thanks :slight_smile:
On Windows nodes you can also access the node dashboard in your browser, right?
I think then the API should also be available at http://IP:PORT/api/sno and then the storjWidget-Exporter should also work. You only need python to execute the Flask server.

As I never had a windows node, I am not completely sure if that is correct. Maybe you can try to acces the api of your node or someone else can confirm that?

I will try later in the evening, will let you know my finding so other will be able to use it

thanks for the suggestion

1 Like

Is there a chance to have something like this for android?

There is the same Scriptable App also for Android. In theory that should also work:

But I did not test that as I don’t have an Android device. Would be nice to hear your feedback if you test it.

IT looks cool if anyone knows how to get it up and running on windows pls let me know.

Sei gegrüsst

Thanks! Looks like a very cool widget :smiley:

Unfortunately, the docker service don’t work as expected for me.
After running docker run… the service starts, only to restart automatically after 1 sec…

docker ps -a

=> shows ‘restarting’

docker logs --tail 1000 charming_liskov

=> shows a bunch of “standard_init_linux.go:211: exec user process caused “exec format error””

Any idea?

I’m working on a Rasp3. Storage Node is on the same Rasp, using docker.
ufw is disabled.
Storj Dashboard works.

The mb17/storjwidget image is built for linux/amd64. You’ll need to build a linux/arm image locally for your RPi3. Try the following:

git clone https://github.com/striker43/storjWidget-exporter.git
cd storjWidget-exporter
docker build -t storjwidget:arm .

Then run your command with your new image:

docker run -d ... storjwidget:arm

I haven’t tested the above so please report back whether or not it works.

1 Like

Thanks for your reply.

Checkout worked good, but building the docker image stumbled in step 2.

Step 2/9 : COPY requirements.txt / 
COPY failed: stats /var/lib/docker/tmp/docker-builderXXXX/requirements.txt: no such file or directory

If researched a little bit about the error, but haven’t found a clue yet.
Thanks again for your support :slight_smile:

I see that now. Looks like the Dockerfile refers to a non-existent requirements.txt. I’ve made a quick fork of the app to remove that line item in the Dockerfile. Delete your current clone of storjWidget-exporter and replace the git line with the following:

git clone https://github.com/fmoledina/storjWidget-exporter.git

Then try to build the local image again. Thanks.

1 Like

Sorry, I forgot to remove that…

Thanks for the fast fix @fmoledina :slight_smile:

@nebeleben: I also fixed it in my branch, the local build as described by @fmoledina should work on your raspberry pi now.

1 Like

this looks amazing !
I’ll set it up as soon as I get back from holidays.
I have an android device and my node is arm based so I’ll give you some feedback on how it works.

1 Like

Thank you :slight_smile:

I just found out that the daily earnings calculation seem to be showing a higher amount than my Grafana dashboard is showing. I will spend some time later this week to analyse that formula. I think I am doing something wrong there…

Thanks @fmoledina & @striker43 for your support on this.

The docker adjustment fixed it!
Now it works perfectly :smiley:

1 Like

Hi

Could share one for android.

Thanks

1 Like

You. Are. My. Hero. !
Really, you just gave me the joy of the day. SSHd into my NAS from my workspace, installed in just a breeze, installed Scriptable (didn’t know this App before, will have a closer look at it for sure!), copied the script, changed URL, forwarded ports on router, works. This was literally a 3-minute job to get running! Very well done!

2 Likes

Would be great. Would like to test it

Docker code made for x86-64 usually wont run on ARM based machines.

1 Like

UPDATE:

  1. Daily earnings calculation is fixed now. It was showing too high amounts before. Now it stores the total monthly earnings at the beginning of the day and then over day calculates the difference ([actual api-reported total] - [stored total earnings]). For this change you need to create and mount a docker volume now. Explanations are in the readme.md.

  2. There is a raspberry pi (arm) version now available on Dockerhub:

mb17/storjwidget:raspberry 
1 Like