hultenvp / solis-sensor

HomeAssistant integration for the SolisCloud PV Monitoring portal via SolisCloud API
Apache License 2.0
191 stars 42 forks source link

Report SolisCloud connectivity issues here #232

Open hultenvp opened 1 year ago

hultenvp commented 1 year ago

Describe the bug People report various issues with SolisCloud connectivity. Varying from not being able to configure the integration to connection errors with server.

A lot of fixes and hardening have already been introduced, but issues may remain.

Please add your issues in the comments of this issue. Before you do, make sure:

Note The "abnormal data bug" is not fixed, see #229

luftdieb commented 1 year ago

@alienatedsec : Yes. I'm using HA OS inside as a proxmox VM. But I'm not sure, if it was a good idea to install both pyhton packages... I would guess such dependencies should be managed by the package itself. But you should try to use just add the integration module in HA image

Beside this, I'm seeing some good results in logfile which mean real valid data from Solis cloud... But I see also this output: 2022-12-30 13:09:46.816 INFO (MainThread) [custom_components.solis.soliscloud_api] Failed to acquire plant name, login failed 2022-12-30 13:09:46.816 WARNING (MainThread) [custom_components.solis.service] Failed to discover, scheduling retry in 180 seconds. 2022-12-30 13:09:46.821 DEBUG (MainThread) [custom_components.solis.service] Scheduling discovery in 180 seconds.

And that retry interval is increasing....

alienatedsec commented 1 year ago

But you should try to use just add the integration module in HA image

I already tested it, it fails the same way as before and when providing all Solis 'credentials'

conoraofarrell commented 1 year ago

I have been experiencing the same issue as above. I've tried using python on my desktop and I am getting the "Failed with: 数据异常 请联系管理员" message. It looks like it is not getting any inverters to me, which would be consistent with the messages above.

If it is a python module issue in HA OS, is there a way to install it? I can't do it the usual way as PIP is not install on the OS.

Also, stupid question time: Is the plant ID the same as the station ID? That's what I seem to be seeing in Solis Cloud. I can't find any other ID in the URLs when I look around.

Thanks

luftdieb commented 1 year ago

@conoraofarrell : what was the command you have performed on your desktop system ? Was it "python apitest_async.py -v" after adding these 3 informations image

And yes, PlantID is same as stationID.

And I've tried a minute ago to remove "Solis Inverter" HACS addon and have installed again and it still works. Have you enter first dialog like image and second image with all your information ?

luftdieb commented 1 year ago

Sometimes I'm getting "Failed with: Timeout error occured"

D:\test\solis-sensor\test>python apitest_async.py Using predefined station list station_detail(station_id= 1298491919448789478 ): [OK] collector_list(station_id= 1298491919448789478 ): [OK] collector_detail(station_id= 1298491919448789478 , collector_sn= 1919785363 ): [OK] inverter_list( 1298491919448789478 ): [OK] inverter_detail(station_id= 1298491919448789478 , inverter_sn= 110F52216300006 ): Failed with: Timeout error occurred station_day( 1298491919448789478 ): [OK] station_month( 1298491919448789478 ): [OK] station_year( 1298491919448789478 ): [OK] station_all( 1298491919448789478 ): [OK] inverter_day( 110F52216300006 ): [OK] inverter_month( 110F52216300006 ): [OK] inverter_year( 110F52216300006 ): [OK] inverter_all( 110F52216300006 ): [OK] Exceptions: [None]

But if I'm just performing again 2 seconds later, it works D:\test\solis-sensor\test>python apitest_async.py Using predefined station list station_detail(station_id= 1298491919448789478 ): [OK] collector_list(station_id= 1298491919448789478 ): [OK] collector_detail(station_id= 1298491919448789478 , collector_sn= 1919785363 ): [OK] inverter_list( 1298491919448789478 ): [OK] inverter_detail(station_id = 1298491919448789478 , inverter_sn = 110F52216300006 ): [OK] station_day( 1298491919448789478 ): [OK] station_month( 1298491919448789478 ): [OK] station_year( 1298491919448789478 ): [OK] station_all( 1298491919448789478 ): [OK] inverter_day( 110F52216300006 ): [OK] inverter_month( 110F52216300006 ): [OK] inverter_year( 110F52216300006 ): [OK] inverter_all( 110F52216300006 ): [OK] Exceptions: [None]

conoraofarrell commented 1 year ago

@conoraofarrell : what was the command you have performed on your desktop system ? Was it "python apitest_async.py -v" after adding these 3 informations image

And yes, PlantID is same as stationID.

Yes, that's the one I ran. Thanks.

