alexdelprete/ha-abb-powerone-pvi-sunspec

Conflict with Modbus: official integration

Closed this issue · 14 comments

Hello Alex,

I installed the new version after updating HA Core.
HA receives data from my 2 inverters, the model is now recognised but LOG is showing the folowing error regarding modbus:

2023-01-23 11:00:41.597 ERROR (MainThread) [homeassistant.setup] Setup failed for modbus: Unable to import component: No module named 'pymodbus.client.sync'`

Also, another device which uses modbus does not work, seemingly due to some sort of conflict.

Could you please help me in solving this?
Thanks again for your great support,
Domenico

Originally posted by @usrpend in #44 (comment)

Domenico, there's another user @Polvere79 that had the same issue, I'll tag him because maybe he found out a solution to the conflict, without disabling modbus native.

Read here: https://community.home-assistant.io/t/custom-component-abb-power-one-fimer-pv-inverters-sunspec-modbus-tcp/316363/196?u=alexdelprete

Hi, no unfortunately I did not, I just removed the native modbus, since I was using it only for getting values from the inverter.

Thanks for answering.

I have to setup modbus: again to understand what's going on...I used them both together for a while...but maybe something changed in latest HA versions.

Hi, I have updated ha core. Now I have the same error and the items for all my powermeters no longer available.

I just see, that I am not in ha core support.
I do not use your modul.
Sorry.

@Polvere79 @usrpend @twarnick I just release v2.5.0 with a new functionality and possibly the resolution of the conflict: HA modbus integration is based on pymodbus v2.x, now the maintainer has updated it to v3.1.1 in the dev branch, and probably it'll be available in next main version. That's the cause of the conflict. If you don't want to wait, and need to use both my component and modbus official integration, you have to switch to HA Dev release.

Reference issues/pulls:
home-assistant/core#85869
home-assistant/core#85714
home-assistant/core#85961
home-assistant/core#86513

Please also let me know if you're able to change configuration options like in the small animation in the changelog: https://github.com/alexdelprete/ha-abb-powerone-pvi-sunspec/releases/tag/v2.5.0

Thanks.

Hello Alex,
thanks for your support. I installed v2.5.0 and the conflict is still in place. I do confirm I'm able to change the settings like in the small animation in the changelog. I will try to switch to DEV version of HA and will let you know about the results.

Update...
I installed HA v.2023.2.0b3 and the conflict is now SOLVED.
Anyway, I have another issue now: the details in the Energy panel are not available anymore at month/week/day/hour level stats. Only the totals (energy produced - energy to the net - energy from the net) are shown. It seems like a DB issue. How is this possible?

I installed HA v.2023.2.0b3 and the conflict is now SOLVED.

because in 2.0b3 the same pymodbus version as HA is used. So it's not solved. :)

pymodbus v3.x was used since v2.1:

image

So last version you can use with modbus: without conflict is v2.0.11.

Regarding the issue with the Energy integration, show me a screenshot of what is missing...

Hello Alex, thanks for your support. I installed v2.5.0 and the conflict is still in place. I do confirm I'm able to change the settings like in the small animation in the changelog. I will try to switch to DEV version of HA and will let you know about the results.

Don't do it in production, do it in a test environment, possibly.

Alex, don't know exactly why, but I just installed HA v.2023.2.0b4 and your version 2.5.0 and all seems OK, included energy stats:
as you can see in the attached screenshots, the panel 'Impianto Fotovoltaico' is retrieving data via stock Modbus under configuration.yaml, whereas the panels 'Fimer Inverter #1 and #2' on the right (your addon) are also working and retrieving data OK.
Also, the current and historical data in the Energy panel (picture 2 ) are showing normally.
The new button 'Configuration' in your new version is also working OK.
I can't figure out what has really changed in HA v. 2023.2.0b4 compared to v. 2023.2.0b3

Immagine 2023-01-29 102921

Immagine 2023-01-29 103110

Alex, don't know exactly why, but I just installed HA v.2023.2.0b4 and your version 2.5.0 and all seems OK

What do you mean you don't know why? You installed HA beta. :)

As I explained before: HA Modbus integration has upgraded pymodbus component to the same version I'm using in my component, so there's no conflict anymore.

Happy everything's good now.

HA 2023.2.0 is finally released, and it includes pymodbus 3.1.1, same version as this component.

I just released v2.6.0 that finally solves the conflict.

Thanks for the feedbacks.