Giter Site home page Giter Site logo

hass-miner's Introduction

hass-miner

GitHub Release GitHub Activity License

pre-commit Black

hacs Project Maintenance

Control your Bitcoin miner from Home Assistant.

This component will set up the following platforms -

Platform Description
sensor Show info from miner API.
number Set Power Limit of Miner.
switch Switch Miner on and off

Installation

Use HACS, add the custom repo https://github.com/Schnitzel/hass-miner to it

Installation and usage:

Installation and usage

Contributions are welcome!

If you want to contribute to this please read the Contribution guidelines

Credits

This project was generated from @oncleben31's Home Assistant Custom Component Cookiecutter template.

Code template was mainly taken from @Ludeeus's integration_blueprint template.

Miner control and data is handled using @UpstreamData's pyasic.


hass-miner's People

Contributors

b-rowan avatar dependabot[bot] avatar petrsychrava avatar schnitzel avatar upstreamdata avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar

hass-miner's Issues

Status.UNAUTHENTICATED when trying to set the power limit

Version of the custom_component

Miner
V1.1.0-beta2

HA
Core 2024.1.1
Supervisor 2023.12.0
Operating System 11.3
Frontend 20240104.0

Describe the bug

When trying to set the power limit from within Home Assistant it gets the following error.
image

log


Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/commands.py:238
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 16:26:37 (3 occurrences)
Last logged: 16:27:45

