Schnitzel / hass-miner

Controll your Bitcoin miner from Home Assistant
MIT License
56 stars 18 forks source link

"Failed Setup: Will Retry" when adding entry #399

Open greenbike opened 2 hours ago

greenbike commented 2 hours ago

Version of the custom_component

1.1.15rc4

Configuration

Core: 2024.9.2 Miner: S19J Pro 104 Firmware: Braiins 2023-05-04-0-9b223345-23.03.1-plus

Describe the bug

I'm probably doing something dumb. But when I try to add my first miner, I get the error "Failed Setup, Will retry".

Debug log


Logger: custom_components.miner.coordinator
Source: custom_components/miner/coordinator.py:84
integration: HASS-miner ([documentation](https://github.com/Schnitzel/hass-miner), [issues](https://github.com/Schnitzel/hass-miner/issues))
First occurred: 9:59:38 PM (34 occurrences)
Last logged: 10:27:19 PM

'uint32'
Traceback (most recent call last):
  File "/config/custom_components/miner/coordinator.py", line 84, in _async_update_data
    miner_data = await self.miner.get_data(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyasic/miners/base.py", line 535, in get_data
    gathered_data = await self._get_data(
                    ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyasic/miners/base.py", line 460, in _get_data
    await asyncio.gather(rpc_command_task, web_command_task)
  File "/usr/local/lib/python3.12/site-packages/pyasic/web/braiins_os/boser.py", line 88, in multicommand
    result[cmd] = await tasks[cmd]
                  ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyasic/web/braiins_os/boser.py", line 450, in get_hashboards
    return await self.send_command(
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyasic/web/braiins_os/boser.py", line 114, 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 2405, in get_hashboards
    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 428, in recv_message
    message = await recv_message(self._stream, self._codec,
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/grpclib/stream.py", line 32, in recv_message
    message = codec.decode(message_bin, message_type)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/grpclib/encoding/proto.py", line 54, in decode
    return message_type.FromString(data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/betterproto/__init__.py", line 1052, in FromString
    return cls().parse(data)
           ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/betterproto/__init__.py", line 1015, in parse
    value = self._postprocess_single(
            ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/betterproto/__init__.py", line 955, in _postprocess_single
    value = cls().parse(value)
            ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/betterproto/__init__.py", line 1015, in parse
    value = self._postprocess_single(
            ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/betterproto/__init__.py", line 953, in _postprocess_single
    value = _get_wrapper(meta.wraps)().parse(value).value
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/betterproto/__init__.py", line 1015, in parse
    value = self._postprocess_single(
            ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/betterproto/__init__.py", line 938, in _postprocess_single
    fmt = _pack_fmt(meta.proto_type)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/betterproto/__init__.py", line 336, in _pack_fmt
    return {
           ^
KeyError: 'uint32'
greenbike commented 2 hours ago

Ok, I've updated core to 2024.10.1 and restarted. Now I see two different logs. Looks like a dependancy is missing.

Log details (ERROR)
Logger: homeassistant.setup
Source: setup.py:269
First occurred: 11:02:11 PM (1 occurrences)
Last logged: 11:02:11 PM

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

and

Logger: homeassistant.util.package
Source: util/package.py:150
First occurred: 11:02:06 PM (3 occurrences)
Last logged: 11:02:11 PM

Unable to install package pyasic==0.60.6: × No solution found when resolving dependencies: ╰─▶ Because there is no version of betterproto==2.0.0b6 and pyasic==0.60.6 depends on betterproto==2.0.0b6, we can conclude that pyasic==0.60.6 cannot be used. And because you require pyasic==0.60.6, we can conclude that your requirements are unsatisfiable. hint: betterproto was requested with a pre-release marker (e.g., betterproto==2.0.0b6), but pre-releases weren't enabled (try: `--prerelease=allow`)
b-rowan commented 2 hours ago

Duplicate of #393. Downgrade your home assistant, for some reason it refuses to install betterproto (a pyasic dependency for BOS+ handling), but older versions work.