macxq / foxess-ha

Home Assistant & FoxESS integration. Monitor you photovoltaic installation directly from HA ☀️ ⚡️
119 stars 37 forks source link

Dual inverters #66

Open endurasek opened 2 years ago

endurasek commented 2 years ago

I have a problem with reading 2 inverters I can always read data from only one, but never from two at the same time Beaaaz tytułu

Ten błąd pochodzi z niestandardowej integracji.

Logger: custom_components.foxess.sensor Source: custom_components/foxess/sensor.py:143 Integration: foxess (documentation, issues) First occurred: 9 lipca 2022 11:10:24 (20 occurrences) Last logged: 08:10:33

Unexpected error fetching FoxESS data: 'NoneType' object is not subscriptable Unexpected error fetching FoxESS data: 'addressbook' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 205, in _async_refresh self.data = await self._async_update_data() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 164, in _async_update_data return await self.update_method() File "/config/custom_components/foxess/sensor.py", line 143, in async_update_data if int(allData["addressbook"]["result"]["status"]) == 1: TypeError: 'NoneType' object is not subscriptable

williamjeccles commented 2 years ago

Are you using a unique username for each? I am and it's working fine. I.e separate end user accounts for each inverter.

endurasek commented 2 years ago

Yes, foxess1 and foxess2 . Same as in the picture

pon., 11 lip 2022, 14:34 użytkownik William Eccles @.***> napisał:

Are you using unique username for each? I am and it's working fine.

— Reply to this email directly, view it on GitHub https://github.com/macxq/foxess-ha/issues/66#issuecomment-1180354672, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYY4E2R3PMMNJVOWHUXAALDVTQID5ANCNFSM53EPUI7A . You are receiving this because you authored the thread.Message ID: @.***>

endurasek commented 2 years ago

but i have one account for two inverters

pon., 11 lip 2022, 14:39 użytkownik Endurasek s @.***> napisał:

Yes, foxess1 and foxess2 . Same as in the picture

pon., 11 lip 2022, 14:34 użytkownik William Eccles < @.***> napisał:

Are you using unique username for each? I am and it's working fine.

— Reply to this email directly, view it on GitHub https://github.com/macxq/foxess-ha/issues/66#issuecomment-1180354672, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYY4E2R3PMMNJVOWHUXAALDVTQID5ANCNFSM53EPUI7A . You are receiving this because you authored the thread.Message ID: @.***>

williamjeccles commented 2 years ago

@endurasek it works if you setup each inverter on it's own end-user account and use unique login details for each inverter.

endurasek commented 2 years ago

That's it works. But I have three installations and I would have to create three accounts?. And I think it should be that you have one account and as many installations as you want.

sensor:

wt., 19 lip 2022 o 15:00 William Eccles @.***> napisał(a):

@endurasek https://github.com/endurasek it works if you setup each inverter on it's own end-user account and use unique login details for each inverter.

— Reply to this email directly, view it on GitHub https://github.com/macxq/foxess-ha/issues/66#issuecomment-1189023509, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYY4E2QOUXA5NNJTDFCQXJLVU2RG3ANCNFSM53EPUI7A . You are receiving this because you were mentioned.Message ID: @.***>

macxq commented 2 years ago

@endurasek fully agree with you that this is how this should looks like.

But I have stuck for some time(months :P) on massive refactor that is to enable new capabilities, i have even create post on https://community.home-assistant.io/t/the-system-cannot-restart-because-the-configuration-is-not-valid-config-schema-definition/425624/8 but even that, did not helped me.

🤔 but the notation that you have proposed brought me some idea to test! sensor:

  - platform: foxess
    username: endurasek
    password: Haslodoserwerafox
    FoxESS1  : 052af7
    FoxESS2 : c19de879-
    FoxESS3 : .....
endurasek commented 2 years ago

ok so i'm waiting for some new version 😁

śr., 20 lip 2022 o 09:27 macxq @.***> napisał(a):

@endurasek https://github.com/endurasek fully agree with you that this is how this should looks like.

But I have stuck for some time(months :P) on massive refactor that is to enable new capabilities, i have even create post on https://community.home-assistant.io/t/the-system-cannot-restart-because-the-configuration-is-not-valid-config-schema-definition/425624/8 but even that, did not helped me.

🤔 but the notation that you have proposed brought me some idea to test! sensor:

  • platform: foxess

    username: endurasek

    password: Haslodoserwerafox

    FoxESS1 : 052af7

    FoxESS2 : c19de879-

    FoxESS3 : .....

— Reply to this email directly, view it on GitHub https://github.com/macxq/foxess-ha/issues/66#issuecomment-1189925872, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYY4E2QN6JSFWIAAXBYCHPTVU6S5TANCNFSM53EPUI7A . You are receiving this because you were mentioned.Message ID: @.***>

endurasek commented 2 years ago

Hello

I have an interesting situation ... set up a second foxess account. And now I have two inverters registered on the first account, and I don't have any on the second account, it is empty. But I have something like this in my home settings.

Picture below. and I don't know why it started to work! I still have to test it if the data is not accidental

śr., 20 lip 2022, 22:31 użytkownik Endurasek s @.***> napisał:

ok so i'm waiting for some new version 😁

śr., 20 lip 2022 o 09:27 macxq @.***> napisał(a):

@endurasek https://github.com/endurasek fully agree with you that this is how this should looks like.

But I have stuck for some time(months :P) on massive refactor that is to enable new capabilities, i have even create post on https://community.home-assistant.io/t/the-system-cannot-restart-because-the-configuration-is-not-valid-config-schema-definition/425624/8 but even that, did not helped me.

