storjWidget for iOS / Android

I cant wait to see the final product :slight_smile:

I currently have the following problem:
When i use this command, with my local internal ip:
docker run -d --restart always -p 3123:3123 -e NODES_LIST=192.168.87.176:14002 -v storjWidgetVolume:/home/pi/Desktop/storjWidget-exporter-main mb17/storjwidget:raspberry
I does not work, i simply get empty jason data. What am i missing?

I think you need to change your -v command to:
-v storjWidgetVolume:/var/www/storjWidgetVolume

The path after the ā€ž:ā€œ is the path where the exporter is looking for the local temp data file inside the docker container. This is hardcoded in the code, therefore you need to use this path.

1 Like

I did you run this command:
docker run -d --restart always -p 3123:3123 -e NODES_LIST=192.168.87.132:14002 -v storjWidgetVolume:/var/www/storjWidgetVolume mb17/storjwidget:raspberry

With 192.168.87.176 being the internal ip of my pi - where storj and the widget is running.
Yet i still have empty jason dataā€¦ Weird

Hmmm, did you try localhost:14002 instead of the IP address?

I did - yet still no dataā€¦ i has worked before and i find it very weirdā€¦

Hmm really strange. Can you remove the ā€ž-dā€œ from the command? Then you should see some logs of the exporter. Maybe it is showing an error that helps us with the further analysis.

1 Like

Thanks for your help - i seem to be getting this result

Hmm there is no errorā€¦ strange.
Can you try to find the location of the volume and check the temp file inside?
Maybe the file is somehow broken. In case you donā€™t find it, you could also just delete the volume and create a new volume. Then the exporter should create a fresh temp file that hopefully works again.

It seems that the www location does not exist? or maybe im doing it wrong?

I do have a folder on my desktop with some widget folders - but i might havde made that folder myself?

Oh sorry, I mean the var/www directory inside of your docker container.
So actually the config parameter ā€ž -v storjWidgetVolume:/var/www/storjWidgetVolume ā€œ means that you want to mount a local volume that is lying in your raspberry pi (storjWidgetVolume) to a certain path inside the docker container. You can think about a docker container as a seperate Linux VM with itā€™s own file and folder structure. So the /var/www path exists once on your pi directly but also a seperate one inside of the docker container. And the exporter code is looking for a temp file that gets stored inside of the docker container.

-v storjWidgetVolume:/var/www/storjWidgetVolume maps the volume that you created on your pi to that path inside of the container. That ensures that the temp files will be available for the exporter also after you restarted the docker container.

You can use the docker volume inspect command to find out where your docker volumes are stored on your local pi filesystem and you could have a look what is in there. Here is some more info:

1 Like

I have tried to completly delete the volume in docker and rebuild it again. Yet that did not workā€¦ i might suspect that it cannot pull the api from the storeagenode - but i do have the " -p 127.0.0.1:14002:14002 " inside my docker run command for the storagenodeā€¦
But i cant acces the dashboard on other devices on the same network - so something i wrong for sure. just cant find the problem.

I think you need to use the IP address of the machine where your storagenode is running instead of 127.0.0.1. like this for example:

192.168.188.59:14002:14002

Just check the local IP address of your raspberry pi in your router or use the ā€žifconfigā€œ command to find it.

If you use 127.0.0.1 I think the dashboard and API will only be available from inside the docker container.

1 Like

YES! that works - thanks alot.
I had to include the internal ip in the docker run command and also rebuild the widget volume - not it worksā€¦ Cheers

1 Like

created a fork with the following tweaks, which fits my needs a bit better:

  • percentage usage of the space
  • included trash storage usage in the calculation, so that the space used better fits the real space used on the HDD

fork of the widget: here
fork of the exporter: here

2 Likes

I know open-source is all about adapting/modifying and hence forkingā€¦
But if I may, wouldnā€™t it be better to improve things in one single repo instead of having too many options?

I meanā€¦

:slight_smile:

2 Likes

I updated the storjwidget-exporter code and docker image and would like to update the original post. Unfortunately I cannot edit my post anymore. Is this topic closed?

1 Like

It was just an old topic. Made it wiki, now you should be able to edit it.

2 Likes

Hi @striker43,

first, thank you for your ongoing dev on that! I really love the widget and permanently have it on my iOS screen(s).

I have updated my local docker image with your latest update, but was not able to run the container properly, with the setup instructions on GitHub:

I received the following message and was not able to call the bandwith json page:

pi@raspberrypi:~ $ docker run -d --restart always --privileged -p 3123:3123 -e NODES_LIST=sn1.xxx:12345,sn2.xxx:23456 -v storjWidgetVolume:/var/www/storjWidgetVolume mb17/storjwidget 
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
6a361c4d1480e8add90b5b0cd1f17a8400e1d6e8976692114e185129cb31f952

What worked in my case, is to git clone the repo locally and building the container myself:

docker volume create --name snwidget
git clone https://github.com/striker43/storjWidget-exporter
cd storjWidget-exporter/
sudo docker build -t storjwidget .

Not sure why, but just in case it helps other users.

Iā€™m seeing an issue:

{
"egress": "2.09 GB",
"estimatedPayoutToday": 1.04,
"estimatedPayoutTotal": 1.04,
"ingress": "4.11 GB",
"nodesOnline": 2,
"spaceAvailable": 5.0,
"spaceUsed": 0.2,
"totalNodesCount": 2
}

Ever since yesterday, the month has been brought into the today section. This widget has been running since January.