forgive me but I can not follow you, I would like to connect via wifi two single-phase 2000l via wifi, you can kindly tell me which post to leave. I do not understand anything anymore
FYI Huawei seems to have changed again the Kiosk integration, I had to re-create mine to access it this morning. The “bug” seems still to be there with the " in the JSON file. And I still don’t know how to elegantly integrate this in HA…
Looking at the JSON file a bit closer they seem to have integrated different types of info this time, at we get a power production chart on top of what was there before.
You can use it like that:
- platform: command_line
command: curl -s https://eu5.fusionsolar.huawei.com/rest/pvms/web/kiosk/v1/station-kiosk-file?kk=YOURTOKEN | python3 -c 'import json,sys;raw=sys.stdin.read();clean=raw.replace(""",r"\"");obj=json.loads(clean);data_obj=json.loads(obj["data"]);print(data_obj["realKpi"]["realTimePower"]);'
name: solar_real_time
unit_of_measurement: 'KW'
scan_interval: 60
command_timeout: 30
- platform: command_line
command: curl -s https://eu5.fusionsolar.huawei.com/rest/pvms/web/kiosk/v1/station-kiosk-file?kk=YOURTOKEN | python3 -c 'import json,sys;raw=sys.stdin.read();clean=raw.replace(""",r"\"");obj=json.loads(clean);data_obj=json.loads(obj["data"]);print(data_obj["realKpi"]["cumulativeEnergy"]);'
name: solar_cumulative
unit_of_measurement: 'KW'
scan_interval: 60
command_timeout: 30
- platform: command_line
command: curl -s https://eu5.fusionsolar.huawei.com/rest/pvms/web/kiosk/v1/station-kiosk-file?kk=YOURTOKEN | python3 -c 'import json,sys;raw=sys.stdin.read();clean=raw.replace(""",r"\"");obj=json.loads(clean);data_obj=json.loads(obj["data"]);print(data_obj["realKpi"]["monthEnergy"]);'
name: solar_month
unit_of_measurement: 'KW'
scan_interval: 60
command_timeout: 30
- platform: command_line
command: curl -s https://eu5.fusionsolar.huawei.com/rest/pvms/web/kiosk/v1/station-kiosk-file?kk=YOURTOKEN | python3 -c 'import json,sys;raw=sys.stdin.read();clean=raw.replace(""",r"\"");obj=json.loads(clean);data_obj=json.loads(obj["data"]);print(data_obj["realKpi"]["dailyEnergy"]);'
name: solar_daily
unit_of_measurement: 'KW'
scan_interval: 60
command_timeout: 30
- platform: command_line
command: curl -s https://eu5.fusionsolar.huawei.com/rest/pvms/web/kiosk/v1/station-kiosk-file?kk=YOURTOKEN | python3 -c 'import json,sys;raw=sys.stdin.read();clean=raw.replace(""",r"\"");obj=json.loads(clean);data_obj=json.loads(obj["data"]);print(data_obj["realKpi"]["yearEnergy"]);'
name: solar_year
unit_of_measurement: 'KW'
scan_interval: 60
command_timeout: 30
Huawei have changed the token too often… this is bad.
Hi Garret,
Since you have the dongle and inverters internal access point I’m guessing you have the non L version of inverter. If that is the case and nothing had changed recently you cannot get the data from the dongle to home assistant.
Possible solutions have been posted by ligeza where an old router was used to bridge the networks or solution by erhug and jeroenmooij using a RPI to connect to the inverter. I managed to get it working by looking at their instructions.
I installed the latest firmware for the inverter and the dongle and I can confirm that I can connect using only the ethernet on port 502 . However I think they added some restrictions there for querying too fast or something… it responds on port 502 and give out data at the beginning, then stops responding. I am going back to wifi repeater method.
Also, when this happens, the entire HA is going unresponsive , which is really annoying.
if I understand you correctly, MODBUS access is now also available through the Smart Dongle?
I have a SUN2000-6KTL-M0 (Software version: V100R001C00SPC122) and Smart Dongle connected with Wifi and Ethernet (Software version: V100R001C00SPC111)
I’ve tried your setup from like a year ago, it worked but gave me some network problems after a while. So im very iinterested if it can be done through the Smart Dongle.
You need firmware 120 on the smart dongle and then it can work on ethernet as well. Maybe you have better luck with that.
Do someone know why my daily production reset will reset at 0:03 instead of 0:00? the system time in the solar panel is correct, the date time on home assistant is also set correctly.
Hi Rafal, so the fix for Modbus-TCP connection through the Ethernet port is not working like they said on huawei forum? Did you have feedback from [email protected]?
Thanks.
After updating smart dongle I didn’t restart inverter, only unplug dongle and plug it again. I saw that port 502 is opened, but didn’t get any info from inverter. I didn’t had time to test it more.
Ok. Whenever you restart the inverter and test the ethernet again, let us know the results, it would be good if you can receive data just through ethernet. BTW: when you connect through ethernet, is the dongle a dhcp client vs the LAN, so it gets an IP from the LAN DHCP server or does it have a fixed IP?
I’m in the process of renewing my solar system, and they proposed me a Huawei solution with these inverters, so I’m checking if they can be integrated with HA natively.
Thanks.
I found wifi dongle compatible with Hassio, anyone who needs the same, Asus N13 N-300 works out of the box and… link with inverter’s AP is finally as good as it should be
Conclusion is that internal wifi in my Rpi 4b is crap
It get an IP for the LAN DHCP server.
so you get an IP from the LAN’s DHCP server and then you’re able to query the dongle’s IP on that IP address? Great. I hope it works the same way on the Ethernet port.
So both wifi and ethernet work in terms of querying the dongle for modbus TCP etc.? That’s what I wanted to know. I was reading it only worked through wifi and that the latest fw fixed it on the ethernet, but I read nobody that thouroughly tested it on the ethernet.
I upgraded and tested. The port is open and I got data. I tested initially only with a few inverter properties, like name , total power and so on and it worked fine. After I added all the queries I was interested on and restarted HA, it hanged. The dongle stopped responding on port 502 and remained that way until I reset HA (I have it on a raspberry and the entire HA becomes unresponsive from modbus not getting information). I don’t know if I was unlucky or they have some limitations about the data you can query or how often you can do it, but I decided to go back to WiFi. In my case, ethernet was not working.
Here is a picture of some curl tests while rebooting the PI. Nothing else changed in the network in this time :
For testing purposes, I created a linux VM on my main PC and had a fresh HA install there only with modbus and noticed the same behavior, so it’s not Raspberry’s fault, the PC had a large number of resources available.
FYI, this is what I am querying from the inverter and meter :
Thanks a lot, so it seems still not solved on the ethernet port. Do you find the wifi reliable enough?
I am using a very small Mikrotik router to connect to the inverter and it’s not great for wifi. It’s a wall distance away from the inverter and the signal is fairly poor. I am considering drilling a hole and putting the router in the fuse box next to the inverter, there the signal is decent. Or use a different router with better wifi reception, but I don’t really want to spend more money on this.
Anyway, sometimes the router disconnects and I have to reconnect it manually. But apart from that, I have no issues. I get the data every 30 seconds from the inverter and as long as the wifi connection is ok, it works flawlessly.
P.S. regarding the firmware, I did let Huawei know that for me it doesn’t work properly and they said they didn’t have any complaints about it yet. If more people get to test this and if this can be reproduced, then they can work on a different firmware.
Anyone found modbus Api for Luna 2000 battery? Want to be able to set charging parameters and read our status.