Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
## Unreleased

### English
- **Screen on the board (kiosk):** new option in Settings → Farm (`KIOSK=1`). On the images (any systemd + apt system) the dashboard installs cage + Chromium the first time, in the background, and opens `?kiosk` full screen on the HDMI screen at every boot, with no desktop. New service `mineracao-kiosk`, created off by `install.sh`. The option is hidden where it can't work (Docker), and the settings show when it is installing, when it failed or when no screen is plugged in.
- **Screen on the board (kiosk):** new option in Settings → Farm (`KIOSK=1`). On the images (any systemd + apt system) the dashboard installs cage + Chromium the first time, in the background, and opens `?kiosk` full screen on the HDMI screen at every boot, with no desktop. New service `mineracao-kiosk`, created off by `install.sh`. The option is hidden where it can't work (Docker), and the settings show when it is installing, when it failed or when no screen is plugged in. The install runs at the lowest CPU and disk priority (`nice`/`ionice`) so the proxy keeps serving the miners on small boards.
- **New theme 🟡 Black & Yellow:** near-black background with exchange-style yellow, green for gains and red for alerts, in Settings → Farm → Visual theme (`THEME=gold`). Applies to the dashboard, kiosk mode and the admin screen.
- **Worker details (last 24 h):** click a worker in the table to open a dialog with its last 24 hours through the proxy: accepted and rejected shares, best share and average hashrate, a chart of shares per hour (rejections in red), a chart of the best difficulty per hour (log scale, so the ESP32 fit too), the 10 best hashes with their time and the latest shares. The proxy keeps this per hour in its stats file (survives restarts) and serves it at `/stats/worker?name=`; the dashboard at `/api/worker?name=`. Not in kiosk mode.
- **Two new achievements:** 🌋 **Trillion hash** (a share with difficulty over 1 trillion) and the 🏆 **Golden prize: block found!**, unlocked when a share passes the network difficulty. The golden prize sits on its own full-width row, shows its trophy even while locked and lights up in gold when won.

### Português
- **Tela ligada na placa (quiosque):** opção nova em Configurações → Fazenda (`KIOSK=1`). Nas imagens (qualquer sistema com systemd e apt), o painel instala o cage e o Chromium na primeira vez, em segundo plano, e abre o `?kiosk` em tela cheia na tela do HDMI em todo boot, sem área de trabalho. Serviço novo `mineracao-kiosk`, criado desligado pelo `install.sh`. A opção some onde não funciona (Docker), e as configurações mostram quando está instalando, quando deu erro ou quando não há tela ligada.
- **Tela ligada na placa (quiosque):** opção nova em Configurações → Fazenda (`KIOSK=1`). Nas imagens (qualquer sistema com systemd e apt), o painel instala o cage e o Chromium na primeira vez, em segundo plano, e abre o `?kiosk` em tela cheia na tela do HDMI em todo boot, sem área de trabalho. Serviço novo `mineracao-kiosk`, criado desligado pelo `install.sh`. A opção some onde não funciona (Docker), e as configurações mostram quando está instalando, quando deu erro ou quando não há tela ligada. A instalação roda com a menor prioridade de CPU e de disco (`nice`/`ionice`), para o proxy continuar atendendo os mineradores em placas pequenas.
- **Tema novo 🟡 Amarelo e Preto:** fundo quase preto com o amarelo de exchange, verde para ganhos e vermelho para alertas, em Configurações → Fazenda → Tema visual (`THEME=gold`). Vale no painel, no modo quiosque e na tela de administração.
- **Detalhes do worker (últimas 24 h):** clique num worker da tabela para abrir um modal com as últimas 24 horas dele pelo proxy: shares aceitos e recusados, melhor share e hashrate médio, gráfico de shares por hora (recusados em vermelho), gráfico da melhor dificuldade por hora (escala logarítmica, para os ESP32 caberem), os 10 melhores hashes com a hora e os últimos shares. O proxy guarda isso por hora no arquivo de estatísticas (sobrevive ao reinício) e entrega em `/stats/worker?name=`; o painel, em `/api/worker?name=`. Não abre no modo quiosque.
- **Duas conquistas novas:** 🌋 **Um trilhão** (um share com dificuldade acima de 1 trilhão) e o 🏆 **Prêmio de ouro: bloco achado!**, que desbloqueia quando um share passa da dificuldade da rede. O prêmio de ouro fica numa linha inteira só para ele, mostra o troféu mesmo trancado e acende em dourado quando sai.
Expand Down
5 changes: 4 additions & 1 deletion src/kiosk.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ function installThenStart(dataDir) {
writeState(dataDir, { installing: Date.now(), error: null });
const log = fs.openSync(path.join(dataDir, 'kiosk-install.log'), 'w');
const apt = process.env.KIOSK_APT || 'apt-get';
const sh = `${apt} update -q && DEBIAN_FRONTEND=noninteractive ${apt} install -y -q --no-install-recommends ${PACKAGES.join(' ')}`;
// prioridade mínima de CPU e de disco: numa placa pequena (Odroid-C2, cartão SD) a instalação não pode
// travar o proxy e o painel, que continuam atendendo os mineradores enquanto isso
const low = [fs.existsSync('/usr/bin/nice') ? 'nice -n 19' : '', fs.existsSync('/usr/bin/ionice') ? 'ionice -c 3' : ''].filter(Boolean).join(' ');
const sh = `${low} ${apt} update -q && DEBIAN_FRONTEND=noninteractive ${low} ${apt} install -y -q --no-install-recommends ${PACKAGES.join(' ')}`;
return new Promise((resolve) => {
const child = spawn('/bin/sh', ['-c', sh], { stdio: ['ignore', log, log] });
child.on('error', (e) => { writeState(dataDir, { installing: null, error: e.message }); resolve({ ok: false }); });
Expand Down
8 changes: 4 additions & 4 deletions src/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -559,8 +559,8 @@ const T = {
TEMP_UNIT: ['Unidade de temperatura', 'Celsius ou Fahrenheit no painel, no Telegram e nos limites de alerta dos Bitaxe. O Home Assistant converte sozinho.'],
POWER_PRICE_KWH: ['Preço do kWh', 'Na moeda escolhida, para a estimativa da conta de luz.'],
SHOW_DONATE: ['Mostrar "Apoiar o projeto"', 'O item ❤️ no fim do menu do painel, com o endereço para doar ao HomeMinerProxy. Nunca aparece no modo quiosque.'],
KIOSK: ['Tela ligada nesta placa (quiosque)', 'Abre o painel em tela cheia, sozinho, numa tela ligada no HDMI desta placa (sem área de trabalho). Na primeira vez instala o navegador (uns 300 MB, alguns minutos com internet); depois liga em cada boot. Desligar devolve a tela ao login de texto.'],
kiosk: { installing: '⏳ Instalando o navegador (alguns minutos). A tela liga sozinha quando terminar.', error: '⚠️ Não consegui instalar o navegador; veja kiosk-install.log na pasta de dados', noscreen: 'Nenhuma tela detectada no HDMI agora. Ligue a tela e reinicie a placa.' },
KIOSK: ['Tela ligada nesta placa (quiosque)', 'Abre o painel em tela cheia, sozinho, numa tela ligada no HDMI desta placa (sem área de trabalho). Na primeira vez instala o navegador (uns 300 MB; de 5 a 20 minutos numa placa pequena, que fica lenta enquanto isso); depois liga em cada boot. Desligar devolve a tela ao login de texto.'],
kiosk: { installing: '⏳ Instalando o navegador (de 5 a 20 minutos numa placa pequena; ela fica lenta enquanto isso, mas a mineração continua). A tela liga sozinha quando terminar.', error: '⚠️ Não consegui instalar o navegador; veja kiosk-install.log na pasta de dados', noscreen: 'Nenhuma tela detectada no HDMI agora. Ligue a tela e reinicie a placa.' },
SHOW_WALLET: ['Mostrar a carteira', 'Saldo, valor e movimentação na tela da fazenda. Desligue se a tela fica à vista de visitas ou se o painel é aberto de fora de casa. A cotação continua aparecendo, e o aviso de dinheiro entrando continua chegando no Telegram.'],
BITAXES: ['Bitaxe (API do AxeOS)', 'nome=IP de cada Bitaxe, separados por vírgula (ex.: bitaxe1=192.168.0.140, bitaxe2=192.168.0.141). O painel lê hashrate, temperatura, consumo e fan direto do aparelho. Use o mesmo nome do worker (o que vem depois do ponto no usuário da pool) e reserve um IP fixo no roteador.'],
BITAXE_TEMP_MAX: ['Bitaxe: limite do chip', 'Alerta no Telegram e no MQTT quando o chip passa disso em 2 leituras seguidas, na unidade escolhida na aba Fazenda. Vazio = {def}.'],
Expand Down Expand Up @@ -670,8 +670,8 @@ const T = {
TEMP_UNIT: ['Temperature unit', 'Celsius or Fahrenheit on the dashboard, on Telegram and in the Bitaxe alert limits. Home Assistant converts on its own.'],
POWER_PRICE_KWH: ['Price per kWh', 'In the chosen currency, for the power bill estimate.'],
SHOW_DONATE: ['Show "Support the project"', 'The ❤️ item at the end of the dashboard menu, with the address to donate to HomeMinerProxy. Never shown in kiosk mode.'],
KIOSK: ['Screen on this board (kiosk)', 'Opens the dashboard full screen on its own on a screen plugged into this board\'s HDMI (no desktop). The first time it installs the browser (about 300 MB, a few minutes online); after that it starts on every boot. Turning it off gives the screen back to the text login.'],
kiosk: { installing: '⏳ Installing the browser (a few minutes). The screen turns on by itself when it is done.', error: '⚠️ Could not install the browser; see kiosk-install.log in the data folder', noscreen: 'No screen detected on HDMI right now. Plug it in and restart the board.' },
KIOSK: ['Screen on this board (kiosk)', 'Opens the dashboard full screen on its own on a screen plugged into this board\'s HDMI (no desktop). The first time it installs the browser (about 300 MB; 5 to 20 minutes on a small board, which is slow meanwhile); after that it starts on every boot. Turning it off gives the screen back to the text login.'],
kiosk: { installing: '⏳ Installing the browser (5 to 20 minutes on a small board; it is slow meanwhile, but mining goes on). The screen turns on by itself when it is done.', error: '⚠️ Could not install the browser; see kiosk-install.log in the data folder', noscreen: 'No screen detected on HDMI right now. Plug it in and restart the board.' },
SHOW_WALLET: ['Show the wallet', 'Balance, value and activity on the farm screen. Turn it off if the screen is in view of visitors or the dashboard is opened from outside your home. The BTC price still shows, and Telegram still alerts when money arrives.'],
BITAXES: ['Bitaxe (AxeOS API)', 'name=IP of each Bitaxe, comma separated (e.g. bitaxe1=192.168.0.140, bitaxe2=192.168.0.141). The dashboard reads hashrate, temperature, power and fan straight from the device. Use the worker name (what comes after the dot in the pool user) and reserve a fixed IP in your router.'],
BITAXE_TEMP_MAX: ['Bitaxe: chip limit', 'Alert on Telegram and MQTT when the chip goes over this in 2 reads in a row, in the unit chosen in the Farm tab. Empty = {def}.'],
Expand Down
Loading