Coder Social home page Coder Social logo

homeassistant-fusionsolar's Introduction

Home Assistant FusionSolar Integration

hacs_badge

Integrate FusionSolar into your Home Assistant.

The integration is able to work with Kiosk mode, or with a Northbound API / OpenAPI account, see below for more details.

Installation

This integration is part of the default HACS repositories, so can add it directly from HACS or add this repository as a custom repository in HACS.

When the integration is installed in HACS, you need to add it in Home Assistant: Settings → Devices & Services → Add Integration → Search for FusionSolar.

The configuration happens in the configuration flow when you add the integration.

Kiosk

FusionSolar has a kiosk mode. The kiosk is a dashboard that is accessible for everyone that has the url. The integration uses a JSON REST api that is also consumed by the kiosk.

The integration updates the data every 10 minutes.

In kiosk mode the "realtime" data is not really realtime, it is cached at FusionSolars end for 30 minutes.

If you need more accurate information you should use the API mode.

Northbound API / OpenAPI

You will need a Northbound API / OpenAPI account from your Huawei installer for this to work.

If you know your installer

Please pass them the following guide:

How to create a Northbound API Account

They will need to grant the following permissions:

  • Plant List (Select appropriate plant/company)
  • Real Time Plant Data (Select All)
  • Hourly, Daily, Monthly and Yearly Plant Data (Select All)
  • Device List
  • Real Time Device Data (See Below)
  • Daily, Monthly and Yearly Device Data (See Below)

Device Data

For each of the Device Data permissions, there is a choice of the following device types. Ensure your installer gives you access to each device type, and all data under each device type, based on your installation:

  • String Inverter
  • Residential Inverter
  • Battery
  • ESS
  • Power Sensor
  • Grid Meter
  • EMI

If you know your current installer, but would like to manage the devices on your own

There is a plant transfer process, which keeps all data. This can be found under Plants → Plant Migration in the installer interface. You will need your own installer account, and you will need to supply the losing installer with your company name and code.

This can be found here: System → System → Company Management → Company Info

If you do not know your installer

There is a process to create your own installer account, but there are caveats:

  • It will lose all history in FusionSolar for your plant.
  • If you are not comfortable resetting devices and/or possibly losing access entirely, please stick with the Kiosk option or engage a new installer to take control of your plant.
  • Please contact Huawei Fusion Solar directly for details.

API testing

How to login to the API

An example of the API url is: https://intl.fusionsolar.huawei.com/thirdData/ where intl is the prefix on your own FusionSolar login page.

The Northbound API has very strict rate limits on endpoints, as well as a single login session limit. If you wish to do your own testing or development alongside running this integration, it is recommended to get your installer to create 2 identical accounts.

If you try to use the same account in Postman and the integration, you will experience issues such as constant directions to log back in using Postman, returned data not being complete etc.

Exposed Devices

The integration will expose the different devices (Residential inverter, String inverter, Battery, Dongle, ...) in your plant/station.

Realtime data

The devices that support realtime information (getDevRealKpi api call):

  • String inverter
  • EMI
  • Grid meter
  • Residential inverter
  • Residential Battery
  • Power Sensor
  • C&I and Utility ESS

The exposed entities can be different per device. These are documented here. But the names are pretty self-explanatory.

The realtime data is updated every minute per device group. As the API only allows 1 call per minute to each endpoint and the same endpoint is needed for each device group. The more different devices you have the slower the updates will be. See Disabling devices

Total yields

The integration updates the total yields (current day, current month, current year, lifetime) every 10 minutes.

Integration with the Energy dashboard

If you have not set up the Energy dashboard in HomeAssistant, you can select it from the sidebar and step through the wizard. If you have configured it previously and want to change the settings you can access from the sidebar by clicking on Settings → Dashboards.

As the name suggests, the dashboard requires sensors with units of energy as input (i.e. kWh), not power.

The first thing to configure is the electricity grid:

  • Grid consumption is given by sensor.xxx_reverse_active_energy
  • Return to grid is given by sensor.xxx_active_energy_forward_active_energy

For solar panels, the sensor is sensor.xxx_total_current_day_energy.

Finally the battery needs to be configured:

  • Battery energy in is given by sensor.xxx_charging_capacity
  • Battery energy out is given by sensor.xxx_discharging_capacity