[547794924736] (<Status.UNAUTHENTICATED: 16>, 'Missing or invalid authentication token', None)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 238, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2149, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2186, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 272, in handle_service
    return await service.entity_service_call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 882, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 952, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/number/__init__.py", line 111, in async_set_value
    await entity.async_set_native_value(native_value)
  File "/config/custom_components/miner/number.py", line 130, in async_set_native_value
    result = await miner.web.grpc.decrement_power_target(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyasic/web/bosminer/__init__.py", line 448, in decrement_power_target
    return await self.send_command(
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyasic/web/bosminer/__init__.py", line 326, in send_command
    return (await endpoint(message, metadata=metadata)).to_pydict()
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyasic/web/bosminer/proto/braiins/bos/v1/__init__.py", line 1837, in decrement_power_target
    return await self._unary_unary(
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/betterproto/grpc/grpclib_client.py", line 85, in _unary_unary
    response = await stream.recv_message()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/grpclib/client.py", line 425, in recv_message
    await self.recv_initial_metadata()
  File "/usr/local/lib/python3.11/site-packages/grpclib/client.py", line 393, in recv_initial_metadata
    self._raise_for_grpc_status(status, message, details)
  File "/usr/local/lib/python3.11/site-packages/grpclib/client.py", line 345, in _raise_for_grpc_status
    raise GRPCError(status, message, details)
grpclib.exceptions.GRPCError: (<Status.UNAUTHENTICATED: 16>, 'Missing or invalid authentication token', None)


Error during setup of AntminerS9

Hi, I installed version 0.6.0 of Miner in Home Assistant and now I'm trying to integrate my Antminer S9 with Braiins OS+ there. I can access it via the web interface and control it from there. Password is not set.
If I want to add it in the integration, it works, the IP is accepted and the miner name is automatically filled in, but then comes with the error message.
No devices or entities. Error setting up.

Error setting up entry miner-98f751 for miner
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 390, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/miner/init.py", line 24, in async_setup_entry
hass.config_entries.async_setup_platforms(entry, PLATFORMS)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ConfigEntries' object has no attribute 'async_setup_platforms'.

anyone an idea ?

Issue with install of beta version and a few entitys

Hi there.

I would like to use your HACS addon for my S19J Pro+ miner.
After reinstall your addon, i can switch on/off and show some data.
But "Power Limit" selector, "Miner Consumption" value and "Power limit" calue is not working.

Furthermore if i open HACS and press "reinstall", i dont get the possibility to install the latest beta version.
And the display dont get any information which version are installed at the moment.

Hope you can help to fix that, so i can use the miners more intelligent with NodeRed.

Thank you in advance!
Bjoern

hacs_addon

home-assistant_miner_2023-07-19T18-51-46.756Z.log

HAgui

Set miner username and password

A user should be able to set the username/password for the miner via the HASS interface. This could be passed as an initial configuration parameter to the config flow. It would also be nice to be able to change it after the miner is created via the UI, and just have it edit the config entry, although I'm not sure what would be required to do this.

Once set via HASS, the miner.pwd and miner.username attributes can be updated.

UI glitch: active toggle jumps back to inactive

"Active" toggle goes back to inactive after turning the miner on. After a minute or so it jumps to active. Presumably this is because the miner is returning an outdated state. But this might cause users to click the Active active button again in desperation.

Not sure what's possible here.

Scherm­afbeelding 2024-01-21 om 21 26 21

It is impossible to add more than 1 miner

Good afternoon! I encountered a problem, I can only add 1 miner, adding 2-3-4 miners is possible but they are not active. There is also no power control button for the miner. Am I doing something wrong? Antminer T19 S19 firmware Vnish 1.21
Uploading IMG_4782.jpeg…

Upgrade to v1.0.0.0-beta1

Hi Schnitzel,
I am unable to re-download the HACS integration and then choose V1.0.0.0-beta1.
The ''show beta versions'' is not there.
Is there a workaround?

Egbert

Failed to set wattage for and S9

First of all thanks for this cool add-on! I have a small issue when setting the powerlimit using the slider of a S9 miner in Home assistant it returns "Failed to set wattage".
I have added part of the log that indicates the issue using x's to remove my actual data.

Hope this helps.

Cheers

Version of the custom_component

  • S9 (BOS+) Firmware: 22.08.1
  • Hass miner 1.1.2
  • Core 2024.2.0
  • Supervisor 2024.01.1
  • Operating System 11.5
  • Frontend 20240207.0

Debug log

2024-02-08 13:48:45.645 WARNING (MainThread) [xxx] S9 (BOS+): x.x.x.x - Failed to set power limit: 'NoneType' object has no attribute 'as_bosminer'
2024-02-08 13:48:45.646 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547319965120] Failed to set wattage.
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 240, in handle_call_service
response = await hass.services.async_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2279, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2316, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 892, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 962, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/number/init.py", line 111, in async_set_value
await entity.async_set_native_value(native_value)
File "/config/custom_components/miner/number.py", line 117, in async_set_native_value
raise pyasic.APIError("Failed to set wattage.")
pyasic.errors.APIError: Failed to set wattage.

Target temperature changes to 70 (default is 60)

Somehow Target temperature changes from 60 to 70 when I use HA's automation service:

image

The weird part is that it doesn't happen all the time. If you tell me which logs to get you (BOS+ and/or HA) I can post them here when it happens. When I used Braiins toolbox to change power limit on all clients the target temp wouldn't change. To be fair - I like it better when target temperature is set to 70, because the fans are quieter (understandingly), but I feel uneasy that something changed without a reason. Also not sure if S19J are ok to work at 70C.

Configuration

I want to use preset values to switch all miners' power limit to i.e. 1700, 2200, 3000. So I have a dropdown helper "MaxPL" and then an automation that is being triggered on MaxPL's state change and MaxPL's value is passed to action (a service call for each miner).

alias: MaxPL SHIP
description: ""
trigger:
  - platform: state
    entity_id:
      - input_select.maxpl_ship_dropdown
condition: []
action:
  - service: number.set_value
    data:
      value: "{{ trigger.to_state.state }}"
    target:
      entity_id: number.2x50_power_limit
  - service: number.set_value
    data:
      value: "{{ trigger.to_state.state }}"
    target:
      entity_id: number.2x81_power_limit
mode: single

Integration is using deprecated methods on an instance of NumberEntity

Version of the custom_component

v1.0.0-beta1
On Home Assistant Core 2023.10.5

Describe the bug

I am getting a log message pointing out that the integration is "overriding deprecated methods on an instance of NumberEntity".

Please, have a look at the following message:

Debug log

Logger: homeassistant.components.number
Source: components/number/init.py:203
Integration: Number (documentation, issues)
First occurred: 2:48:43 PM (1 occurrences)
Last logged: 2:48:43 PM

custom_components.miner.number::MinerPowerLimitNumber is overriding deprecated methods on an instance of NumberEntity, this is not valid and will be unsupported from Home Assistant 2022.10. Please report it to the custom integration author.

Changing Power limit causing reset of other settings

IMG_7637.MP4

The issue is as follow: As soon as i change the power limit of my miner (S9) via Home assistant, it "forgets"/resets settings such as immersion mode. Refer to my vid below.

Attached a video with example where you can see Immersion mode gets deselected after changing power limit.

if mining is power is inactive then value 0 th/s instead of unknown or unavailable

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Display fan RPM

It would be nice to display the fan(s) RPM:

Scherm­afbeelding 2023-12-30 om 20 09 06

This correlates with noise, so an automation could lower the power target (when I'm home) so that the fans consistently run lower.

Error setting up entry for miner

When adding integration miner it gives me the below error. Using latest HA OS and latest hass-miner (main).

2023-05-12 10:47:51.707 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry s9j-heater for miner
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/miner/init.py", line 24, in async_setup_entry
hass.config_entries.async_setup_platforms(entry, PLATFORMS)
AttributeError: 'ConfigEntries' object has no attribute 'async_setup_platforms'

Unable to connect to S19Xp with Lux Os

Good Evening all
I wish to ask for your assistance.
I have installed the latest 1.1.3 got as far as adding the IP of the asic and then the window just stays with no text just the wording
Submit. the LuxOs is Luxor Firmware v2024.2.2.175223-e36845d7-1.3.0
Not seeing anything in logs about it.

I have some auth issues with my Mqtt but i dont think these are relevant
[homeassistant.components.mqtt.client] Unable to connect to the MQTT broker: Connection Refused: not authorised.

Look forward to hearing from you
all the Best

Miner setup not possible

Version of the custom_component

I am using the newest version v1.1.1.

Configuration

My Miner is connected via a Mango Router. So the configuration is: S9 Miner -eth- Mango Router -wifi- FritzBox.

Describe the bug

Hello,

I tried to setup my S9 Antminer with Stock Firmware on it and it failed. Some days ago I had Braiins OS on it and that worked.

When I enter the IP adress of the miner I get an empty window only showing:

Miner [question mark symbol] [x]
[send button]

Debug log


2024-01-30 20:29:16.922 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration miner which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

error while add miner

Error while add miner

Home Assistant 2023.6.1
Supervisor 2023.06.2
Operating System 10.2

Logger: custom_components.miner.config_flow
Source: custom_components/miner/config_flow.py:36
Integration: Miner (documentation, issues)
First occurred: 08:00:29 (6 occurrences)
Last logged: 08:06:17

Unexpected exception
Traceback (most recent call last):
File "/config/custom_components/miner/config_flow.py", line 36, in validate_input
miner = await miner_factory.get_miner(miner_ip)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/miners/miner_factory.py", line 96, in get_miner
new_model, new_api = await asyncio.wait_for(
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/tasks.py", line 479, in wait_for
return fut.result()
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/miners/miner_factory.py", line 271, in _get_miner_type
model = version["VERSION"][0]["Type"]
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
KeyError: 'Type'

Setting the power limit results in an error for S9 on Braiins+

Version of the custom_component

0.6.0

Configuration

I'm running HA in a docker setup. Installed the hass-miner plugin via HACS

Describe the bug

When I want to set the power limit (via an automation or the supplied power slider I run into the error below.

Debug log

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/number/__init__.py", line 111, in async_set_value
    await entity.async_set_native_value(native_value)
  File "/usr/src/homeassistant/homeassistant/components/number/__init__.py", line 414, in async_set_native_value
    await self.hass.async_add_executor_job(self.set_native_value, value)
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/number/__init__.py", line 410, in set_native_value
    raise NotImplementedError()
NotImplementedError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 447, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 688, in _async_device_step
    await device_action.async_call_action_from_config(
  File "/usr/src/homeassistant/homeassistant/components/device_automation/action.py", line 76, in async_call_action_from_config
    await platform.async_call_action_from_config(hass, config, variables, context)
  File "/usr/src/homeassistant/homeassistant/components/number/device_action.py", line 62, in async_call_action_from_config
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1713, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1750, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 676, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 930, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 713, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/number/__init__.py", line 113, in async_set_value
    await entity.async_set_value(value)
  File "/config/custom_components/miner/number.py", line 94, in async_set_value
    await miner.get_config()
  File "/usr/local/lib/python3.10/site-packages/miners/bosminer.py", line 99, in get_config
    cfg = bos_config_convert(toml_data)
  File "/usr/local/lib/python3.10/site-packages/config/bos.py", line 60, in bos_config_convert
    {} for _item in range(len(config[opt][idx]["pool"]))
KeyError: 'pool'

After HA Update to 11.5 doesn't load entity

I can not load the miner entity after I update the whole HA System.

I updated to the lateat haas miner version 1.1.2 (somehow can not download older versions for testing, it does install everytime 1.1.2)

Here is the logfile:

2024-02-14 20:42:30.809 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up miner platform for sensor
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/pyasic/web/braiins_os/boser.py", line 117, in send_command
    raise e
  File "/usr/local/lib/python3.12/site-packages/pyasic/web/braiins_os/boser.py", line 111, in send_command
    return (await endpoint(message, metadata=metadata)).to_pydict()
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyasic/web/braiins_os/proto/braiins/bos/v1/__init__.py", line 1956, in get_active_performance_mode
    return await self._unary_unary(
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/betterproto/grpc/grpclib_client.py", line 85, in _unary_unary
    response = await stream.recv_message()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/grpclib/client.py", line 425, in recv_message
    await self.recv_initial_metadata()
  File "/usr/local/lib/python3.12/site-packages/grpclib/client.py", line 393, in recv_initial_metadata
    self._raise_for_grpc_status(status, message, details)
  File "/usr/local/lib/python3.12/site-packages/grpclib/client.py", line 345, in _raise_for_grpc_status
    raise GRPCError(status, message, details)
grpclib.exceptions.GRPCError: (<Status.UNIMPLEMENTED: 12>, None, None)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/config/custom_components/miner/coordinator.py", line 76, in _async_update_data
    miner_data = await self.miner.get_data(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyasic/miners/base.py", line 474, in get_data
    gathered_data = await self._get_data(
                    ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyasic/miners/base.py", line 403, in _get_data
    web_command_data = await web_command_task
                       ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyasic/web/braiins_os/boser.py", line 84, in multicommand
    await asyncio.gather(*list(tasks.values()))
  File "/usr/local/lib/python3.12/site-packages/pyasic/web/braiins_os/boser.py", line 378, in get_active_performance_mode
    return await self.send_command(
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyasic/web/braiins_os/boser.py", line 119, in send_command
    raise APIError(f"gRPC command failed - {endpoint}") from e
pyasic.errors.APIError: gRPC command failed - <bound method PerformanceServiceStub.get_active_performance_mode of <pyasic.web.braiins_os.boser.BOSMinerGRPCStub object at 0x7fa8107e89b0>>

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 313, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/miner/coordinator.py", line 92, in _async_update_data
    raise UpdateFailed("API Error") from err
homeassistant.helpers.update_coordinator.UpdateFailed: API Error

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 344, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/miner/sensor.py", line 133, in async_setup_entry
    await coordinator.async_config_entry_first_refresh()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 285, in async_config_entry_first_refresh
    raise ex
homeassistant.exceptions.ConfigEntryNotReady: API Error
2024-02-14 20:42:30.864 ERROR (MainThread) [homeassistant.components.switch] Error while setting up miner platform for switch
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/pyasic/web/braiins_os/boser.py", line 117, in send_command
    raise e
  File "/usr/local/lib/python3.12/site-packages/pyasic/web/braiins_os/boser.py", line 111, in send_command
    return (await endpoint(message, metadata=metadata)).to_pydict()
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyasic/web/braiins_os/proto/braiins/bos/v1/__init__.py", line 1956, in get_active_performance_mode
    return await self._unary_unary(
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/betterproto/grpc/grpclib_client.py", line 85, in _unary_unary
    response = await stream.recv_message()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/grpclib/client.py", line 425, in recv_message
    await self.recv_initial_metadata()
  File "/usr/local/lib/python3.12/site-packages/grpclib/client.py", line 393, in recv_initial_metadata
    self._raise_for_grpc_status(status, message, details)
  File "/usr/local/lib/python3.12/site-packages/grpclib/client.py", line 345, in _raise_for_grpc_status
    raise GRPCError(status, message, details)
grpclib.exceptions.GRPCError: (<Status.UNIMPLEMENTED: 12>, None, None)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/config/custom_components/miner/coordinator.py", line 76, in _async_update_data
    miner_data = await self.miner.get_data(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyasic/miners/base.py", line 474, in get_data
    gathered_data = await self._get_data(
                    ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyasic/miners/base.py", line 403, in _get_data
    web_command_data = await web_command_task
                       ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyasic/web/braiins_os/boser.py", line 84, in multicommand
    await asyncio.gather(*list(tasks.values()))
  File "/usr/local/lib/python3.12/site-packages/pyasic/web/braiins_os/boser.py", line 378, in get_active_performance_mode
    return await self.send_command(
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyasic/web/braiins_os/boser.py", line 119, in send_command
    raise APIError(f"gRPC command failed - {endpoint}") from e
pyasic.errors.APIError: gRPC command failed - <bound method PerformanceServiceStub.get_active_performance_mode of <pyasic.web.braiins_os.boser.BOSMinerGRPCStub object at 0x7fa8107e9610>>

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 313, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/miner/coordinator.py", line 92, in _async_update_data
    raise UpdateFailed("API Error") from err
homeassistant.helpers.update_coordinator.UpdateFailed: API Error

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 344, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/miner/switch.py", line 44, in async_setup_entry
    await coordinator.async_config_entry_first_refresh()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 285, in async_config_entry_first_refresh
    raise ex
homeassistant.exceptions.ConfigEntryNotReady: API Error
2024-02-14 20:42:30.897 ERROR (MainThread) [homeassistant.components.number] Error while setting up miner platform for number
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/pyasic/web/braiins_os/boser.py", line 117, in send_command
    raise e
  File "/usr/local/lib/python3.12/site-packages/pyasic/web/braiins_os/boser.py", line 111, in send_command
    return (await endpoint(message, metadata=metadata)).to_pydict()
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyasic/web/braiins_os/proto/braiins/bos/v1/__init__.py", line 1956, in get_active_performance_mode
    return await self._unary_unary(
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/betterproto/grpc/grpclib_client.py", line 85, in _unary_unary
    response = await stream.recv_message()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/grpclib/client.py", line 425, in recv_message
    await self.recv_initial_metadata()
  File "/usr/local/lib/python3.12/site-packages/grpclib/client.py", line 393, in recv_initial_metadata
    self._raise_for_grpc_status(status, message, details)
  File "/usr/local/lib/python3.12/site-packages/grpclib/client.py", line 345, in _raise_for_grpc_status
    raise GRPCError(status, message, details)
grpclib.exceptions.GRPCError: (<Status.UNIMPLEMENTED: 12>, None, None)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/config/custom_components/miner/coordinator.py", line 76, in _async_update_data
    miner_data = await self.miner.get_data(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyasic/miners/base.py", line 474, in get_data
    gathered_data = await self._get_data(
                    ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyasic/miners/base.py", line 403, in _get_data
    web_command_data = await web_command_task
                       ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyasic/web/braiins_os/boser.py", line 84, in multicommand
    await asyncio.gather(*list(tasks.values()))
  File "/usr/local/lib/python3.12/site-packages/pyasic/web/braiins_os/boser.py", line 378, in get_active_performance_mode
    return await self.send_command(
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyasic/web/braiins_os/boser.py", line 119, in send_command
    raise APIError(f"gRPC command failed - {endpoint}") from e
pyasic.errors.APIError: gRPC command failed - <bound method PerformanceServiceStub.get_active_performance_mode of <pyasic.web.braiins_os.boser.BOSMinerGRPCStub object at 0x7fa810804ec0>>

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 313, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/miner/coordinator.py", line 92, in _async_update_data
    raise UpdateFailed("API Error") from err
homeassistant.helpers.update_coordinator.UpdateFailed: API Error

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 344, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/miner/number.py", line 29, in async_setup_entry
    await coordinator.async_config_entry_first_refresh()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 285, in async_config_entry_first_refresh
    raise ex
homeassistant.exceptions.ConfigEntryNotReady: API Error

miner

Modify fan speed via HASS-miner

There have been some requests to be able to control fixed fan speed via HASS-miner. After the merge of #39, this requires:

  • A switch entity to enable or disable manual fan control,
  • and a number entity to set manual fan speed.

This would then have to call miner.get_config() on update, then depending on switch status:

  • Set cfg.temp_mode to "manual"/"disabled" or "auto" depending on the switch,
  • and set cfg.fan_speed to an integer between 1 and 100.

Test support for multiple miners running in parallel

Seen a few reports of being unable to run miners in parallel and query both of them via HASS, I have a few theories on this:

  • The hostnames being used as a unique ID could be causing the entities to overwrite each other, as (for example) stock antminers all use Antminer as their hostname.
  • MinerCoordinator could be causing issues with multiple miners. I'm not sure how MinerCoordinator is actually handled on the backend of HASS, but if only 1 instance is created and it's expected to handle all miners for the whole hass-miner integration, overwriting coordinator.miner would cause issues.

Based on these, MAC address could be used as a UUID, or if the issue is related to the miner coordinator, there are ways to coordinate all the miners as a list inside that class.

S19 Devices are being Duplicated.

Version of the custom_component

Miner
V1.1.0-beta2

HA
Core 2024.1.1
Supervisor 2023.12.0
Operating System 11.3
Frontend 20240104.0

Describe the bug

When adding a new device at some point it adds a second device for the same unit. It only seems to happen on the s19 it doesn't seem to do it for the S9. I will test with a T17+ when I get a chance.
image

One device has all of the enties as expected however the second only has a small subset that doesn't get populated.
image
image

log


Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:610
Integration: Sensor (documentation, issues)
First occurred: 10 January 2024 at 09:59:29 (81328 occurrences)
Last logged: 16:38:01

Platform miner does not generate unique IDs. ID f0:58:04:32:2e:a7-2-board_hashrate already exists - ignoring sensor.s19_01_board_2_board_hashrate
Platform miner does not generate unique IDs. ID f0:58:04:32:2e:a7-0-fan_speed already exists - ignoring sensor.s19_01_fan_0_fan_speed
Platform miner does not generate unique IDs. ID f0:58:04:32:2e:a7-1-fan_speed already exists - ignoring sensor.s19_01_fan_1_fan_speed
Platform miner does not generate unique IDs. ID f0:58:04:32:2e:a7-2-fan_speed already exists - ignoring sensor.s19_01_fan_2_fan_speed
Platform miner does not generate unique IDs. ID f0:58:04:32:2e:a7-3-fan_speed already exists - ignoring sensor.s19_01_fan_3_fan_speed

can't add miner

here is the log:

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: homeassistant.config_entries
Source: custom_components/miner/init.py:24
Integration: Miner (documentation, issues)
First occurred: 14:00:46 (6 occurrences)
Last logged: 15:09:38

Error setting up entry miner-f6383f for miner
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 388, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/miner/init.py", line 24, in async_setup_entry
hass.config_entries.async_setup_platforms(entry, PLATFORMS)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ConfigEntries' object has no attribute 'async_setup_platforms'

Trigger to poll miner (after it's been offline)

I use a smart switch to power the miner on only when I need it, since even in standby it uses a little bit of power. However (especially after a Home Assistant restart) the miner integration will not detect that the miner is awake.

I can work around the issue by reloading the miner integration, but it would be nice if there was some sort of action (that I can call using an automation) to check if the miner is awake.

(it would be better if the miner itself told home assistant it's awake, but presumably that requires a firmware change)

Unable to Add T17+ running Braiins

Version of the custom_component

Miner:
V1.1.0

Home Assistant
Core 2024.1.5
Supervisor 2023.12.1
Operating System 11.4
Frontend 20240104.0

Braiins:
Version: 2022-06-20-0-288861e4-22.05-plus

Describe the bug

After Upgrading to the latest version I am unable to add the Antminer T17+ running Braiins.
I was able to add an S9 and an S19 without issue.

image

Debug log


2024-01-25 11:06:03.297 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/web_app.py", line 543, in _handle
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/web_middlewares.py", line 114, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 227, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 233, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 31, in headers_middleware
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 149, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 63, in with_admin
    return await func(self, request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 177, in post
    return await super().post(request, flow_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper
    result = await method(view, request, data, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 320, in async_configure
    result = await self._async_handle_step(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 416, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/miner/config_flow.py", line 150, in async_step_login
    return await self.async_step_title()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/miner/config_flow.py", line 154, in async_step_title
    title = await self._miner.get_hostname()
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyasic/miners/base.py", line 288, in get_hostname
    return await self._get_hostname()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyasic/miners/backends/braiins_os.py", line 766, in _get_hostname
    grpc_miner_details = await self.web.grpc.get_miner_details()
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyasic/web/braiins_os/grpc.py", line 400, in get_miner_details
    return await self.send_command("get_miner_details", GetMinerDetailsRequest())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyasic/web/braiins_os/grpc.py", line 95, in send_command
    metadata.append(("authorization", await self.auth()))
                                      ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyasic/web/braiins_os/grpc.py", line 119, in auth
    await self._get_auth()
  File "/usr/local/lib/python3.11/site-packages/pyasic/web/braiins_os/grpc.py", line 131, in _get_auth
    await stream.send_message(req, end=True)
  File "/usr/local/lib/python3.11/site-packages/grpclib/client.py", line 241, in send_message
    await self.send_request()
  File "/usr/local/lib/python3.11/site-packages/grpclib/client.py", line 173, in send_request
    protocol = await self._channel.__connect__()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/grpclib/client.py", line 748, in __connect__
    self._protocol = await self._create_connection()
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/grpclib/client.py", line 725, in _create_connection
    _, protocol = await self._loop.create_connection(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1085, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1069, in create_connection
    sock = await self._connect_sock(
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/asyncio/base_events.py", line 973, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 628, in sock_connect
    return await fut
           ^^^^^^^^^
  File "/usr/local/lib/python3.11/asyncio/selector_events.py", line 668, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('192.168.36.43', 50051)

Add remote miner

Tried to add miner via ddns address (miner1.customdomain.com:3456) without success.

It would be good to add miners via remote address and not only from lan.

can't set up these 2 miners together

Version of the custom_component

v1.1.4rc2

Configuration

Describe the bug

Can't add this miners at the same time:

S19 hyd 158
S19 pro hyd 198

More info:
Doesn't matter in which order I try to add these.
Both of these miners doesn't ask for user:password config when setting up.

From logs, it seems like the component tries to set up the same sensor names.

another s19 pro hyd 184 gives no issue here, but for this one it's asking for user:password on the set up.

Debug log

Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:636
Integration: Sensor (documentation, issues)
First occurred: 13:21:23 (187 occurrences)
Last logged: 17:34:23

Platform miner does not generate unique IDs. ID None-2-board_temperature already exists - ignoring sensor.s19prohyd198t_board_2_board_temperature
Platform miner does not generate unique IDs. ID None-2-chip_temperature already exists - ignoring sensor.s19prohyd198t_board_2_chip_temperature
Platform miner does not generate unique IDs. ID None-2-board_hashrate already exists - ignoring sensor.s19prohyd198t_board_2_board_hashrate
Platform miner does not generate unique IDs. ID None-0-fan_speed already exists - ignoring sensor.s19prohyd198t_fan_0_fan_speed
Platform miner does not generate unique IDs. ID None-1-fan_speed already exists - ignoring sensor.s19prohyd198t_fan_1_fan_speed

Cannot add integration after upgrade to Home Assitant 23.11

2023-11-02 09:18:33.643 ERROR (SyncWorker_0) [homeassistant.util.package] Unable to install package pyasic==0.36.9: ERROR: Cannot install pyasic==0.36.9 because these package versions have conflicting dependencies.
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
2023-11-02 09:18:48.945 ERROR (SyncWorker_0) [homeassistant.util.package] Unable to install package pyasic==0.36.9: ERROR: Cannot install pyasic==0.36.9 because these package versions have conflicting dependencies.
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
2023-11-02 09:19:03.581 ERROR (SyncWorker_0) [homeassistant.util.package] Unable to install package pyasic==0.36.9: ERROR: Cannot install pyasic==0.36.9 because these package versions have conflicting dependencies.
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
2023-11-02 09:19:03.585 ERROR (MainThread) [aiohttp.server] Error handling request

Shows a different hash resul

Good afternoon. Tell me why it shows a different hash result, in the manner of more in the interface, less in the integration interface?
IMG_5004
IMG_5005

Sensor: whether the device is online

I have a Home Assistant notification that reminds me to give the S9 power if electricity is cheap in the next couple of hours. I'd like to avoid that notification if it's already powered on.

I power it on manually, despite having a smart switch, because sometimes the PSU fans run but the board doesn't start. So I may need to try again a few times.

I could already avoid the notification by checking if the smart socket is on, or check if it consumes more than 7 watt (only PSU) and less than 15 (board probably working).

But it'd be nicer to just have a binary_sensor like s9_online.

Error on Setup

Hello,

i have the HA Version 2023.06.01 and the BraiinOS+ 2022-04-29-0-5eb2c5fe-22.02.4-plus on my S9.
If i try to setup the miner on the HA i get the message "error on setup".
Is there something wrong ? The Integration have the Version 0.6.0

BR

Disable Boards

Have you think on include an option to disable boards.

In order to reduce more the power used should be a great feature disable boards.

Broken after HA Core upgrade to 2024.3.0 with miner v1.1.4rc4

The miner module is unable to load after upgrading to HA core 2024.3.0.
Miner version v1.1.4rc4

Tried redownloading and installing miner multiple times along with many full restarts of HA with no luck.

Error log entry:

Logger: homeassistant.setup
Source: setup.py:266
First occurred: 8:30:36 PM (1 occurrences)
Last logged: 8:30:36 PM

Setup failed for custom integration 'miner': Requirements for miner not found: ['pyasic==0.54.2'].

Controlls Panel is not in the device

Hello again,

just one more , i hope little problem

the sensors Efficiency, Miner Consumption and Powerlimit are unknown.
I do not have that Controlls Panel
I also unable to install Braiin OS+ it does not find my device (IP is checked)

I do have accsess over my Browser with the IP and the miner is working fine

My Miner

Miner Type Antminer S9
Hostname antMiner
Model GNU/Linux
Hardware Version 30.0.1.3
Kernel Version Linux 3.14.0-xilinx-ga36f3af-dirty #90 SMP PREEMPT Thu Jun 20 15:01:47 CST 2019
File System Version Tue Jul 30 20:37:39 CST 2019
Logic Version V1.3.56
BMminer Version 2.0.0
Uptime 21
Load Average 0.02, 0.12, 0.12

Many thanks again

Carsten

New Installation of 1.0.1 on HA 2024.1.0: Please wait, starting configuration wizard for miner then 500 Internal Server Error

Version of the custom_component

Having some errors with the new version.

Installed version
v1.0.1
Latest version
v1.0.1

Brand new fresh installation of Home Assistant

Core
2024.1.0
Frontend
20240103.3

HACS first thing I installed before any Discovered Integrations.

Home Assistant Community Store 
Integration version: 1.33.0
Frontend version: 20230406083157

I have since installed another HACS repo and it is working as expected.

Describe the bug

Once the miner repo is added to HACS and I try to launch it

The immediate box displayed is
Please wait, starting configuration wizard for miner
and then a minute or so later:
Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble

I have restarted HA,
I have also tried re-downloading the 1.0.1 repo and HA restarting.
Lastly I tried downgrading to 1.0.0 and after a HA restart
Finally - removed HA 2024.1.0 and then installed HA 2023.12.3 and retried.

Issue adding second miner

Added first miner, entities appeared.

Added second miner, success message, but no entities appeared.

Logs:

Platform miner does not generate unique IDs. ID 00:00:00:00:00:00-power_limit already exists - ignoring number.worker1_power_limit
10:27:30 PM – (ERROR) Number
Platform miner does not generate unique IDs. ID 00:00:00:00:00:00-active already exists - ignoring switch.worker1_active
10:27:30 PM – (ERROR) Switch
Platform miner does not generate unique IDs. ID 00:00:00:00:00:00-2-chip_temperature already exists - ignoring sensor.worker1_board_2_chip_temperature
10:27:30 PM – (ERROR) Sensor - message first occurred at 10:27:30 PM and shows up 17 times

Unable to install package pyasic==0.40.3

Integration: 1.0.1
Home Assistant: 23.10.5

When trying to add a new entity I get an error:

Invalid config
The following integrations and platforms could not be set up:

miner (Show logs)
Please check your config and logs.


Logs:

Logger: homeassistant.util.package
Source: util/package.py:108
First occurred: 3:40:58 PM (3 occurrences)
Last logged: 3:41:35 PM

Unable to install package pyasic==0.40.3: ERROR: Cannot install pyasic==0.40.3 because these package versions have conflicting dependencies. ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts [notice] A new release of pip is available: 23.2.1 -> 23.3.1 [notice] To update, run: pip install --upgrade pip


I previously had installed the beta version 1.0.0-beta.
I don't know if it could be happening some conflict.

[Feature Request]: Support for S19J Pro (BBB)

I have recently installed the Braiins OS+ firmware on my BBB S19J Pros.

I have tried to add your awesome integration, hoping it would already support my ASICs but it is not able to locate them or provide any data when I enter the IP.

Do you plan to support this firmware in the future?

Thanks!

Additional Status (Braiins / Bosminer) Tuner & Pool

Describe the solution you'd like
It would be nice to see in Home Assistant along side each of the respectively hash cards other details like the Tuner Status. perhaps Pool status

Describe alternatives you've considered
I believe the option is available in pyasic

new versions of BraiinsOS+ (post-gRPC)
Source code pyasic/miners/backends/braiins_os.py

if rpc_tunerstatus is not None:
            errors = []
            try:
                chain_status = rpc_tunerstatus["TUNERSTATUS"][0]["TunerChainStatus"]
                if chain_status and len(chain_status) > 0:
                    offset = (
                        6 if int(chain_status[0]["HashchainIndex"]) in [6, 7, 8] else 0
                    )

                    for board in chain_status:
                        _id = board["HashchainIndex"] - offset
                        if board["Status"] not in [
                            "Stable",
                            "Testing performance profile",
                            "Tuning individual chips",
                        ]:
                            _error = board["Status"].split(" {")[0]
                            _error = _error[0].lower() + _error[1:]
                            errors.append(BraiinsOSError(f"Slot {_id} {_error}"))
                return errors

old versions of BraiinsOS+ (pre-gRPC)

Source code in pyasic/miners/backends/braiins_os.py

if rpc_tunerstatus is not None:
            errors = []
            try:
                chain_status = rpc_tunerstatus["TUNERSTATUS"][0]["TunerChainStatus"]
                if chain_status and len(chain_status) > 0:
                    offset = (
                        6 if int(chain_status[0]["HashchainIndex"]) in [6, 7, 8] else 0
                    )

                    for board in chain_status:
                        _id = board["HashchainIndex"] - offset
                        if board["Status"] not in [
                            "Stable",
                            "Testing performance profile",
                            "Tuning individual chips",
                        ]:
                            _error = board["Status"].split(" {")[0]
                            _error = _error[0].lower() + _error[1:]
                            errors.append(BraiinsOSError(f"Slot {_id} {_error}"))
                return errors

linux cli.

echo -n "stats" | nc IP_OF_MINER_GOES_HERE 4028
and

echo -n "pools" | nc IP_OF_MINER_GOES_HERE 4028

Additional context
Thanks. Really enjoy being able to automate with the currently available triggers. Great granular options would be enabled with some additional visibility.

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.