braiins / bos-plus-api Goto Github PK
View Code? Open in Web Editor NEWBOS+ API
BOS+ API
Using Rust and using tonic::include_proto!("braiins.bos.v1");
Trying to generalize some ASIC configuration and go from FixedShareRatio
into a general Quota
by multiplying by 100 and such. Find this for f64 to u64 but Quota
is u32
, however other 64bit types are defined elsewhere, so I assume 64bit unsigned integers would be allowable.
Not really sure if this is an issue or not but seems like a general inconsistency.
proto/bos/v1/pool.proto
// Structure for quota load balance strategy
message Quota {
uint32 value = 1;
}
// Structure for fixed share ratio load balance strategy
// Fixed share ratio is value between 0.0 to 1.0 where 1.0 represents that all work is
// generated from the group
message FixedShareRatio {
double value = 1;
}
Right now to update pool information, you have to handle each group and or pool individually. It would be nice to be able to set the pool configuration as a whole, by passing a list of PoolGroupConfiguration
s.
Hi, something seems to be broken since the latest update.
The Increase/DecreasePowerTarget doesn't work no more, not through api commands, nore with the toolbox.
The miner reports the newly set PowerTarget but doesn't ramp up or down.
Setting The PowerTarget to a fixed value through SetPowerTarget seems to work just fine.
Hi,
i tried to integrate some miners into my smarthome to make use of excess energy from PV.
Since all my other stuff gets handled on a raspberryPi with Node-Red, i tried integrating the BOS+API there.
There seems to be only one repository that can handle gRPC on node-red: https://github.com/julien-pal/node-red-contrib-grpc
I got it to work, since i can read out the GetApiVersion, but that's where the problem starts.
For every other command, you also need so send the authentication token, which i think i know how to do that, if i had a chance to retrieve the token. I tried reaching out to the contributors of node-red-contrib-grpc, but the project seems to be abandoned. Editing the code by myself didn't work neither. There seems to be no option to somehow read out the response header in node-red.
Since you most likely have no time to dig into node-red or mentioned repositorys, is there a way to maybe integrate an option for the user to decide if u need an auth-token as mandatory, or instead just use 'username/pwd' as plaintext, or don't use authentication at all?
Everything else with your api works like a charme, just the auth-header prevents me from fully automating the whole thing.
Every help is appreciated, thanks in advance!
Enermatz
It would be nice to have an endpoint that would take a combination of all the configs expected by boser (CoolingConfiguration
, TunerConfiguration
, etc) that would allow a developer to handle all the configuration in one place.
[Updated] I was looking for an example grpcurl script that has full parameters required to change the power target on a miner. My use case is to run miner at the lowest power possible during evening, and max/full power during the day when my solar panels are active. I've put this into cron job on a nearby linux machine.
I reviewed the authenticate script and proto files and figured out that the message parameters are positional along with the names of the variables. Some variables are expected in json format, and was able to work out this syntax after reviewing the other proto files (units for Power) and reverse engineered the json format. Suggest adding something like this to the package in examples directory. May be cleaner with proto files ?
thanks for making this possible.
examples/setPowerTarget.sh:
#!/bin/sh
USERNAME=xxx
PASSWORD=yyy
BOSMINER=miner:50051
# authenticate to miner
BOSAUTH=$(grpcurl -plaintext -vv -d '{"username": "'"$USERNAME"'", "password": "'"${PASSWORD}"'"}' "${BOSMINER}" braiins.bos.v1.AuthenticationService/Login|awk '$1=="authorization:" {printf "%s%s",$1,$2}')
# set miner performance power target
SAVE_ACTION_AND_APPLY=2
WATTS=1800
grpcurl -plaintext -vv -H "${BOSAUTH}" -d '{"save_action": "'"${SAVE_ACTION_AND_APPLY}"'", "power_target": { "watt": "'"${WATTS}"'"}}' "${BOSMINER}" braiins.bos.v1.PerformanceService/SetPowerTarget
thanks
Right now, in cooling.proto there is no way to set the fan control mode. There should be an endpoint that takes a CoolingConfiguration
so that this configuration can be set.
Section 3.10 of https://braiins.com/os/plus/license
3.10. If the Software loses its connection to the License Server and Braiins was therefore not able to conduct the verification procedure under the Section 3.9. hereof the cryptocurrency mining device will only use 95 % of its processing power (so called hash rate) until the next verification procedure is successfully conducted. You acknowledge that this is not an error, misfunction, or penalty, but rather an intended function of the Software.
But a code comment mentions 15% burn rate if license server cannot be reached.
bos-plus-api/proto/bos/v1/license.proto
Line 51 in 134529b
Can we please clarify which is accurate?
Hello there,
Can you explain the need for authentication if the protocol sends credentials over plaintext? I'm a little confused on this point. Doesn't sending the password over plaintext make authentication redundant? My only guess is that it's only meant for secure networks but doesn't that make authentication unnecessary?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.