Comments (26)
I believe I fixed this exact issue earlier, I was having a similar issue. Try with v0.36.0.
from pyasic.
Before I wrote the message above, I did update to v.036.0 but also at the same time T19 became functioning, so I wasnt 100% if updating or T19 becoming responsive was the solution.
from pyasic.
Had an issue again, seems that script was get heavily delayed, and because its ran every minute, bottlenecks and then whats written to the server gets delayed by 10-15 minutes. T19 BOS+ was causing it, here is the error
/home/sf/.local/lib/python3.9/site-packages/pyasic/miners/base.py:98 in _get_ssh_connection
[WARNING][06/25/23 04:54:09](root) - Connection refused: BOSMiner T19: 172.16.1.200
/home/sf/.local/lib/python3.9/site-packages/pyasic/miners/base.py:98 in _get_ssh_connection
[WARNING][06/25/23 04:54:24](root) - Connection refused: BOSMiner T19: 172.16.1.200
from pyasic.
There's only a few places _get_ssh_connection can be called, one of them is get_fw_version. Ssh has a tendency to cause issues and be pretty slow, so if you don't absolutely need fw_version it would just remove it from your list of data_to_get when calling get_data.
Not sure why it take so long for it to realize it's refusing connection, and that will be tough to troubleshoot because replicating that specific case is pretty tough. I'll see what I can do though, maybe wrap it in a wait_for and have it timeout, but this can lead to a bunch of issues with canceling tasks inside tasks, so I'll see. Might be a fair bit of work.
from pyasic.
I am experiencing this right now with a another T19 or S19 BOS+ miner, the miner in the gui says Ubus error: Command failed: Request timed out
when trying to log in through gui. I removed fw_ver from datapoints in my script, this part
data = await asyncio.gather(*[m.get_data(data_to_get = [
"mac",
"model",
"api_ver",
"fw_ver",
"hashrate",
but script still hanging
from pyasic.
Forgot MAC address, and it is forced to go through ssh, try removing that one? If it's that, I'll remove references to send_ssh_command where possible and try to get graphql info on some of that, or maybe query luci or something...
from pyasic.
It was s19 BOS+, it unfroze just right now, so it ll have to wait until next freeze to try the mac address. Pity. But the whole thing lasted just over 2h and although data was collected it was at irregular intervals and live ish status updates wont possible
from pyasic.
Seems like I should just try to remove as much of the ssh command stuff as possible.
from pyasic.
How does btctools get this info? It returns mac and everything and very fast too.
from pyasic.
They're querying LUCI, see source here - https://github.com/btccom/libbtctools/blob/master/src/lua/scripts/scanner/BosHttpLuci.lua
from pyasic.
I set up LUCI querying, and get_mac now runs off of that. See if 0.36.1 works any better for you?
from pyasic.
Ok converting to it now, thank you
from pyasic.
There was a bug, seems like later version of BOS+ only respond if you set BTCTools as your user agent header, it should be fixed in 0.36.2
from pyasic.
ok, updated
from pyasic.
t19 hung again, the every minute script stopped working because it gives the following error (t19 hang screenshotted)
200
[{"macaddr":"00xx"}]
200
[{"macaddr":"ecxx"}]
200
[{"macaddr":"14xx"}]
200
[{"macaddr":"a4xx"}]
200
[{"macaddr":"f4:xx"}]
Traceback (most recent call last):
File "/home/sf/pyasic/production.py", line 65, in <module>
asyncio.run(scan_and_get_data())
File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/home/sf/pyasic/production.py", line 28, in scan_and_get_data
data = await asyncio.gather(*[m.get_data(data_to_get = [
File "/home/sf/.local/lib/python3.9/site-packages/pyasic/miners/base.py", line 497, in get_data
gathered_data = await self._get_data(allow_warning, data_to_get=data_to_get)
File "/home/sf/.local/lib/python3.9/site-packages/pyasic/miners/base.py", line 416, in _get_data
web_command_data = await self.web.multicommand(
File "/home/sf/.local/lib/python3.9/site-packages/pyasic/web/bosminer.py", line 91, in multicommand
data = dict(**luci_data, **gql_data)
TypeError: dict() argument after ** must be a mapping, not NoneType
![Screenshot 2023-06-30 at 04 14 31](https://private-user-images.githubusercontent.com/135475389/250075170-5f508d3d-c0f1-4f4a-8c20-339d7205354d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTYwNjE2MDcsIm5iZiI6MTcxNjA2MTMwNywicGF0aCI6Ii8xMzU0NzUzODkvMjUwMDc1MTcwLTVmNTA4ZDNkLWMwZjEtNGY0YS04YzIwLTMzOWQ3MjA1MzU0ZC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNTE4JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDUxOFQxOTQxNDdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT02Yjc1ZmY3OTg4ZjBmZGYzYmRjZDQxYjQyMTMyY2Y1OTE3MTQyMjYzYzUyNmMwMjBmMmJjNWZkYWE4M2U3ODIwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.OeCT2aL294YwVt-r3LwoonZzNoPixPYKSGx05A6TNN8)
from pyasic.
and if I remove "mac" from my get_data then I get error
Traceback (most recent call last):
File "/home/sf/pyasic/production.py", line 64, in <module>
asyncio.run(scan_and_get_data())
File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/home/sf/pyasic/production.py", line 28, in scan_and_get_data
data = await asyncio.gather(*[m.get_data(data_to_get = [
File "/home/sf/.local/lib/python3.9/site-packages/pyasic/miners/base.py", line 497, in get_data
gathered_data = await self._get_data(allow_warning, data_to_get=data_to_get)
File "/home/sf/.local/lib/python3.9/site-packages/pyasic/miners/base.py", line 416, in _get_data
web_command_data = await self.web.multicommand(
File "/home/sf/.local/lib/python3.9/site-packages/pyasic/web/bosminer.py", line 91, in multicommand
data = dict(**luci_data, **gql_data)
TypeError: dict() argument after ** must be a mapping, not NoneType
from pyasic.
I tried to release new versions yesterday, but working on a laptop I don't usually use, it didn't push my tags to publish the releases. Can you try and see if it raises that error in 0.36.7?
from pyasic.
Great stuff, I updated, I ll let you know, thank you.
from pyasic.
Looks like didnt work, I have no data at night for about 2h, coincided with a bos+ going offline. I was sleeping so couldnt check what was happening
from pyasic.
happening again, here is the error
Traceback (most recent call last):
File "/home/sf/pyasic/production_print_only.py", line 62, in <module>
asyncio.run(scan_and_get_data())
File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/home/sf/pyasic/production_print_only.py", line 28, in scan_and_get_data
data = await asyncio.gather(*[m.get_data(data_to_get = [
File "/home/sf/.local/lib/python3.9/site-packages/pyasic/miners/base.py", line 547, in get_data
gathered_data = await self._get_data(allow_warning, data_to_get=data_to_get)
File "/home/sf/.local/lib/python3.9/site-packages/pyasic/miners/base.py", line 500, in _get_data
miner_data[data_name] = await function(**args_to_send)
File "/home/sf/.local/lib/python3.9/site-packages/pyasic/miners/backends/bosminer.py", line 1041, in get_fault_light
data = (
AttributeError: 'NoneType' object has no attribute 'strip'
from pyasic.
Fixed that one in 0.36.10
. That's ssh related, but should only pause for 10 seconds, and its happeneing when checking fault_light
status, which you can just remove from the list.
from pyasic.
ah ok I was running 0.36.9 when I got that error, updated and I ll keep monitoring
from pyasic.
one t19 bos+ is hanging, script is giving the following error
Traceback (most recent call last):
File "/home/sf/pyasic/production_print_only.py", line 62, in <module>
asyncio.run(scan_and_get_data())
File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/home/sf/pyasic/production_print_only.py", line 49, in scan_and_get_data
print(item)
NameError: name 'item' is not defined
from pyasic.
That one appears to be in your script, not sure why it's happening but you might have a bad variable name or something.
from pyasic.
you are right, the for loop was commented out when cycling through each item in the data array. ok we wait again for the next hang
from pyasic.
I'm going to close this for now, it's pretty old at this point so I assume it's working as intended. Let me know if anything changes 👍
from pyasic.
Related Issues (20)
- KD box ii hash rate mode change HOT 31
- LuxOS S19 Compatibility HOT 5
- Reboot Command on Whatsminer HOT 20
- Dashboard for visualizing data HOT 7
- Can't increase the power target BraiinsOS 24.02 Plus HOT 3
- BOS Antminer S19 XP Miner is not returning data instead throwing error . HOT 12
- Does not support Braiins OS+ Prior to version 23.03 HOT 5
- MinerData's as_json() method raises error 'Object of type TunerAlgo is not JSON serializable' HOT 3
- `config` - Only source code is shown under the Miner Config page, ideally it would have some descriptions of how to use, along with docstrings from the methods. It would also be ideal to add documentation on the sub-items. HOT 1
- I can't set power target on Braiins OS+ Miner HOT 8
- Network scan of some subnets time out on Ubuntu 22.04.2 HOT 22
- Can't seem to set pool configuration using send_config HOT 7
- Add firmware vendor to MinerData HOT 7
- Add control board model to MinerData HOT 1
- I want to know what pool a miner is currently active on HOT 1
- I want to know the expected fans of a miner. HOT 2
- Add in functionality to limit the number of ips being pinged when scanning. HOT 3
- Doesnt get Miner Modell BraiinsOS 24.04 Plus HOT 4
- Intermittent Failure to read all fans on Braiins OS+ HOT 3
- wmt.pyasic.org source code or any other solution to unlock whatsminer asic privileged API HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyasic.