Closed grosman357 closed 1 week ago
They fully replaced the API? There's no way they're actually that stupid. I hope. I'll take a look into it when I have a chance...
The API itself looks the same. The only problem is that they changed the port. I have home assistant installed in a docker container and I can't change it in pyasic
AFAIU that 4433 api is completely different, but you can try modifying hass-miner on your system if you want. It's in custom_components/miner, and you need to edit the coordinator.py file so that when get_miner is called, if the miner is a Whatsminer, you can set miner.rpc.port to 4433
Unfortunately, my programming knowledge is too small to do this.
Also the new version of API has a very interesting function set.miner.power_percent As I understand it allows you to regulate the consumption of the miner without rebooting and this would be useful for automating a home assistant, provided that the miner is used as a heating boiler.
I don't have a new enough device to test this with yet, I'll have to see what I can find from people I know who can help...
fixed. in config_flow.py line 112 changed self._miner.web.pwd to self._miner.api.pwd
Fixed in commit a7c76f3552820474d7a017df69580d99f69a1e94, will release a version shortly.
Done in v1.1.18
self._miner.api.pwd works for me. not self._miner.rpc.pwd
self._miner.api.pwd works for me. not self._miner.rpc.pwd
miner.api
is just a property mapping to miner.rpc
.
HA Core 2024.9.1 hass-miner v1.1.16rc1
Whatsminer M50_VH84.H616 firmware 20241011.12.Rel.LC
During initial setup, after entering the IP address, an "Unknown error occurred" appears.
This may be due to the fact that in the latest versions of the Whatsminer firmware, the API port has changed from 4028 to 4433. MicroBT has posted a demo Python script (https://aws-microbt-com-bucket.s3.us-west-2.amazonaws.com/1729070366369python-whatsminer-api-3.0.0.zip). The API port there is 4433.