I suppose it is important to point out that I also got some python errors, for the asyncio module. I am assuming that is because of the null values from the api query: Traceback (most recent call last):

File "C:\Program Files\Python39\lib\asyncio\proactor_events.py", line 116, in __del__
    self.close()
File "C:\Program Files\Python39\lib\asyncio\proactor_events.py", line 108, in close
    self._loop.call_soon(self._call_connection_lost, None)
  File "C:\Program Files\Python39\lib\asyncio\base_events.py", line 746, in call_soon
    self._check_closed()
 File "C:\Program Files\Python39\lib\asyncio\base_events.py", line 510, in _check_closed
    raise RuntimeError('Event loop is closed')

RuntimeError: Event loop is closed

Also, yes I am getting as far as the prompt for credentials, but it is failing with a credentials error But I know these are correct. image

conoraofarrell commented 1 year ago

Interesting that thisis the fiirst time I have seen a timeout though.... image

luftdieb commented 1 year ago

@conoraofarrell: I don't know, if there is a PM function here in github... But maybe we get more clearance, if I will give you my credentials and if this works I can try your credentials. I think that is not an issue, because you can easily recreate new API key. But I don't like to post those here. So, we can maybe exchange those data by using a messanger like Telegram, or discord if you like

conoraofarrell commented 1 year ago

we can may

My ID is the ########

luftdieb commented 1 year ago

Have sent you a request....

conoraofarrell commented 1 year ago

FYI, after some investigation and help form @luftdieb, it appears that my problem is specific to my account/credentials/API. I have logged a ticket with Solis to get it looked at.

hultenvp commented 1 year ago

Missed a few messages it appears :-)

Good to see that for some it's starting to work. Let me know @luftdieb, @conoraofarrell if you managed to get it working or not. EDIT: See the message coming in, good luck!

Some answers I saw that I think are unanswered:

RuntimeError: Event loop is closed

Observed that once, but that was when fixing a bug. Cannot recall what the problem then was. The API calls do not return anything since an exception is triggered and caught in the test app. AFAIK I catch all API exceptions and even if not then they should be collected in the gather call and printed.

Sometimes I'm getting "Failed with: Timeout error occured"

Me too, seems to be a Solis thing ;-). I notice I made a typo in the error message....

will this matter if python2 or python3 is used?

It will not work with python 2, I use too many constructs that are Python 3 only

Beside this, I'm seeing some good results in logfile which mean real valid data from Solis cloud... But I see also this output: 2022-12-30 13:09:46.816 INFO (MainThread) [custom_components.solis.soliscloud_api] Failed to acquire plant name, login failed 2022-12-30 13:09:46.816 WARNING (MainThread) [custom_components.solis.service] Failed to discover, scheduling retry in 180 seconds. 2022-12-30 13:09:46.821 DEBUG (MainThread) [custom_components.solis.service] Scheduling discovery in 180 seconds. And that retry interval is increasing....

That means the workaround call to userStationList is still failing. To avoid overloading HA and server with retries the interval is indeed increasing.

But this works only as you have suggested if you add your PlantId in quotation marks "" ;-)

You got a point here, this is officially wrong. StationID should be a long. Funny thing is the SolisCLoud API itself returns them as strings... I've now locally fixed it by converting the string back to a Python integer and then all still seems to be fine. In theory it could be an issue server side if it's passed as a string, so going to fix it in the test app as well.

But if I'm using soliscloud_test. I'm still getting D:\test\solis-sensor\test>python soliscloud_test.py {"error": "Forbidden", "message": "\u4e0d\u5b58\u5728\u7684 appid invalidxxxxx", "path": "/v1/api/inveterDetail", "status": 403, "timestamp": 1672396455235}

I'd need to check, something's wrong with the parameters you pass. I also still want to figure out why I get in the old test app errors and not in the new test app.

luftdieb commented 1 year ago

I've reply from SolisSupport, they have many requests based on API problems. And based on the fact, my credentials works on conoraofarrell environment and his credentials still not work on my environment I assume it's a user specific profile problem. Also get similar feedback from Solis support image

Maybe we should just wait until it is fixed by Solis.

I have now another issue... This plugin is no longer shown on my dashboard and the plugin is not adding his own entities. But I might create another ticket because it's not matching to this issue :-)

hultenvp commented 1 year ago

I have now another issue... This plugin is no longer shown on my dashboard and the plugin is not adding his own entities. But I might create another ticket because it's not matching to this issue :-)

Make sure there are no duplicate entities now. Best to check via settings->devices->click on 1 device Then look at the names of the entities. They could end with a '_2' postfix now. If that's the case you can delete the old entities and rename the _2 entities by removing the _2 postfix

