Skip to content
This repository has been archived by the owner on May 18, 2023. It is now read-only.

JSON monitoring of miner for Node-RED #32

Open
sothcott opened this issue Aug 20, 2018 · 0 comments
Open

JSON monitoring of miner for Node-RED #32

sothcott opened this issue Aug 20, 2018 · 0 comments

Comments

@sothcott
Copy link

sothcott commented Aug 20, 2018

If you do http://127.0.0.1:3333/ you can get the console output of the miner as a web page that you have to keep refreshing.

Hidden in the page source is a little JSON string containing the following data, on my miner;
result: array[9]
0: "11.3 - XMR"
1: "1473"
2: "3198;6233;0"
3: "793;818;819;768"
4: "0;0;0"
5: "off;off;off;off"
6: "83;60;84;61;75;43;77;44"
7: "xmr-proxy.xxxxx.org:3333"
8: "0;0;0;0"
It's actually the 2nd line of the page source where it says {"result";

{"result": ["11.3 - XMR", "1267", "3036;5334;0", "793;655;820;768", "0;0;0", "off;off;off;off", "83;60;84;61;75;43;77;44", "xmr-proxy.xxxxxxx.org:3333", "0;0;0;0"]}

XMR: 08/20/18-16:21:19 - SHARE FOUND - (GPU 0; share value 0x00017d55)
Share accepted (1 ms)!

Just to make life hard there is no new line after the closing }.

To extract the data you must read the 2nd line up to and including the closing } and then stop.
You can then parse the JSON string into an array. Element [3] contains your GPU hash rates as a string separated by ;. Like this 3: "793;818;819;768" so you have to split those up too.

I've managed to do all the above in Node-RED and now I have a little 4 bar chart I can look at on a phone showing my current mining rate.

It would help a lot if there was a separate port or mode for which the miner would just speak JSON.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant