Giter Club home page Giter Club logo

bos-plus-api's People

Contributors

b5sgithub avatar bossqone avatar kamil-triscik avatar marathon-gary avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bos-plus-api's Issues

uint32 Quota vs double FixedShareRatio

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;
}

[Feature] Add `SetPoolConfiguration`

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 PoolGroupConfigurations.

Increase/DecreasePowerTarget

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.

Trouble with authentication token in smarthome

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

[Feature] Add `SetMinerConfiguration` endpoint

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.

API documentation needs examples.

[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

License Hash Burn Rate Clarification

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.

// i.e., number of seconds BOS will start mining in restricted mode burning 15% of hashrate

Can we please clarify which is accurate?

Confused about the security model?

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.