CharlesGillanders / homeassistant-alphaESS

Monitor your energy generation, storage, and usage data using the official API from Alpha ESS.
MIT License
101 stars 22 forks source link

Failed setup after changing inverter #89

Closed johnbur1 closed 11 months ago

johnbur1 commented 11 months ago

I had the new integration working perfectly (I love it!), but unfortunately the inverter (smile5) had to be replaced this week. Now, I am getting failed setup. I have registered the new inverter s/n and check code fine on the alphacloud site - both now are there as there is no way to remove the old one.

This is in the log - any suggestions?

File "/config/custom_components/alphaess/coordinator.py", line 45, in _async_update_data _pv = _onedateenergy.get("epv") ^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'get' 2023-12-01 10:00:12.639 ERROR (MainThread) [custom_components.alphaess] Unexpected error fetching alphaess data: 'NoneType' object has no attribute 'get' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 290, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/alphaess/coordinator.py", line 45, in _async_update_data _pv = _onedateenergy.get("epv") ^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'get' 2023-12-01 10:00:12.641 DEBUG (MainThread) [custom_components.alphaess] Finished fetching alphaess data in 7.349 seconds (success: False)

CharlesGillanders commented 11 months ago

If you feel up to some trouble shooting there's instructions here https://github.com/CharlesGillanders/homeassistant-alphaESS/issues/86#issuecomment-1831817244 on how to gather additional information which might help?

johnbur1 commented 11 months ago

Hi Charles, I get to the same point as Graham

Screenshot 2023-12-02 15 43 59

I'm running HA on a VM on a synology NAS - terminal is HA addon

CharlesGillanders commented 11 months ago

Hi Charles, I get to the same point as Graham

Screenshot 2023-12-02 15 43 59

I'm running HA on a VM on a synology NAS - terminal is HA addon

Hmm ok, that's annoying. I don't understand why the VM image would be so odd. Ok do you have access to any other Linux environment? One where you can install python if it's not already installed by default? I guess even just a basic Ubuntu or Debian VM might be perfect. For your issue I just need to see what the open api is returning, I don't necessarily need to see it running under home assistant.

johnbur1 commented 11 months ago

I only have the Synology, I can set up a Linux VM on that - bear in mind you are way outside my capabilities here, so would need lots of 'idiot guiding' for what you need....

CharlesGillanders commented 11 months ago

I only have the Synology, I can set up a Linux VM on that - bear in mind you are way outside my capabilities here, so would need lots of 'idiot guiding' for what you need....

If you can get a vm up and then follow the previous instructions that should do it. If there's no python installed on the VM by default then (assuming a Debian/ubuntu distribution) this command should sort that out:

sudo apt install python

johnbur1 commented 11 months ago

alphaess.txt

See attached for error I get - hope that is what you want?

CharlesGillanders commented 11 months ago

John, please see this comment in the other issue.

https://github.com/CharlesGillanders/homeassistant-alphaESS/issues/86#issuecomment-1837986390

johnbur1 commented 11 months ago

done

johnbur1 commented 11 months ago

Many thanks