FAQ

Where can I find the kiosk url?

  1. Login to the FusionSolar portal
  2. Select your plant in the overview (Home → List view → Click on your plant name)
  3. You will be redirect to the "Monitoring" page
  4. Click on the "Kiosk" button in the top right corner
  5. Enable the "Kiosk mode" in the popup if needed
  6. Copy the url from the browser

If you don't see the kiosk button, you are probably logged in with an installer account.

I am using the kiosk mode, but the data is not updating

First check that the Kiosk url is still working. The url is valid for 1 year. So you will need to update the kiosk url every year.

Energy Dashboard: Active Power not showing in the list of available entities

Active Power is the current power production in Watt (W) or kilo Watt (kW). The Energy dashboard expects a value in * kWh*.

Your plant, inverter(s), batteries, ... expose a lot of entities, you can see them all: Settings → Devices & Integrations → Click on the "x devices" on the Fusion Solar Integration. Click on the device you want to see the entities for.

What do all entities mean?

As I don't own an installation with all possible devices this integration is mostly based on the Northbound Interface Reference.

The entity names are based on the names in the interface reference.

Disabling devices / plants / stations

If you have a lot of devices / plants / stations wherefore you don't want to use the data. You can disable them through the interface:

Settings → Devices & Integrations → Click on the "x devices" on the Fusion Solar Integration. Click on the device / plant / station you want to disable. Click on the pencil icon in the upper right corner. Switch off "Enable device".

This can speed up the updating of the other devices. Keep in mind that a call is made per device type. So if you have multiple devices from the same time you need to disable them all to have effect.

You will also need to restart Home Assistant.

Can I work with the API myself?

Yes. There is a [Postman] Collection available. You can import it in Postman and start working with it. The collection is available under docs/postman_collection.

You will need to create an environment in Postman with the following variables:

  • USERNAME, your Northbound API / OpenAPI username
  • SYSTEMCODE, your Northbound API / OpenAPI password
  • URL, the url you will query

I need to change the Kiosk URL

The Kiosk URL is valid for 1 year. After that you will need to update the URL. At this point there is no way to update the URL without re-adding the integration. This can result in data los.

You can work around this, but this is not recommended and is at your own risk:

Open the file .storage/core.config_entries in the Home Assistant directory.

There will be an entry like below"

  {
  "entry_id": "8cd2320a2969e84XXX",
  "version": 1,
  "domain": "fusion_solar",
  "title": "Fusion Solar",
  "data": {
    "kiosks": [
      {
        "name": "Foo",
        "url": "https://eu5.fusionsolar.huawei.com/pvmswebsite/nologin/assets/build/index.html#/kiosk?kk=XXX"
      }
    ],
    "credentials": {}
  },
  ...
}

Update the url. And restart Home Assistant.

How can I verify my Northbound API / OpenAPI credentials?

You can verify your credentials by doing a curl call.

curl --location 'https://eu5.fusionsolar.huawei.com/thirdData/login' \
--header 'Content-Type: application/json' \
--data '{
    "userName": "XXX",
    "systemCode": "YYY"
}'

Check if you need to alter the base hostname https://eu5.fusionsolar.huawei.com. And replace XXX with your username and YYY with your password.

The response should look like:

{
  "data": null,
  "success": true,
  "failCode": 0,
  "params": {},
  "message": null
}

homeassistant-fusionsolar's People

Contributors

andershoglund avatar aretokas avatar arohl avatar attaxia avatar catalinbordan avatar giorgioughini avatar gyuris avatar olibos avatar tijsverkoyen avatar wrt54g avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homeassistant-fusionsolar's Issues

