Schnitzel/hass-miner

S19 Devices are being Duplicated.

Closed this issue · 5 comments

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

I wonder if it could be creating IDs for None-n-xyz_metric? Possible there's a parsing error there. Are you able to check the IDs for those unpopulated entities?

Hey @b-rowan ,
Sorry for the delay in getting this to you.

sensor.s19_01_board_0_board_hashrate_2
sensor.s19_01_board_0_board_temperature_2
sensor.s19_01_board_0_chip_temperature_2

Interestingly, when I added another miner it changed the device name to the last added device but the underlying entity id's are stlil the same as above.
image

image

I gave this an attempted fix in v1.1.0, can you test it out?

Seems good so far. I removed everything and started fresh. I will monitor it over the next couple of days.

This issue hasn't happened again. Thanks @b-rowan for everything.