If you miss the entities at all then there's still something wrong wit the calls. Best to enable debug and post the logs in a discussion or in a new issue.

luftdieb commented 1 year ago

I don't know, what's going on between image 12:30 - 17:30... But anyhow, now I could just add control to dashboard without any other action.

And now, there is also 1 device and entities shown, which wasn't at 12:30 once I've reported, it works image

Is there a chance to add easily further sensor data without changing the code ? Like Battery SOC and SOH image

hultenvp commented 1 year ago

1 entity is a bit too few. ;-)

You should have 30, 40 or so, depending on your inverter

image

Is there a chance to add easily further sensor data without changing the code ? Like Battery SOC and SOH

I'm not sure what you mean by that?

luftdieb commented 1 year ago

That's somehow crazy. This Integration still show in the overview 1 device and 1 entities. But once I'm clicking on the link "1 device", it give me a list of 30-40 entities... And those entries are getting updated, as you can see here: image

Maybe sumrize is not correct... But this doesn't bother me so strong ;-) What I'm still locking for is the battery level which is normally shown in parameter "Battery SOC". I just have those parameters: image image image

jjeuriss commented 1 year ago

Battery SOC = Solis Remaining Battery Capacity. It's in your list: image

luftdieb commented 1 year ago

@jjeuriss: Thanks! What a pitty! Sorry for raising this question! Now I'm fine ;-)

svetj commented 1 year ago

Hello all Just to say that I also stuck on wrong credentials error. I also tried to deactivate and activate api key, with no lucky. Note that the system has released exactly the previous api key/secret.

Using test script I get the well known error: "Failed with: 数据异常 请联系管理员"

Please, let me know I you need any further test to help in solving this issue.

conoraofarrell commented 1 year ago

I logged a ticket with Solis and they fixed the API. It does not seem that this is a global fix, so you will need to contact them yourself for your specific case,

Hello all Just to say that I also stuck on wrong credentials error. I also tried to deactivate and activate api key, with no lucky. Note that the system has released exactly the previous api key/secret.

Using test script I get the well known error: "Failed with: 数据异常 请联系管理员"

Please, let me know I you need any further test to help in solving this issue.

devinmitchell commented 1 year ago

So I woke up this morning, ran a API test and was greeted by the following:

solis-sensor % python3 ./test/apitest_async.py
Using predefined station list
station_detail(station_id= 12XXXXXXXXXXXXX92 ): [OK]
collector_list(station_id= 12XXXXXXXXXXXXX92 ): [OK]
collector_detail(station_id= 12XXXXXXXXXXXXX92 , collector_sn= 5A122802D4C154E5 ): [OK]
inverter_list( 12XXXXXXXXXXXXX92 ): [OK]
inverter_detail(station_id = 12XXXXXXXXXXXXX92 , inverter_sn = 603XXXXXXXXXX87 ): [OK]
station_day( 12XXXXXXXXXXXXX92 ): [OK]
station_month( 12XXXXXXXXXXXXX92 ): [OK]
station_year( 12XXXXXXXXXXXXX92 ): [OK]
station_all( 12XXXXXXXXXXXXX92 ): [OK]
inverter_day( 603XXXXXXXXXX87 ): [OK]
inverter_month( 603XXXXXXXXXX87 ): [OK]
inverter_year( 603XXXXXXXXXX87 ): [OK]
inverter_all( 603XXXXXXXXXX87 ): [OK]
Exceptions:  [None]

\o/

I can confirm I've now been able to install the solis device in HA and all readings are coming through as expected. Still no update on my Solis ticket in the past 4 days over the holiday period, but I suspect Shabaz resolved my API issue this morning. Thank you @all for your help! :)

alienatedsec commented 1 year ago

I can confirm I've now been able to install the solis device in HA and all readings are coming through as expected.

The same for me, and as stated by @hultenvp it is a server-side issue. I don't understand how the API can be an individual issue, not a global one.

conoraofarrell commented 1 year ago

I can confirm I've now been able to install the solis device in HA and all readings are coming through as expected.

The same for me, and as stated by @hultenvp it is a server-side issue. I don't understand how the API can be an individual issue, not a global one.

Well it actually seems to have been a credentials issue, associated with individual keys etc. I'm far from an API guru to be able to speak on such things. But it seems that it is being resolved on a per user basis which also seems strange, as they have not changed the actual credentials. Possible they had to allow a level of access to those credentials, which was omitted upon issuing them.

alienatedsec commented 1 year ago

Possible they had to allow a level of access to those credentials, which was omitted upon issuing them.

My credentials (and others) were fine until before Christmas. Since the failure to obtain any data, I noticed my API was disabled, and when reenabled, it was causing those data is abnormal problems as described above.