Cannot find kiosk.. :(

Hi, I know this is not really an issue but I also dont know how to ask in a better way so here goes.

I can't find Kiosk.. Please help

EDIT: Solved, my account was an installers and I just added another account which was solely an owner

Error when instaling

Hello
I try to install in "Kiosk" mode
No error received but no entity created
In the logs:
Logger: homeassistant.setup
Source: setup.py:320
First occurred: 7:57:50 PM (1 occurrences)
Last logged: 7:57:50 PM

Unable to prepare setup for platform fusion_solar.sensor: Platform not found (cannot import name 'UnitOfElectricCurrent' from 'homeassistant.const' (/usr/src/homeassistant/homeassistant/const.py)).

Anybody can help me ?
Thank you

Grid Data & load data are missing

Hi. I'm using kiosk and only get 1 device with 5 sensors (realtime power, and 4 totals) It's possible to obtain load and grid data?

How to use it?

Dont know how to use this. I have Fusion solar in my browser, but cant see anything like the KIOSK thing u refere to.
Installation guide could be better.

Energy Dashboard - "last_reset" is missing

Hello,

I am using the following entities for the Home Assistant Energy Dashboard:

  • sensor.power_sensor_reverse_active_energy
  • sensor.power_sensor_active_energy_forward_active_energy
  • sensor.battery_discharging_capacity
  • sensor.battery_charging_capacity

Unfortunately, the values do not seem to be interpreted correctly. The following message is displayed in the dashboard settings:

"The following entities have state class "measurement", but "last_reset" is missing: sensor.power_sensor_reverse_active_energy
sensor.power_sensor_active_energy_forward_active_energy"

Is it possible to add this "last_reset" attribute or what can be the reason that the calculation in the Energy Dashboard does not work correctly?

Realtime Power missing

Hello. I’ve configured with OpenAPI credentials - works, but there is no entity with Realtime Power to check production right now.
How much entities it should generate? I got only 4 - production daily, monthly, yearly, all time.

Much appreciate Your brilliant work, regards.

Huawei Kiosk invalid data, positive glitch.

Last night Huawei Kiosk presented a new type of invalid data, a positive glitch. We have seen negative glitches every night before, this has been handled and filtered out from HA. See attach history graphs where the new glitch is marked in red. Handled glitches are marked green. Another problem is that the fix for negative glitches causes the positive glitch to become the new cumulative energy level, until production catches up. Energy statistics tab looks like crap.

N.B. This was observed with the old kiosk implementation, but it should affect this new implementation as well.
Not sure how to fix/handle this new behaviour. Other than trying Open API or MODBUS/TCP, leaving this crap kiosk data behind. Question is if this is a kiosk only problem, or if it is the same on one or all of the other ways?
/A

Screenshot 2022-10-31 at 13-22-53 History – Home Assistant

OpenAPI Issue

Latest version seems to cause issues when using OpenAPI

Unexpected error fetching FusionSolarOpenAPIStationYearKpi data: 'NoneType' object is not subscriptable
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 225, in _async_refresh
self.data = await self._async_update_data()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 181, in _async_update_data
return await self.update_method()
File "/config/custom_components/fusion_solar/sensor.py", line 216, in async_update_station_year_kpi_data
response = await hass.async_add_executor_job(api.get_kpi_station_year, station_codes)
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/fusion_solar/fusion_solar/openapi/openapi_api.py", line 94, in get_kpi_station_year
return response[ATTR_DATA]
TypeError: 'NoneType' object is not subscriptable

OpenAPI set battery mode

Hi, is it possible to set parameters trough the api in ha?
Like example the battery charge/discharge mode.

Can't use battery power in Energy Dashboard

I have a plant with battery and I can see battery data in main dashboard, but can't use battery power in Home Assistant Energy dashboard. The entity is sensor.battery_charge_discharge_power.
I'm using the last version of integration with an OpenAPI account.

Dashboard battery data:
image

When I try to add battery energy I can only select charging and discharging capacity, but not power

image

Home Assistant help suggests that entity is not defined correctly https://www.home-assistant.io/more-info/statistics/. I can guess from entity icons that the entities are defined in different way, maybe there is a way to change entity type to "energy" type.

Thank you for your work and your help

Energy Dashboard configuration

Hello all,
I was seeking some help regarding the energy dashboard configuration upon which I'm struggling a few days now.

Hardware setup

My system include:

  • One inverter, linked to two strings
  • One meter, measuring current incoming and outgoing from the grid
  • One battery, storing energy not immediately auto-consumed

Software setup

In the Energy dashboard, I put (json slightly edited for brevity):
{ "stat_energy_from_grid": "sensor.meter_1_reverse_active_energy", "stat_energy_to_grid": "sensor.meter_1_active_energy_forward_active_energy", "stat_energy_from_solar": [ "sensor.inverter_1_mppt_1_dc_total_yield", "sensor.inverter_1_mppt_2_dc_total_yield" ], "stat_energy_from_battery": "sensor.battery_1_discharging_capacity", "stat_energy_to_battery": "sensor.battery_1_charging_capacity" }

Everything works well with this settings, as I do not compute energy twice, a thing that would happen using the inverter power into the stat_energy_from_solar field....

Issue

In the energy dashboard, I am using several statistics which are total, and the battery statistics that go to zero each day at midnight.
When I first added HomeAssistant-FusionSolar integration, HA use the first datapoint value as zero-point, meaning that each midnight I get a drop in the statistics, and during the day, the battery in the energy dashboard is meaningless...
image

See also:
image

Similar to: #18

Anyone has some advice on how to configure it?
Thank you

Error407 ACCESS_FREQUENCY_IS_TOO_HIGH

custom_components.fusion_solar.device_real_kpi_coordinator
Source: helpers/update_coordinator.py:168
Integration: Fusion Solar (documentation, issues)
First occurred: 9:05:31 AM (1 occurrences)
Last logged: 9:05:31 AM

Error fetching FusionSolarOpenAPIDeviceRealKpiType data: Error fetching data: Access frequency to high. failCode: 407, message: ACCESS_FREQUENCY_IS_TOO_HIGH

I used OpenApi mode
Server: https://intl.fusionsolar.huawei.com/

Error doing job: Task exception was never retrieved

Hi,
I can see that I had some errors in the last night, probably because the server of Huawei was offline, or network issues.

first errror:

Logger: custom_components.fusion_solar.sensor
Source: helpers/update_coordinator.py:182
Integration: FusionSolar ([documentation](https://github.com/tijsverkoyen/HomeAssistant-FusionSolar), [issues](https://github.com/tijsverkoyen/HomeAssistant-FusionSolar/issues))
First occurred: 04:00:58 (1 occurrences)
Last logged: 04:00:58

Error requesting FusionSolarKiosk data: HTTPSConnectionPool(host='region02eu5.fusionsolar.huawei.com', port=443): Max retries exceeded with url: /rest/pvms/web/kiosk/v1/station-kiosk-file?kk=XXXXXXXXXX (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f49a3dcb7c0>: Failed to establish a new connection: [Errno 111] Connection refused'))

second error:

Logger: homeassistant
Source: custom_components/fusion_solar/fusion_solar/energy_sensor.py:67
Integration: FusionSolar (documentation, issues)
First occurred: 04:10:58 (21 occurrences)
Last logged: 07:30:59

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 182, in _handle_refresh_interval
    await self._async_refresh(log_failures=True, scheduled=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 330, in _async_refresh
    self.async_update_listeners()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 135, in async_update_listeners
    update_callback()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 390, in _handle_coordinator_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 566, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 607, in _async_write_ha_state
    state = self._stringify_state(available)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 572, in _stringify_state
    if (state := self.state) is None:
  File "/config/custom_components/fusion_solar/fusion_solar/energy_sensor.py", line 67, in state
    return float(current_value)
ValueError: could not convert string to float: 'unavailable'

Probably we need to avoid convert to float the state: unavailable
I'm not a programmer, but probably should be like:

              if realtime_power == '0.00':
                   _LOGGER.info(
                       f'{self.entity_id}: not producing any power, so not updating to prevent positive glitched.')
                   if current_value == 'unavailable':
                        None
                        return float(current_value)

Division by zero

I have 3 optimizers, an inverter and a power sensor entitiies found by the integration, but only 1 of the optimizers entities is showing data, the rest of entities are just not even displayed when I try to add them in the dashboard.

The error I see in the HASS log is the one I pasted below.

Logger: custom_components.fusion_solar.device_real_kpi_coordinator
Source: custom_components/fusion_solar/device_real_kpi_coordinator.py:47
Integration: FusionSolar (documentation, issues)
First occurred: 22:04:01 (1 occurrences)
Last logged: 22:04:01

Unexpected error fetching FusionSolarOpenAPIDeviceRealKpiType data: integer division or modulo by zero
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 239, in _async_refresh
self.data = await self._async_update_data()
File "/config/custom_components/fusion_solar/device_real_kpi_coordinator.py", line 47, in _async_update_data
index_to_fetch = self.counter % len(device_ids_grouped_per_type_id)
ZeroDivisionError: integer division or modulo by zero


Also note the API requests is actually showing data in the response when requesting to getDevRealKpi for the inverter and the power sensor, but when asking the API to get data for the optimizers it returns empty in the dataItemMap as you can see below. That cannot be because of rights, because as mentioned above, when trying to configure the fusion solar integration, it actually returns data for 1 of the optimizers only which is very confussing....using the API it returns data for all but optimizers....Using the HASS integration only shows data for 1 of the optimizers and nothing for the rest of entities and instead it shows the division by zero error. I guess that should be easy to debug if you know the code...Maybe a new parameter was added or the data format of one of them is now different and causing the script to stop working as it finds that error.
{
"data": [
{
"devId": ZZZZ,
"dataItemMap": {},
"sn": "null"
},
{
"devId": YYYY,
"dataItemMap": {},
"sn": "null"
},
{
"devId": XXXXX,
"dataItemMap": {},
"sn": "null"
}
],
"failCode": 0,
"message": null,
"params": {
"currentTime": 1679433191233,
"devIds": "XXXX, YYYY, ZZZZ",
"devTypeId": 46
},
"success": true
}


Can't find FusionSolar in "add Integration"

I have set up HACS over SSH terminal and i follow your installation description.
As you see in my screenshots, but I'cant find "FusionSolar" in the list. Did I miss something?
Bildschirmfoto 2023-02-23 um 09 33 58
Bildschirmfoto 2023-02-23 um 09 33 52

Configuration flow does not appear

After installing the integration through HACS the "config flow" does not appear. I did test it on two instances but no setup flow appeared. Is there a way to do this by config file or to trigger the configuration again?

Env:
Home Assistant 2022.11.5
Frontend 20221108.0 - latest

..running as a container.

HA log says nothing special:

2022-12-03 21:29:33.273 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration fusion_solar which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

Fusion Solar integration appears in HACS:
image

I hope you can help me out.

Best,
Michel

Realtime not displayed

I have integration with kiosk and works properly, but only entity “real time power” don’t be in energetic dashboard.
I’ve tried to create a template that read reltimePower data but it’s not work

template code:

template:

  • sensor:
    • name: power_solar
      #state: "{{ (states(‘sensor.my_realtime_power')|float)}}"
      state: "25"
      unit_of_measurement: kWh
      device_class: energy
      state_class: measurement
      last_reset: '1970-01-01T00:00:00+00:00'
      unique_id: power_solar

This template can be added on dashboard energy but display 0 value

Question - Template - Status

Hello @tijsverkoyen ,

Since #22 , my templates shows the status code instead of the readable state.
Do you know how I can "translate" those magic numbers?

{{states('sensor.inverter_1_inverter_status')}}

get: 512
desired: Grid connection

ACCESS_FREQUENCY_IS_TOO_HIGH still not fixed

Logger: custom_components.fusion_solar.device_real_kpi_coordinator
Source: helpers/update_coordinator.py:168
Integration: FusionSolar (documentation, issues)
First occurred: 21 grudnia 2022 11:52:41 (149 occurrences)
Last logged: 10:59:46

Error fetching FusionSolarOpenAPIDeviceRealKpiType data: Error fetching data: Access frequency to high. failCode: 407, message: ACCESS_FREQUENCY_IS_TOO_HIGH

while I can see the Skipped call due to rate limiting in action my entities are still becoming unavailable...

Unexpected error fetching FusionSolarOpenAPIStationYearKpi data: Access frequency to high. failCode: 407, message: ACCESS_FREQUENCY_IS_TOO_HIGH

Integration does not work with the Huawei iSitePower-M

Greetings!

When trying to use this integration with the Huawei iSitePower-M it's able to pick up the device(s), but none of the sensors pull through.

I had a bit of a dig at the NBI and the endpoints it uses. The device ID's don't seem to yield data, so I suspect the issue is upstream (with Huawei) and not with this integration. Followed their documentation - got auth working, then queried for devices, etc. It's just the sensor data that doesn't have results. Suspect their NBI isn't 'complete' when it comes to this device (for now). Using Huawei's Fusion Solar website does yield results though - same with the mobile app, just not the NBI (maybe I'm doing something wrong?).

If you're keen on playing around with iSitePower-M NBI integration, let me know, and I'll give you access to it's data on Huawei's Fusion Solar website (the NBI). The iSitePower-M is another all-in-one inverter from Huawei, presumably their next generation solution.

Cannot import name 'UnitOfElectricCurrent'

Please could you help me? I added Fusion Solar integration (via HACS), using Kiosk mode, restarted HA, but I am getting following error:

Logger: homeassistant.setup
Source: setup.py:338
First occurred: 6:44:03 PM (1 occurrences)
Last logged: 6:44:03 PM

Unable to prepare setup for platform fusion_solar.sensor: Platform not found (cannot import name 'UnitOfElectricCurrent' from 'homeassistant.const' (/usr/lib/python3.10/site-packages/homeassistant/const.py)).

Thank you very much.

Entities reporting "unknown"

Hi!
I just finished setting up the integration, everything worked fine. However, every entity reports "unknown".
image
Any ideas as to why this might happen?
Thanks!

Api configuration

I installed the integration and accessed with the API credentials but no "solar" entity was created. Do I have to do anything else for correct operation? Before I used the Kiosk version and it worked well. Thanks

No stations found in OpenAPI

I successfully added FusionSolar integration in HAACS and Settings > Integrations. Selected OpenAPI, typed in username and password (got those from Huawei support while creating OpenAPI access). Authorization is also successful, but I don't see services or entities being made.

Error log:
homeassistant.exceptions.IntegrationError: No stations found in OpenAPI

I tried sending API requests using Postman. Authorization works; I receive XSRF-TOKEN. When I use the token to getStationList, I'm getting only:

{
    "data": [],
    "failCode": 0,
    "message": null,
    "params": {
        "currentTime": 1668952257900
    },
    "success": true
}

The data parameter is empty - I'm not getting the stationCode back.

Am I doing something wrong, or is this for Huawei to fix?

Real Time Power value in Kiosk mode not updating after version 2.3.0 upgrade

The Real Time Power entity is not updating its value (every 30 minutes) in Kiosk mode after the upgrade to version 2.3.0.
The new entity value is taken only after a system restart.
I am currently running the fusion solar integration(version 2.3.0) on the home assistant core version 2023.1.0. The previous integration version was working perfectly.
The other fusion solar entities (total_current_day_energy...) update their values correctly.
Unfortunately the system logs do not show any relevant message.

Open Api Credentials error

Hi, I can log via web , with my open api credentials, but on home assistant config give me error.

Any ideas?

I try too adding region01, but no success.

Thanks

Unknown data almost everywhere

Hello, i will try this as best as I can.

I got the OpenAPI credentials, installed the plugin, put the information in and I can see 3 devices listed:

  • My name - Station
  • SerialNumber - Residential Inverter
  • Power Sensor - Power Sensor

If I click in the device Station, I can see information such as Total Current Day Energy with values that matches the app, so that one works good.

If I click in any of the other devices, lets say the inversor, all variables are set as unknown (Active power, GridAB voltage.....)

I already installed the plugin and uninstalled it, also waitted a couple of hours before opening a ticket to see if it was because it was still fetching information or something like that but its still happening.

I enabled the logs and I have this information:

FusionSolarOpenAPIDeviceRealKpiType Skipped call due to rate limiting. Wait for 189.0 seconds. 0/2 FusionSolarOpenAPIDeviceRealKpiType Skipped call due to rate limiting. Wait for 126.0 seconds. 1/2 FusionSolarOpenAPIDeviceRealKpiType Skipped call due to rate limiting. Wait for 63.0 seconds. 2/2

I've checked the closed tickets and seems somewhat similar to issue #29 but i don't know.

Is there anything I can do, or that I am doing wrong?

I would apreciate the help, and also, thanks a lot for creating this addon!

No entiteiten in HA

I have installed the fusion solar integration via HACS and i am running HA in a docker.
The kiosk mode worked fine.
Now i finely got the api account from northbound through my installer. They have confirmed that its should be oke.
Via postman i can login in. https://intl.fusionsolar.huawei.com/thirdData/
I am new to postman. If i want the station list i get every time, user needs to re login.
(maybe do to 1 account?).
After deleting the kiosk mode and reinstall the integration with the supplied info from my solar installer. its says oke but then nothing happens.
no entiteiten.
There is nothing else what i can configure. or do i need to install some more or activate anything

FUSION SOLAR

Hi sorry for my bad english. I translate what I write in italian..... I try to install fusion solar in home assistant, but you say that if i go to fusion settings i can found battere and something else, but I found only instant power and also 4 other value please im a principiant can you help me thanks

Getting the most out of this great add-on

I have to say that I have been overwhelmed by all the data provided by this add-on. What I am looking for is a guide showing what the key values mean and how to use/monitor within homeassistant. I don't think such a thing exists but I am happy to write one provided I can can the help I need to explain some of the things. One of the first things I would like to do is create a visualisation like the one in the official app i.e.

IMG_2661

I think I have figured out where to get the battery data from (create two template sensors from battery_1_charge_discharge_power) but have a number of further questions. I don't think anyone would disagree that a document showing ways to use the integration in homeassistant is a good idea, so my question is what is the best way to ask questions of the community on my journey? The answer of course could be this issue ;-)

getStationList deprecated?

I am in Australia and using the API at https://au5.fusionsolar.huawei.com/thirdData/

The integration authenticates fine but fails when it calls getStationList. The log says

Retrieving the data for https://au5.fusionsolar.huawei.com/thirdData/getStationList failed with failCode: 401, message: None

I have a document from Huawei titled Northbound Interface Reference- V6(SmartPVMS) and dated 19th January 2023 which says:

https://Domain name of the management system/thirdData/getStationList is about to go offline

and that the new function is

https://Domain name of the management system/thirdData/stations

Using Postman, I can confirm that getStationList doesn't work (with not surprisingly the same error code as the integration reports) and that stations does return a plantCode.

Is this a uniquely Australian situation? Or are they perhaps trying the updated API on us first?

Daily Solar Energy sometimes exceeds the day and is displayed in the Energy Dashboard

I'm using this Integration and the https://github.com/wlcrs/huawei_solar Integration. The last one can give me realtime data, but for some reason I can't get the actual Solar Production since I added a Home Battery. So I have been using this Integration which I discovered recently. It's a lot easier to setup and monitors perfectly the app features.

But when I display the data in the energy Dashboard I sometimes (not every day) get weird results. See attachments:
Energy Dashboard:
Screenshot 2023-03-23 at 19 24 19

Grafana details:
Screenshot 2023-03-23 at 19 26 18

It looks like I get data after midnight which is counted for the next dat already an it adds a peak in the dashboard. Do you have any idea if there is something wrong with the timestamps? Or might it be cause by the fact that the API limits the amount of calls and therefore I can get data too late.

Is there anybody else having the same issue?

Thanks in advance,
Alain

Datapoints overflow ;)

Hi,
Just got this working through the API connection.
It works very well, perhaps too good...

Is there a way to reduce the number of datapoints?
For instance I get from "PV1 input current" to "PV9 input current" with subs on PV1 and 2 (PV10 to PV19)

But I have just two strings on inverter-1 and one string on inverter-2.

image

Can't add inverters active power to the energy dashboard as a solarproduction unit

Dear Tijs,

First of all thanks for the very nice add on. Just what I was looking for. One little issue I have. I have imported with API 5 devices and 136 enteties. All works very well and I can make graphs with my inverters production as well.
But if I want to add my inverters production to the energy dashboard as a solar production unit I don't get the sensor.2101073803hvk7000592_active_power in the dropdown menu.
Any idea what I'm doing wrong?

Kind regards,
Gregory

Error doing job: Task exception was never retrieved

Hi,
Same as #60.
I just want to let you know, it did not fix it. Your changes in the code it should be before line no 67, no?

 if current_value == 'unavailable':
                    _LOGGER.info(
                        f'{self.entity_id}: not available.')
                    return

New API calls

Hi

I came across this post #68 (comment) and I am working on a similar integration for the Homey platform (https://github.com/reyntjensw/Homey-FusionSolar), where I am running into the same issue.

Some users are not able to use the plugin, because their account is to new.

What I was wondering is do you already have a use case for the api call ** getDevHistoryKpi**, I am not finding any examples online nor in the code base. Or did you get any feedback from Huawei?

Thanks in advance.

Daily warning: fusion_solar has state class total_increasing, but its state is not strictly increasing

My log shows this warning on a daily basis:

[..] from integration fusion_solar has state class total_increasing, but its state is not strictly increasing.

 Logger: homeassistant.components.sensor.recorder
Source: components/sensor/recorder.py:385
Integration: Sensor (documentation, issues)
First occurred: 06:10:10 (2 occurrences)
Last logged: 06:10:10

    Entity sensor.XXXX_total_current_month_energy from integration fusion_solar has state class total_increasing, but its state is not strictly increasing. Triggered by state 295.99 (304.48) with last_updated set to 2023-01-27T23:08:00.312625+00:00. Please report it to the custom integration author.
    Entity sensor.XXXX_total_lifetime_energy from integration fusion_solar has state class total_increasing, but its state is not strictly increasing. Triggered by state 2675.34 (2683.83) with last_updated set to 2023-01-27T23:08:00.312916+00:00. Please report it to the custom integration author.

And indeed, every day minutes after midnight I see the state drops for one hour and come back to the exact state before.

(Please note the time line; I am currently traveling 6 hours ahead of the HA instance at home)

image

And a wider span, showing daily drops between (minutes after) midnight and 1 am:
image
(Please note my +6 hours timezone difference when making the screenshot)

I am using integration version 2.3.1
Home Assistant 2023.1.7
Supervisor 2023.01.1
Operating System 9.4
Frontend-versie: 20230110.0
HACS: 1.30.1

I can imagine this is not related to your integration but the source OpenAPI (FusionSolar / Huawei). Can you please advise?

Wrong unit of measurement for "Meter realtime power"

Hello and thanks, really thanks, for your hard work.
I would like to inform you that the unit of measurement of my meter is wrong in HA. Is this something that can be corrected with a PR or it's a Huawei issue?
I'm using OpenAPI integration.
Thank you.
Screenshot attached.

Huawei portal
Home Assistant

Thank you again, I do really appreciate your work.
Giorgio

Fusion solar

Ho installato la guida come da voi suggerito con kiosk ma non riesco a vedere la carica delle batterie come mai?

Using API doesn’t work properly

After many mails with Huawei support to have all data available through API, still I only see 10 entities. Huawei claims all data has been enabled to be read. Nevertheless, I don’t get the data to see that I would like to see (for example my battery level).

no kiosk ??

?? i dont know where else to ask but in here.
Skærmbillede 2023-01-13 152706

Crossed entity names on smart meter

Hi!
I noticed the entities "Active energy (forward active energy)" and "Reverse active energy" have their names crossed. I can confirm this by comparing the actual values from the meter display.
HA entity reports the energy value I pulled from the grid as Reverse active energy. Shouldn't this be the amount I returned to grid from PV?

20230217_202252

Screenshot 2023-02-17 202351

set forced battery charge

Hi.
Is it possible to set forced battery charge, forced discharge (and stop forced charge and discharge) as described in Northbound Interface Reference 7.3.6 via the FusionSolar integration?

ACCESS_FREQUENCY_IS_TOO_HIGH

Hi,

I have setup the integration on my Home Assistant with my API Credentials I received from my installer.
With these credentials I can't login on https://region01eu5.fusionsolar.huawei.com/, but I can do posts / gets with the API with tools like postman. So they do actually work.

Also when I lookup the entities, the diagnostics are getting data from the account. Like battery device ID, all the optimisers, transformers etc etc... So the connection is working I am guessing? But the problem is that the sensors are not reading / getting any data. All the time I get the message "Not available".

When I reboot the docker setup and watch the logs, I do see this message:

2022-12-13 21:00:29.970 ERROR (MainThread) [custom_components.fusion_solar.sensor] Unexpected error fetching FusionSolarOpenAPIDeviceRealKpi data: Retrieving the data failed with failCode: 401, message: Invalid access to current interface!

Any way how I can fix this?

supress warning error in logs

Hello,

Can you please make to not show anymore this kind of informative message in logs?
It came up after sunset.

Logger: custom_components.fusion_solar.fusion_solar.energy_sensor
Source: custom_components/fusion_solar/fusion_solar/energy_sensor.py:66
Integration: FusionSolar (documentation, issues)
First occurred: 21:11:54 (1 occurrences)
Last logged: 21:11:54

sensor.golesti_ehnahtdaxplzjrxmygmfegjedl7b77im_total_lifetime_energy: not producing any power, so not updating to prevent positive glitched.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.