🤔 but the notation that you have proposed brought me some idea to test! sensor:

  • platform: foxess

    username: endurasek

    password: Haslodoserwerafox

    FoxESS1 : 052af7

    FoxESS2 : c19de879-

    FoxESS3 : .....

— Reply to this email directly, view it on GitHub https://github.com/macxq/foxess-ha/issues/66#issuecomment-1189925872, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYY4E2QN6JSFWIAAXBYCHPTVU6S5TANCNFSM53EPUI7A . You are receiving this because you were mentioned.Message ID: @.***>

macxq commented 2 years ago

@endurasek to get beta version you need to Redownload the integration:

Screenshot 2022-07-22 at 11 53 35

Select Show beta version and then download the last beta version

Screenshot 2022-07-22 at 11 53 50

❗️ Due to config change - you may need to remove old config before restarting your HA

endurasek commented 2 years ago

Now it doesn't work anymore

Logger: homeassistant.setup Source: custom_components/foxess/init.py:85 Integration: foxess (documentation, issues) First occurred: 07:59:13 (1 occurrences) Last logged: 07:59:13

Error during setup of component foxess Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 235, in _async_setup_component result = await task File "/config/custom_components/foxess/init.py", line 85, in async_setup config = hass_config[DOMAIN] KeyError: 'foxess'

endurasek commented 2 years ago

Logger: homeassistant.setup Source: setup.py:298 First occurred: 08:11:47 (1 occurrences) Last logged: 08:11:47

Unable to prepare setup for platform foxess.sensor: Unable to set up component.

macxq commented 2 years ago

@endurasek how does your config looks like ?

endurasek commented 2 years ago

pon., 25 lip 2022 o 10:24 macxq @.***> napisał(a):

@endurasek https://github.com/endurasek how does your config looks like ?

— Reply to this email directly, view it on GitHub https://github.com/macxq/foxess-ha/issues/66#issuecomment-1193739639, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYY4E2XTN3XQLRPWDBCVOOLVVZFKDANCNFSM53EPUI7A . You are receiving this because you were mentioned.Message ID: @.***>

macxq commented 2 years ago

❗️ Due to config change - you may need to remove old config before restarting your HA

staring from v0.2 there is new config format

https://github.com/macxq/foxess-ha/wiki/New-configuration-format----v0.2

macxq commented 2 years ago

In your case it should be:

foxess:
  endur....:
    password: Haslo.....
    devices: 
      FoxESS1: 052af704-9f08-....
      FoxESS2: c19de879-8860-...
endurasek commented 2 years ago

ok so i'll check it out and let it know

pon., 25 lip 2022, 12:13 użytkownik macxq @.***> napisał:

In your case it should be:

foxess: endur....: password: Haslo..... devices: FoxESS1: 052af704-9f08-.... FoxESS2: c19de879-8860-...

— Reply to this email directly, view it on GitHub https://github.com/macxq/foxess-ha/issues/66#issuecomment-1193851018, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYY4E2TGLTM2UQ4Y3V2APF3VVZSD7ANCNFSM53EPUI7A . You are receiving this because you were mentioned.Message ID: @.***>

endurasek commented 2 years ago

[image: ha.jpg]

Invalid config for [foxess]: [endurasek] is an invalid option for [foxess]. Check: foxess->endurasek. (See ?, line ?).

pon., 25 lip 2022 o 12:31 Endurasek s @.***> napisał(a):

ok so i'll check it out and let it know

pon., 25 lip 2022, 12:13 użytkownik macxq @.***> napisał:

In your case it should be:

foxess: endur....: password: Haslo..... devices: FoxESS1: 052af704-9f08-.... FoxESS2: c19de879-8860-...

— Reply to this email directly, view it on GitHub https://github.com/macxq/foxess-ha/issues/66#issuecomment-1193851018, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYY4E2TGLTM2UQ4Y3V2APF3VVZSD7ANCNFSM53EPUI7A . You are receiving this because you were mentioned.Message ID: @.***>

endurasek commented 2 years ago

ha

macxq commented 2 years ago

are you using v0.2 version ?

EDIT: yes, there is some issue with restart, try to restart it outside of HA - it should work

endurasek commented 2 years ago

Yes

wt., 26 lip 2022, 08:36 użytkownik macxq @.***> napisał:

are you using v0.2 https://github.com/macxq/foxess-ha/tree/v.0.2.0b version ?

— Reply to this email directly, view it on GitHub https://github.com/macxq/foxess-ha/issues/66#issuecomment-1195066511, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYY4E2WYSV3JQ2WVNKTL5GTVV6BP5ANCNFSM53EPUI7A . You are receiving this because you were mentioned.Message ID: @.***>

macxq commented 2 years ago

Does it fetch data from both inverters ?

endurasek commented 2 years ago

nothing comes. mi information from ha that the configuration is incorrect

wt., 26 lip 2022, 09:30 użytkownik macxq @.***> napisał:

Does it fetch data from both inverters ?

— Reply to this email directly, view it on GitHub https://github.com/macxq/foxess-ha/issues/66#issuecomment-1195112612, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYY4E2QBKCP2SELSAADRH33VV6HZRANCNFSM53EPUI7A . You are receiving this because you were mentioned.Message ID: @.***>

macxq commented 2 years ago

even after forced reboot (eg. via docker restart) ?

endurasek commented 2 years ago

Bez t works, retrieving data, but I am unable to restart it normally

macxq commented 2 years ago

I know :( working on that!

endurasek commented 2 years ago

I went back to version 0.15. The new version had problems maintaining connection with the server. And the HA could not be restarted normally. If you have a new patched version, I will be happy to test it.