Enquelare commented 1 year ago

closely monitoring what you are doing! Great work, allthough I do not understand much out of it :). Asked to recheck my API data to Solis and now waiting for their reply.

Enquelare commented 1 year ago

closely monitoring what you are doing! Great work, allthough I do not understand much out of it :). Asked to recheck my API data to Solis and now waiting for their reply.

Seems to be working now!

lartica commented 1 year ago

I try the last option and worked for mi.

After deactivating (disable) in the API administration in solisclooud.com and reactivating the API, on the last try it worked using soliscloud_test.py

{"success":true,"code":"0","msg":"success","data":{"stationStatusVo":{"all":1,"normal":1,"fault":0,"offline":0,"building":0,"mppt":0},"page":{"records":........

Thanks to everyone

SmilooSmitje commented 1 year ago

Goodmorning I had same issues. I deactivated api key and reactivated it. I got other secrets ID and same api key. This solved the problem and now for me it is working, THX

ram1t commented 1 year ago

I have the same issue here re unkown cred - I have deactivated api key and reactivated it again. It gave the same keys, but now works... so if you hit an issue, definetly try deactivating and activiating again

robnand commented 1 year ago

I still can't get this working - same error as others are facing with "Cannot login with provided URL and credentials"

I've tried recreating API creds, but it still won't accept them and keeps giving same error however it works using the soliscloud_test.py script

hultenvp commented 1 year ago

@robnand : Can you drop your debug logs here?

robnand commented 1 year ago

@hultenvp It looks similar to what others had earlier on: 2023-01-31 11:09:36.101 WARNING (MainThread) [custom_components.solis.soliscloud_api] No inverters found

blackspiritus commented 1 year ago

Same here, been trying for a while, still getting the "Cannot login with provided URL and credentials" error, in the logs I also see No inverters found. Tried reactivating the API but to no avail. The apitest_async.py script is succesful.

hultenvp commented 1 year ago

@robnand , @blackspiritus : Can you please run with debug enabled (see https://github.com/hultenvp/solis-sensor/issues/254#issuecomment-1406267621 for instructions) and post the logs here? The "No inverters found" message means the integration cannot parse the data returned by the server. The tests application only checks if it gets data, not if it can be fully parsed. Typically it means the returned list is empty. To check that please run python apitest_async.py -v. Verbose mode will also show you the actual data returned. In the output, isolate the inverterList call and please post that output here as well. Example output of a correct inverterList call:

inverter_list( 1298491919448907105 ): [OK]
[{"acOutputType": 0, "backupTodayEnergy": 0.0, "backupTodayEnergyStr": "kWh", "backupTotalEnergy": 0.0, "backupTotalEnergyStr": "kWh", "batteryCapacitySoc": 10.0, "batteryPower": 0.049, "batteryPowerPec": "1", "batteryPowerStr": "kW", "batteryTodayChargeEnergy": 4.7, "batteryTodayChargeEnergyStr": "kWh", "batteryTodayDischargeEnergy": 4.6, "batteryTodayDischargeEnergyStr": "kWh", "batteryTotalChargeEnergy": 345.0, "batteryTotalChargeEnergyStr": "kWh", "batteryTotalDischargeEnergy": 359.0, "batteryTotalDischargeEnergyStr": "kWh", "bypassLoadPower": 0.0, "bypassLoadPowerStr": "kW", "collectorId": "XXXXXXXX", "collectorSn": "XXXXXXXX", "currentState": "3", "dataTimestamp": "1675411656266", "dataTimestampStr": "2023-02-03 08:07:36 (UTC+00:00)", "dcInputType": 2, "dispersionRate": 0.0, "etoday": 0.1, "etoday1": 0.1, "etodayStr": "kWh", "etotal": 189.0, "etotal1": 189.0, "etotalStr": "kWh", "fisTime": "1670351766256", "fullHour": 0.03, "gridPurchasedTodayEnergy": 12.7, "gridPurchasedTodayEnergyStr": "kWh", "gridSellTodayEnergy": 0.6, "gridSellTodayEnergyStr": "kWh", "id": "XXXXXXXXX", "inverterMeterModel": 5, "inverterSoftwareVersion": "3e003b", "maxDcBusTime": "1675411656266", "maxUac": 251.6, "maxUacTime": "1671677691736", "maxUpv": 229.5, "maxUpvTime": "1670666159638", "name": "Hybrid Inverter", "nationalStandards": "52", "offlineLongStr": "--", "pac": 0.024, "pac1": 0, "pacStr": "kW", "parallelAddr": 0, "parallelBattery": 0, "parallelPhase": 0, "parallelStatus": 0, "pow1": 16.51, "pow10": 0.0, "pow11": 0.0, "pow12": 0.0, "pow13": 0.0, "pow14": 0.0, "pow15": 0.0, "pow16": 0.0, "pow17": 0.0, "pow18": 0.0, "pow19": 0.0, "pow2": 7.49, "pow20": 0.0, "pow21": 0.0, "pow22": 0.0, "pow23": 0.0, "pow24": 0.0, "pow25": 0.0, "pow26": 0.0, "pow27": 0.0, "pow28": 0.0, "pow29": 0.0, "pow3": 0.0, "pow30": 0.0, "pow31": 0.0, "pow32": 0.0, "pow4": 0.0, "pow5": 0.0, "pow6": 0.0, "pow7": 0.0, "pow8": 0.0, "pow9": 0.0, "power": 3.6, "powerStr": "kW", "productModel": "3102", "psum": -1.341, "psumCal": -1.341, "psumCalPec": "1", "psumCalStr": "kW", "psumStr": "kW", "rs485ComAddr": "101", "simFlowState": -1, "sn": "6031023228200008", "state": 1, "stateExceptionFlag": 0, "stationId": "XXXXXXXXX", "stationType": 0, "timeZone": 0.0, "timeZoneName": "(UTC) \u534f\u8c03\u4e16\u754c\u65f6", "timeZoneStr": "(UTC)", "totalFullHour": 52.5, "updateShelfBeginTime": 1677168000000, "updateShelfEndTime": 1834934400000, "updateShelfEndTimeStr": "2028-02-24", "updateShelfTime": "5", "userId": "XXXXXXX"}]

Example output of an inverterList call that is seemingly OK, but the integration will obviously be unable to parse:

inverter_list( 1298491919448809637 ): [OK]
[]
blackspiritus commented 1 year ago

@hultenvp Thank you for the fast reply. The integration is not yet added, so I'm not able to enable the debug log as shown in the instructions. I can't add it since I'm not able to configure it. But I'm able to do the verbose mode for the inverterList call:

inverter_list( 1298491919448915364 ): [OK]
[{"acOutputType": 1, "backupTodayEnergy": 0.0, "backupTodayEnergyStr": "kWh", "backupTotalEnergy": 0.0, "backupTotalEnergyStr": "kWh", "batteryCapacitySoc": 19.0, "batteryPower": 0.116, "batteryPowerPec": "1", "batteryPowerStr": "kW", "batteryTodayChargeEnergy": 0.4, "batteryTodayChargeEnergyStr": "kWh", "batteryTodayDischargeEnergy": 1.5, "batteryTodayDischargeEnergyStr": "kWh", "batteryTotalChargeEnergy": 79.0, "batteryTotalChargeEnergyStr": "kWh", "batteryTotalDischargeEnergy": 108.0, "batteryTotalDischargeEnergyStr": "kWh", "bypassLoadPower": 0.0, "bypassLoadPowerStr": "kW", "collectorId": "1306858901387747490", "collectorSn": "1921580212", "currentState": "0", "dataTimestamp": "1675413835000", "dataTimestampStr": "2023-02-03 09:43:55 (UTC+01:00)", "dcInputType": 2, "dispersionRate": 0.0, "etoday": 0.2, "etoday1": 0.2, "etodayStr": "kWh", "etotal": 111.0, "etotal1": 111.0, "etotalStr": "kWh", "fullHour": 0.06, "gridPurchasedTodayEnergy": 1.6, "gridPurchasedTodayEnergyStr": "kWh", "gridSellTodayEnergy": 0.0, "gridSellTodayEnergyStr": "kWh", "id": "1308675217947270841", "inverterMeterModel": 5, "inverterSoftwareVersion": "3c0030", "maxDcBusTime": "1675413835000", "maxUac": 246.5, "maxUacTime": "1674303450000", "maxUpv": 1259.2, "maxUpvTime": "1671484352000", "nationalStandards": "70", "offlineLongStr": "--", "pac": 0.3, "pac1": 0, "pacStr": "kW", "parallelAddr": 0, "parallelBattery": 0, "parallelPhase": 0, "parallelStatus": 0, "pow1": 114.2, "pow10": 0.0, "pow11": 0.0, "pow12": 0.0, "pow13": 0.0, "pow14": 0.0, "pow15": 0.0, "pow16": 0.0, "pow17": 0.0, "pow18": 0.0, "pow19": 0.0, "pow2": 186.62, "pow20": 0.0, "pow21": 0.0, "pow22": 0.0, "pow23": 0.0, "pow24": 0.0, "pow25": 0.0, "pow26": 0.0, "pow27": 0.0, "pow28": 0.0, "pow29": 0.0, "pow3": 0.0, "pow30": 0.0, "pow31": 0.0, "pow32": 0.0, "pow4": 0.0, "pow5": 0.0, "pow6": 0.0, "pow7": 0.0, "pow8": 0.0, "pow9": 0.0, "power": 3.6, "powerStr": "kW", "productModel": "3102", "psum": 0.02, "psumCal": 0.02, "psumCalPec": "1", "psumCalStr": "kW", "psumStr": "kW", "rs485ComAddr": "101", "simFlowState": -1, "sn": "xxxxxxxxx", "state": 1, "stateExceptionFlag": 0, "stationId": "1298491919448915364", "stationType": 4, "timeZone": 1.0, "timeZoneName": "(UTC+01:00) \u963f\u59c6\u65af\u7279\u4e39\uff0c\u67cf\u6797\uff0c\u4f2f\u5c14\u5c3c\uff0c\u7f57\u9a6c\uff0c\u65af\u5fb7\u54e5\u5c14\u6469\uff0c\u7ef4\u4e5f\u7eb3", "timeZoneStr": "(UTC+01:00)", "totalFullHour": 30.83, "updateShelfBeginTime": 1666195200000, "updateShelfEndTime": 1823961600000, "updateShelfEndTimeStr": "2027-10-20", "updateShelfTime": "5", "userId": "1300386381676698572"}]
robnand commented 1 year ago

@hultenvp As per others, I am seeing the correct inventerList call

inverter_list( 1298491919448644758 ): [OK] [{"acOutputType": 1, "backupTodayEnergy": 0.0, "backupTodayEnergyStr": "kWh", "backupTotalEnergy": 0.0, "backupTotalEnergyStr": "kWh", "batteryCapacitySoc": 18.0, "batteryPower": 0.0, "batteryPowerPec": "1", "batteryPowerStr": "kW", "batteryTodayChargeEnergy": 0.0, "batteryTodayChargeEnergyStr": "kWh", "batteryTodayDischargeEnergy": 0.0, "batteryTodayDischargeEnergyStr": "kWh", "batteryTotalChargeEnergy": 3.093, "batteryTotalChargeEnergyStr": "MWh", "batteryTotalDischargeEnergy": 3.15, "batteryTotalDischargeEnergyStr": "MWh", "bypassLoadPower": 0.0, "bypassLoadPowerStr": "kW", "collectorId": "xxxxxxxxxxx", "collectorSn": "xxxxxxxxxxx", "currentState": "0", "dataTimestamp": "1670292251000", "dataTimestampStr": "2022-12-06 02:04:11 (UTC+00:00)", "dcInputType": 1, "dispersionRate": 0.0, "etoday": 0.0, "etoday1": 0.0, "etodayStr": "kWh", "etotal": 0.0, "etotal1": 0.0, "etotalStr": "kWh", "fullHour": 0.0, "gridPurchasedTodayEnergy": 0.9, "gridPurchasedTodayEnergyStr": "kWh", "gridSellTodayEnergy": 0.0, "gridSellTodayEnergyStr": "kWh", "id": "xxxxxxxxxxx", "inverterMeterModel": 1, "inverterSoftwareVersion": "330022", "maxDcBus": 0.0, "maxDcBusTime": "0", "maxUac": 246.9, "maxUacTime": "1669028447000", "maxUpv": 316.3, "maxUpvTime": "1669028447000", "nationalStandards": "52", "offlineLongStr": "--", "pac": 0.0, "pac1": 0, "pacStr": "kW", "parallelAddr": 0, "parallelBattery": 0, "parallelPhase": 0, "parallelStatus": 0, "pow1": 0.0, "pow10": 0.0, "pow11": 0.0, "pow12": 0.0, "pow13": 0.0, "pow14": 0.0, "pow15": 0.0, "pow16": 0.0, "pow17": 0.0, "pow18": 0.0, "pow19": 0.0, "pow2": 0.0, "pow20": 0.0, "pow21": 0.0, "pow22": 0.0, "pow23": 0.0, "pow24": 0.0, "pow25": 0.0, "pow26": 0.0, "pow27": 0.0, "pow28": 0.0, "pow29": 0.0, "pow3": 0.0, "pow30": 0.0, "pow31": 0.0, "pow32": 0.0, "pow4": 0.0, "pow5": 0.0, "pow6": 0.0, "pow7": 0.0, "pow8": 0.0, "pow9": 0.0, "power": 4.6, "powerStr": "kW", "productModel": "f2", "psum": -0.198, "psumCal": -0.198, "psumCalPec": "1", "psumCalStr": "kW", "psumStr": "kW", "rs485ComAddr": "101", "simFlowState": -1, "sn": "000000160F22211", "state": 2, "stateExceptionFlag": 0, "stationId": "1298491919448644758", "stationType": 4, "timeZone": 0.0, "timeZoneName": "(UTC+00:00) \u90fd\u67cf\u6797\uff0c\u7231\u4e01\u5821\uff0c\u4f26\u6566\uff0c\u91cc\u65af\u672c", "timeZoneStr": "(UTC+00:00)", "totalFullHour": 0.0, "updateShelfTime": "null", "userId": "xxxxxxxxxxx"}, {"acOutputType": 1, "backupTodayEnergy": 0.0, "backupTodayEnergyStr": "kWh", "backupTotalEnergy": 0.0, "backupTotalEnergyStr": "kWh", "batteryCapacitySoc": 21.0, "batteryPower": 0.239, "batteryPowerPec": "1", "batteryPowerStr": "kW", "batteryTodayChargeEnergy": 0.6, "batteryTodayChargeEnergyStr": "kWh", "batteryTodayDischargeEnergy": 0.2, "batteryTodayDischargeEnergyStr": "kWh", "batteryTotalChargeEnergy": 3.298, "batteryTotalChargeEnergyStr": "MWh", "batteryTotalDischargeEnergy": 3.344, "batteryTotalDischargeEnergyStr": "MWh", "bypassLoadPower": 0.0, "bypassLoadPowerStr": "kW", "collectorId": "1306858901386804582", "collectorSn": "4052663373", "currentState": "0", "dataTimestamp": "1675415952000", "dataTimestampStr": "2023-02-03 09:19:12 (UTC+00:00)", "dcInputType": 2, "dispersionRate": 0.0, "etoday": 0.6, "etoday1": 0.6, "etodayStr": "kWh", "etotal": 8.276, "etotal1": 8276.0, "etotalStr": "MWh", "fisTime": "1624932321000", "fullHour": 0.13, "gridPurchasedTodayEnergy": 17.0, "gridPurchasedTodayEnergyStr": "kWh", "gridSellTodayEnergy": 0.0, "gridSellTodayEnergyStr": "kWh", "id": "1308675217945506515", "inverterMeterModel": 5, "inverterSoftwareVersion": "43002a", "maxDcBus": 0.0, "maxDcBusTime": "0", "maxUac": 254.6, "maxUacTime": "1674480438000", "maxUpv": 319.3, "maxUpvTime": "1643462671000", "nationalStandards": "52", "offlineLongStr": "--", "pac": 1.134, "pac1": 0, "pacStr": "kW", "parallelAddr": 0, "parallelBattery": 0, "parallelPhase": 0, "parallelStatus": 0, "pow1": 638.94, "pow10": 0.0, "pow11": 0.0, "pow12": 0.0, "pow13": 0.0, "pow14": 0.0, "pow15": 0.0, "pow16": 0.0, "pow17": 0.0, "pow18": 0.0, "pow19": 0.0, "pow2": 495.5, "pow20": 0.0, "pow21": 0.0, "pow22": 0.0, "pow23": 0.0, "pow24": 0.0, "pow25": 0.0, "pow26": 0.0, "pow27": 0.0, "pow28": 0.0, "pow29": 0.0, "pow3": 0.0, "pow30": 0.0, "pow31": 0.0, "pow32": 0.0, "pow4": 0.0, "pow5": 0.0, "pow6": 0.0, "pow7": 0.0, "pow8": 0.0, "pow9": 0.0, "power": 4.6, "powerStr": "kW", "productModel": "f2", "psum": -0.002, "psumCal": -0.002, "psumCalPec": "1", "psumCalStr": "kW", "psumStr": "kW", "rs485ComAddr": "101", "simFlowState": -1, "sn": "160F22211090035", "state": 1, "stateExceptionFlag": 0, "stationId": "1298491919448644758", "stationType": 4, "timeZone": 0.0, "timeZoneName": "(UTC+00:00) \u90fd\u67cf\u6797\uff0c\u7231\u4e01\u5821\uff0c\u4f26\u6566\uff0c\u91cc\u65af\u672c", "timeZoneStr": "(UTC+00:00)", "totalFullHour": 1779.57, "updateShelfBeginTime": 1619193600000, "updateShelfEndTime": 1776960000000, "updateShelfEndTimeStr": "2026-04-24", "updateShelfTime": "5", "userId": "1300319277300420307"}]

hultenvp commented 1 year ago

Thanks for your replies.

Weird...both responses are indeed correct.

This unfortunately means I really need the debug output to drill down to the cause. There's another way of getting debug log. It's described here. If you add that to the configuration.yaml, restart home assistant and then try to add/configure the integration again then it should give more detailed log output.

blackspiritus commented 1 year ago

Alright, I was able to enable the debug like that. But I can't see much more; this is the debug log:

2023-02-03 11:38:34.447 DEBUG (MainThread) [custom_components.solis.soliscloud_api] workarounds: {'correct_daily_on_grid_energy_enabled': False, 'use_energy_today_from_plant': False}
2023-02-03 11:38:34.617 WARNING (MainThread) [custom_components.solis.soliscloud_api] No inverters found
robnand commented 1 year ago

Ok so I've figured it out to be user error on my behalf!

I was putting an following the URL as per the example which caused the error `InvalidURL https://www.soliscloud.com:13333/v1/api/inverterList`

cherryghost commented 1 year ago

Stuck with the same issue as yourself. My API key/secret was only activated for the first time this morning

2023-02-03 14:55:00.531 WARNING (MainThread) [custom_components.solis.soliscloud_api] No inverters found

hultenvp commented 1 year ago

Please check your URL as well: it should read https://www.soliscloud.com:13333. Mind the four "3's"

hultenvp commented 1 year ago

@blackspiritus Thanks for posting. The lack of debug output actually excludes a lot of possible scenarios. Most probably the error is caused by timeout on the http call. If true then most likely there's an issue with your URL config, just like @robnand. Please check the URL you entered is exactly as in my previous post.

blackspiritus commented 1 year ago

Great, it's working now! Issue was a trailing / at the end of the URL... Thanks a lot for the help!

hultenvp commented 1 year ago

Good to hear, but I'm a bit surprised as the integration should ignore trailing slashes.

Dtrotmw commented 1 year ago

I too cannot get the integration started with the error log:

2023-02-06 10:42:29.497 INFO (MainThread) [custom_components.solis.soliscloud_api] /v1/api/inverterDetail responded with error: R0000:无权限操作
2023-02-06 10:42:29.498 WARNING (MainThread) [custom_components.solis.soliscloud_api] No inverters found

I am using the URL https://www.soliscloud.com:13333 and the keysecret etc exactly as on Soliscloud web access. How do I resolve this? I'm in "conversation" with Solis who are not providing any useful response.

Dtrotmw commented 1 year ago

Further to my comment yesterday I got his unhelpful response from solis: Hello David, Home assistant app is not working properly with Solis Cloud API suggested by HQ team. Please try POSTMAN app for Solis Cloud API. I can't find any instructions for POSTMAN and Although I've read most of the above posts I can't see what to do next. I've tried https://www.soliscloud.com:13333/v1/api/inverterList & get an error "Request method not supported http://www.soliscloud.com:13333/v1/api/inverterList" I don't see how to run pytest - it didn't work from Terminal or Services. I'd really like to get my invertor connected!

luftdieb commented 1 year ago

Hi Dtrotmw, maybe you can check my screenshot I've mentioned https://github.com/hultenvp/solis-sensor/issues/232#issuecomment-1364421926 But you have to calculate a few inputs, which is not so easy.

The better way I guess is to spend more time in using the test program, which you can run also on your windows computer... You just need to have python installed, made some changes on "\test\soliscloud_test.py" file like enter Line 11: KeyId = "xxxxxxx" Line 12: secretKey = b'xxxxx' Line 34: Body='{"id":"xxxxx","sn":"xxxxx"}

If you don't know sn of your inverter, you can fetch it from SolisStick webinterface... image

Then you can already open a cmd console in the folder of \test and then just type "python soliscloud_test.py" If you get something like {"code": "1", "data": null, "msg": "\u6570\u636e\u5f02\u5e38 \u8bf7\u8054\u7cfb\u7ba1\u7406\u5458", "success": true}, you might have entered wrong or incomplete data.

Otherwise you should get really beautiful results :-)

If you like to spend more time in using postman, you can uncomment line 77 and 78 (print (requestStr) / print (header)) you will get the data, which is required for postman, if you like to give further feedback to solisSupport. But for me, Solis cloud connection works in HomeAssistant after getting support by SolisSupport (I've gave them my results from Postman) , But currently soliscloud_test.py works perfectly but postman not!

Good luck!

MuMu21 commented 1 year ago

Just to chime in, I had the same problem with "chinese error message", opened a ticket, and four weeks later solis got back to me, said they had fixed it, but it was still not working for me. So I deactivaded and reactivated api access and now it works for me.

Dtrotmw commented 1 year ago

Thanks for the help - I managed to get it working at last