Huawei Solar, how to change modbus IP?

Hi all,
I have installed GitHub - wlcrs/huawei_solar: Home Assistant integration for Huawei Solar inverters via Modbus integration, and I’ve set it up to connect to the inverter via a wifi router with openwrt.
Now, I’ve been given the installer credentials and I was able to configure the inverter to send modbus tcp over my wifi dongle, so that I could connect to it “directly” (same lan) instead of requiring a secondary router, near the inverter.

Is there a way to reconfigure the integration without reinstalling the integration itself (I suppose I would have to reconfigure all my sensors, in the latter case)? What I need to do, actually, is simply change the IP the integration connects to, from 192.168.200.1 to 192.168.0.170. In other words, where does this integration store its configuration?

Thanks

Hi,
Did you find a way to change the ip afterwards. I’m facing the same problem.

Best regards

No, actually I’ve not switched to lan yet, hopefully will find the time one of next weekends :slight_smile:
However, I opened an issue on the integration repo [Feature Request]: Changing modbus IP · Issue #169 · wlcrs/huawei_solar · GitHub but the author closed the issue, confirming this is unfortunately not supported.

Let’s keep this post updated if one of us find a way to manage this issue.

Okey, I will check the config file you mentionend in the feature request and see if that makes a change. I will also try to see what happens if I remove the integration and add it again in my development/test environment. To see if all sensors get new ids or if they are reused…

Hi @Sundman, have you any news about this topic?

Easiest is to manually change the IP address in /root/config/.storage/core.config_entries. You launch nano core.config_entries, then CTRL+W, search for Huawei and adjust the IP to reflect the new IP, then reboot HA. You’re welcome :slight_smile:

1 Like

Thanks for your suggestion!
AFAIR, I already tried doing that (as suggested here) but this broke my integration. I see that others have had more luck, recently as well. I’m wondering that maybe I did something wrong, will give it another try as soon as I am able to and report to this thread. Thanks again!

I got the idea from the topic you pointed (credits are due). What do you mean by “this broke my integration” ? In my case it was already broken, as the IP had changed. I just changed the IP and restarted (btw, I’m using HA on a RPi4 with HAOS - other cases might be different).

By “it broke my integration” I meant that I was not able to see any data flowing into HA anymore

The easiest way for me was to remove integration and add it back. You will not lose history data, as the entity id will be the same.
Only in newer days this could be a problem, as the enties may get new name in the language of your installation, then you will have more work to do.