Anyone experience with connecting Afore solar inverter?

Hello,
Module is coming to me next week and all I know that it has wifi connection with build-in antenna.
Did anyone tried to integrate Afore solar inverter into HA?

Iā€™m also interested in such connection. I have afore inverter installed and connected to Solarman application

Hello.
someone managed to integrate this inverter

Hi
Do you still looking for it?
I have deye inverter but all those Chinese inverter looks to have similar interface. I found that Solis Inver method works.
It contains node red flow that scraps data from little either that your inverter create in your Network. It has yourinverterIP index.html or stats.html you should search for it.

Better late then never ā€¦ I use the Afore solar inverter with succes now for a couple of years in Home assistant.

  1. Find your token

http://af.lewei50.com/api/v1/user/Login?username=xxxxxx&password=123456

With your token you can get your data:

http://af.lewei50.com/api/v1/user/SiteList?token=yourowntokenhere

  1. Create a sensor in HASSIO
  - platform: rest
    resource: http://af.lewei50.com/api/v1/user/SiteList?token=yourowntokenhere
    name: Power Now
    value_template: '{{ value_json.data.power }}' (or any other you need)
    unit_of_measurement: "W"
    scan_interval: 30

Thatā€™s basically it :sunny: .

Hello,
Has anybody had success using modbus with the Afore inverter, or does anybody know if itā€™s a propriety protocol on the rs485 port ?

1 Like

My (Afore) is just installed but is sending data to solarmanpv, Iā€™m waiting for grid meter exchange and when will be fully starded for sure my AIM is integrate this to HASS. Iā€™m keen to do this firstly via lan.

Please see what Iā€™ve got from Afore supplier.
https://drive.google.com/drive/folders/1LxNUi-y0JIC-Z_EjoPaQIF0VjY4IcEDf?usp=sharing

News? I need info for integration with my home assistant

1 Like

I wait too for integration my Afore Aton 8kW (Model: BNT008KTL) to Home Assistant ā€¦

Somebody can help ?

I got myself a Afore inverter, and got the same XLS file as you. However im pretty new to Modbus.

Are you able to connect directly to the wifi-dongle (ie with QModMaster)? I have ordered a Modbus-to-ethernet converter, and the plan is to run this as well as the dongle that was supplied with the inverter.

Hi Mike,

I am a new to HA and still learning. I have Afore solar panels and have tried to create a sensor (helper?) but I seem to get no data. Would you mind giving a little more detail on this please? Probably sounds like a stupid question but we all start somewhere.

Also appreciate this thread is quite old so sorry for digging up an oldun.

I am running HA as a container on a Unraid box. Access my solar panel using af.lewiei50, can get the token and its shows valid data.

@darrysmi do you get any data back when you simply try the url in a browser with your own ā€˜sitelistā€™ number and ā€˜tokenā€™? Perhaps I was incompletly before with my post but you need both.

http://af.lewei50.com/api/v1/site/overview/yourownsitelistnumber?token=yourowntoken

Token can be found like this:

http://af.lewei50.com/api/v1/user/Login?username=xxxxxx&password=123456

Sitelist can be found like this:

http://af.lewei50.com/api/v1/user/SiteList?token=yourowntoken

The ID here is your own sitelist number

I have a USR-TCP232-306 to access the RS485 port on my Afore inverter using modbus. The registers in the spreadsheet 211208-Afore_T6_communication_protocol linked above work for my AF3.6K-SL (e.g. read register 507 with function code 4 to see the mains voltage). The spreadsheet doesnā€™t include the battery registers that start at 2000 (e.g. battery charge is 2002).

Iā€™m not using home assistant, but if someone wants the details to try integrating it then let me know. Iā€™ve posted some graphs using cacti on reddit:
https://www.reddit.com/r/uksolar/comments/17j1q1t/battery_storage_in_the_autumn/

1 Like

hi, I have a new afore af6k sl inverter with lsw-5 wifi dongle. I canā€™t register on the site http://af.lewei50.com/
on the ā€œMonitor SNā€ item the serial number of the dongle or inverter is not recognised, I think because old inverters have a different monitor.
I wrote to solarman to get API credentials but they tell me that due to update problems they canā€™t provide them (??) I canā€™t in any way extrapolate data from this inverter, I managed to read the production with the ā€œscrapeā€ function snapshot from the IP address of the wifi stick, but Iā€™m interested of the battery percentage.
help please

@miviho Thanks for coming back.

I can get the token and the site list ok and can view the detail on http://af.lewei50.com/api/v1/user/SiteList?token=yourowntoken

I am still feeling my way around HA, I think I have created a sensor by adding

 - platform: rest
    resource: http://af.lewei50.com/api/v1/user/SiteList?token=yourowntokenhere
    name: Power Now
    value_template: '{{ value_json.data.power }}' (or any other you need)
    unit_of_measurement: "W"
    scan_interval: 30

into configuration.yaml but it shows no detail in the dashboardā€¦ Have a feeling Iā€™m not doing it right.

D

Actually after tinkering a bit, I sussed itā€¦

sensor:
  - platform: rest
    name: "Current Power"
    resource: "https://af.lewei50.com/api/v1/user/SiteList?token=xxxxxxxxxxxxxxxxx"
    value_template: "{{ value_json.data[0].power }}"
    unit_of_measurement: "W"
    scan_interval: 30

It was the value template that I had wrong.

to also add, for anyone else trying to integrate Afore panels using the af.lewei50 api. my working sensors are

sensor:
  - platform: rest
    name: "Current Solar Power"
    resource: "https://af.lewei50.com/api/v1/user/SiteList?token=xxxxxxxxxxxx"
    value_template: "{{ value_json.data[0].power }}"
    unit_of_measurement: "Wh"
    device_class: energy
    state_class: measurement
    scan_interval: 30
  - platform: rest
    name: "Solar Energy Today"
    resource: "https://af.lewei50.com/api/v1/user/SiteList?token=xxxxxxxxxxxx"
    value_template: "{{ value_json.data[0].energyToday }}"
    unit_of_measurement: "kWh"
    device_class: energy
    state_class: total_increasing
    scan_interval: 30

This is added to configuration.yaml and shows two sensors.

Current Solar Power and Solar Energy Today.

Adding the device class of energy allows the solar production to be added to the energy dashboardā€¦

Hope this helps someone.

Could you tell more how you physically connected to the RS485 port of the inverter? Did you not connect the Aforeā€™s wifi module anymore?