foxess-ha icon indicating copy to clipboard operation
foxess-ha copied to clipboard

Dual inverters

Open endurasek opened this issue 2 years ago • 26 comments

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

endurasek avatar Jul 10 '22 06:07 endurasek

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

williamjeccles avatar Jul 11 '22 12:07 williamjeccles

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 avatar Jul 11 '22 12:07 endurasek

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: @.***>

endurasek avatar Jul 11 '22 14:07 endurasek

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

williamjeccles avatar Jul 19 '22 13:07 williamjeccles

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:

  • platform: foxess username: endurasek password: Haslodoserwerafox FoxESS1 : 052af7 FoxESS2 : c19de879- FoxESS3 : .....

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: @.***>

endurasek avatar Jul 20 '22 04:07 endurasek

@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 : .....

macxq avatar Jul 20 '22 07:07 macxq

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 avatar Jul 20 '22 20:07 endurasek

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: @.***>

endurasek avatar Jul 21 '22 16:07 endurasek

@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

macxq avatar Jul 22 '22 09:07 macxq

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 avatar Jul 23 '22 06:07 endurasek

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.

endurasek avatar Jul 23 '22 06:07 endurasek

@endurasek how does your config looks like ?

macxq avatar Jul 25 '22 08:07 macxq

  • platform: foxess name: FoxESS1 username: endur.... password: Haslo..... deviceID: 052af704-9f08-....
    • platform: foxess name: FoxESS2 username: endur.... password: Haslo...... deviceID: c19de879-8860-...

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: @.***>

endurasek avatar Jul 25 '22 10:07 endurasek

❗️ 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 avatar Jul 25 '22 10:07 macxq

In your case it should be:

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

macxq avatar Jul 25 '22 10:07 macxq

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 avatar Jul 25 '22 10:07 endurasek

[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 avatar Jul 25 '22 12:07 endurasek

ha

endurasek avatar Jul 26 '22 05:07 endurasek

are you using v0.2 version ?

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

macxq avatar Jul 26 '22 06:07 macxq

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: @.***>

endurasek avatar Jul 26 '22 07:07 endurasek

Does it fetch data from both inverters ?

macxq avatar Jul 26 '22 07:07 macxq

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: @.***>

endurasek avatar Jul 26 '22 07:07 endurasek

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

macxq avatar Jul 27 '22 06:07 macxq

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

endurasek avatar Jul 27 '22 07:07 endurasek

I know :( working on that!

macxq avatar Jul 27 '22 07:07 macxq

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.

endurasek avatar Jul 28 '22 08:07 endurasek