BitMaker-hub / NerdMiner_v2

Improved version of first ESP32 NerdMiner
Other
1.38k stars 252 forks source link

can not display the btc price #214

Closed arcsin3x closed 7 months ago

arcsin3x commented 8 months ago

图片

arcsin3x commented 8 months ago

Can you increase the font size of the price?

Goohst commented 8 months ago

I can't connect to this API. Can you add the BTC price API to the configuration file and fill it in myself? Can you also write the refresh time of the BTC price into the configuration file so that I can set it myself?

StarMikeMichael commented 8 months ago

IMG_20231122_235204_HDR

I have 2 Nerdminers v2 I ordered from the shop, already assembled and programmed with software already loaded.
The price was showing correctly for the first couple of days.
A few days ago, maybe on 11/19/2023, I woke up, and the price was at $0 !

It appears to be mining, and the pool confirms it's connected and mining, all other statistics are updated.

I took a quick look through the github and did not see where bitcoin price is addressed, or what the problem could be.

Please advise how to get the current price of Bitcoin to display accurately.

And I do agree that it would be nice to have a simple programming option in the WiFi Settings area, to select where BTC price comes from, and how often it's updated.

Now that I have a ready made nerdminer in front of me, I plan to make some more myself for gifts this Holiday Season.

IMG_20231122_235257_HDR IMG_20231122_235313_HDR

StarMikeMichael commented 7 months ago

Yesterday the price resumed showing, and is still showing accurate. Also, for the first time the the field 32Bits Shares: shows a quantity 3.

Can any body please tell me what the 32Bits Shares is counting? Still waiting for my valid blocks to start counting. But in the mean time, I had ZERO 32 Bit shares for about a week, now that the BTC $0 Price display fixed itself, I show my first THREE 32Bit Shares, and an uptime of two and a half days.

(maybe the pool softtwhere was updated, I havn't checked the pool web site yet.) I'm still trying to find where in the nerdminer code he gets the price from......

Totally a fun project!

arcsin3x commented 7 months ago

Yesterday the price resumed showing, and is still showing accurate. Also, for the first time the the field 32Bits Shares: shows a quantity 3.

Can any body please tell me what the 32Bits Shares is counting? Still waiting for my valid blocks to start counting. But in the mean time, I had ZERO 32 Bit shares for about a week, now that the BTC $0 Price display fixed itself, I show my first THREE 32Bit Shares, and an uptime of two and a half days.

(maybe the pool softtwhere was updated, I havn't checked the pool web site yet.) I'm still trying to find where in the nerdminer code he gets the price from......

Totally a fun project! Hi,where r u from? Some country can not connect api.

BitMaker-hub commented 7 months ago

Guys, thanks for your contributions, your changes were merged. So now everybody will see the price correctly even in China

Regardint 32 bit share means, how many shares were generated by this microminer that has at least 32 bits of zeros on its hash

arcsin3x commented 7 months ago

我再提供一种可以连接API,好像无次数限制, https://min-api.cryptocompare.com/data/price?fsym=BTC&tsyms=USD 直接修改API地址为以上地址,然后修改代码 if (doc.containsKey("USD")) bitcoin_price = doc["USD"]; (在src/monitor.h和src/monitor.cpp两个文件中)或者直接使用我的fork

BitMaker-hub commented 7 months ago

Wait, the one you gave me has limit restrictions? I don't want to be changing it a lot. Changing price every minute is like 1440 request day is this too much????

arcsin3x commented 7 months ago

Wait, the one you gave me has limit restrictions? I don't want to be changing it a lot. Changing price every minute is like 1440 request day is this too much????

I'm not sure if there are any restrictions, but the last API address price update took quite some time.This one has a fast update frequency.