hultenvp / solis-sensor

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

Temperature Sensor stopped working #65

Closed dynarida closed 2 years ago

dynarida commented 2 years ago

"sensor.my_solis_inverter_temperature" has stopped reporting temperature as of a few days ago. The "state" is shown as unknown, other measurement sensors are ok. I use temperature for automation of supplementary cooling fan and has worked flawlessly for the previous 5 weeks. The Solis integration is up to date (v1.0.4)

hultenvp commented 2 years ago

Hi,

That's odd. Can you please add your configuration, logs and ha version?

Cheers

conallob commented 2 years ago

I'm seeing the same problem with multiple metrics, including temperature and the daily power.

The developer console is telling me "Last Updated: 26 January 2022, 09:41:46" which is when I upgraded this plugin to v1.0.4 and upgraded to Home Assistant 7.2

I will grab logs shortly

conallob commented 2 years ago

Actually, data is appearing now after forcing multiple restarts in row.

hultenvp commented 2 years ago

Hi @conallob

I've seen with another user that the http requests I'm doing for the auto detect can timeout when your system is heavy on CPU during startup. Added some retries to mitigate, but maybe in your case it's still too low. You might want to increase the max retries in server.Py and see if that helps.

dynarida commented 2 years ago

Didn't notice before, but can also confirm multiple Solis sensors are being affected. Just had a look at Grafana, and data acquisition seems erratic or non existent. Problems started around 24/1/2021 and that was about the time I upgraded to the previous version 1.0.3? prior to then upgrading v1.0.4. Was on Home Assistant 7.1 then, but now 7.2. Where do I find the config & logs you want??

hultenvp commented 2 years ago

The config is the one you entered in configuration.yaml to get the solis integration running, similar to the one mentioned in the readme. I'm only interested in the solis config part, not the rest of your configuration.yaml. For the logs, I means the HomeAssistant logs.

If you add the following lines to your config and restart then the debug output of the solis integration shows up in HA logs. Please either copy the log in here or add the log file that can be found in the same directory as your configuration.yaml. Don't forget to remove anything you consider privacy sensitive

logger:
  default: warning
  logs:
    custom_components.solis: debug
LucidityCrash commented 2 years ago

Strange ... I've been using the soliscloud branch and have been getting data from both soliscloud.com and m.ginlong.com and both have been fine for me (when I've not been mucking about with the soliscloud code 😁)

hultenvp commented 2 years ago

I really think this is the auto discovery process that takes place during startup. With some the startup phase is CPU heavy, either because of the system they run on or because of the integrations they use. In those cases the HTTP requests time out and retries are needed. Maybe in the case of his issue the MAX retry of 3 is just too low. With Conall's setup it looks he's on the edge where sometimes 3 retries just suffices but most of the time not.

henrikeri commented 2 years ago

@hultenvp

I seem to be having the same issue now that I upgraded to the latest version. I have three inverters and they are all displaying 0degC.

Configuration is your new standard template here on github.

From the logs the only mention of temperature (running debug mode) are what I have attached below.

2022-01-27 11:23:31 DEBUG (MainThread) [custom_components.solis.sensor] Creating inverterstate (160772216070011) 2022-01-27 11:23:31 INFO (MainThread) [custom_components.solis.service] Subscribing sensor to attribute state for inverter 160772216070011 2022-01-27 11:23:31 DEBUG (MainThread) [custom_components.solis.sensor] Creating timestamponline (160772216070011) 2022-01-27 11:23:31 INFO (MainThread) [custom_components.solis.service] Subscribing sensor to attribute timestampOnline for inverter 160772216070011 2022-01-27 11:23:31 DEBUG (MainThread) [custom_components.solis.sensor] Creating timestampmeasurement (160772216070011) 2022-01-27 11:23:31 INFO (MainThread) [custom_components.solis.service] Subscribing sensor to attribute timestampUpdate for inverter 160772216070011 2022-01-27 11:23:31 DEBUG (MainThread) [custom_components.solis.sensor] Creating temperature (160772216070011) 2022-01-27 11:23:31 INFO (MainThread) [custom_components.solis.service] Subscribing sensor to attribute inverterTemperature for inverter 160772216070011

2022-01-27 11:23:31 DEBUG (MainThread) [custom_components.solis.sensor] Creating inverterstate (010CF1216300005) 2022-01-27 11:23:31 INFO (MainThread) [custom_components.solis.service] Subscribing sensor to attribute state for inverter 010CF1216300005 2022-01-27 11:23:31 DEBUG (MainThread) [custom_components.solis.sensor] Creating timestamponline (010CF1216300005) 2022-01-27 11:23:31 INFO (MainThread) [custom_components.solis.service] Subscribing sensor to attribute timestampOnline for inverter 010CF1216300005 2022-01-27 11:23:31 DEBUG (MainThread) [custom_components.solis.sensor] Creating timestampmeasurement (010CF1216300005) 2022-01-27 11:23:31 INFO (MainThread) [custom_components.solis.service] Subscribing sensor to attribute timestampUpdate for inverter 010CF1216300005 2022-01-27 11:23:31 DEBUG (MainThread) [custom_components.solis.sensor] Creating temperature (010CF1216300005) 2022-01-27 11:23:31 INFO (MainThread) [custom_components.solis.service] Subscribing sensor to attribute inverterTemperature for inverter 010CF1216300005

2022-01-27 11:23:31 DEBUG (MainThread) [custom_components.solis.sensor] Creating inverterstate (010CF1216300029) 2022-01-27 11:23:31 INFO (MainThread) [custom_components.solis.service] Subscribing sensor to attribute state for inverter 010CF1216300029 2022-01-27 11:23:31 DEBUG (MainThread) [custom_components.solis.sensor] Creating timestamponline (010CF1216300029) 2022-01-27 11:23:31 INFO (MainThread) [custom_components.solis.service] Subscribing sensor to attribute timestampOnline for inverter 010CF1216300029 2022-01-27 11:23:31 DEBUG (MainThread) [custom_components.solis.sensor] Creating timestampmeasurement (010CF1216300029) 2022-01-27 11:23:31 INFO (MainThread) [custom_components.solis.service] Subscribing sensor to attribute timestampUpdate for inverter 010CF1216300029 2022-01-27 11:23:31 DEBUG (MainThread) [custom_components.solis.sensor] Creating temperature (010CF1216300029) 2022-01-27 11:23:31 INFO (MainThread) [custom_components.solis.service] Subscribing sensor to attribute inverterTemperature for inverter 010CF1216300029

hultenvp commented 2 years ago

@henrikeri : Can you confirm only inverterTemperature is reported as 0C? Are all other sensors fine?

henrikeri commented 2 years ago

@hultenvp: Correct. There are a few of the PV sensors reporting static values, but I assume that's because not all my inverters are 3-phase or multi string(?)

On thing that might be worth looking into, should time be reported in human readable format instead of epoch (i can start a new request if you'd like me to?)

martin-92 commented 2 years ago

For me the same issue. The temp sensor is not working but al the other sensors are working fine. Maybe good to know, i am missing the temperature graph also in the Solis app for both of my inverters.

dynarida commented 2 years ago

Exported my data from Solis website and confirm that Temperature stopped being recorded 25th Jan 16:18 EST Australia

LucidityCrash commented 2 years ago

Exported my data from Solis website and confirm that Temperature stopped being recorded 25th Jan 16:18 EST Australia

As in ... it is not showing on the exported data either ?

hultenvp commented 2 years ago

I'll make a test version tomorrow with extra debug on the temperature. I might be missing something obvious, but from the code I see no particular reason why it should fail only on temp.

In the meantime I have a few sanity check questions to all reporting this issue:

conallob commented 2 years ago

I am seeing stale data for multiple sensors, including sensor.solis_inverter_energy_today

Restarting Home Assistant will force sensors to be updated, but it appears the timeout issues are ongoing, not just at startup

martin-92 commented 2 years ago

i use Celcius.

But i think the problem is on the Solis side. They removed the temperature sensor from their app and logging website.

hultenvp commented 2 years ago

image

Not with me. The plot deepens.

martin-92 commented 2 years ago

image

Not with me. The plot deepens.

But do you also see the temperature on the website? https://m.ginlong.com/

LucidityCrash commented 2 years ago

yes ... and on the app on my tablet : image

LucidityCrash commented 2 years ago

So what region is every one in - perhaps this is region based ? I'm in the UK and still getting Temps.

martin-92 commented 2 years ago

That is really strange. i have access to multiple plants and locations in one country. All of them are missing the temperature. Location: The Netherlands

hultenvp commented 2 years ago

Debug version in this branch: https://github.com/hultenvp/solis-sensor/tree/65_Temperature_sensor_stopped_working

Please upload the full anonymized log and not only snippets, I need the full context to understand what's going on.

hultenvp commented 2 years ago

I do not see temp on the ginlong site. Never looked at it, only accessed via HA so unsure if it ever was there. Looking at desktop version of site, not using the app.

LucidityCrash commented 2 years ago

I don't see it anywhere distplayed on the web pages just in the App, I have to export the data from the inverter details page or get the data from the API. For me it is column AR in the downloaded spreadsheet.

dynarida commented 2 years ago

From the Ginlong website, my exported detailed data for days up to and including the 25th Jan, shows a column for Inverter Temperature, but the reported temperature value suddenly stops midway through the day on the 25th Jan. For subsequent days the Inverter Temperature column is now missing from the data export. So the problem may well be on the Ginlong side? Location: Australia, Celsius

hultenvp commented 2 years ago

If the problem is server side then everting code and config to v0.4.1 would still see the issue. Can someone confirm? Also interested in @conallob . I think that's a separate issue

hultenvp commented 2 years ago

I'm releasing a new version today. That version will not solve this issue.

To be able to resolve this issue I need either confirmation that the issue is on the backend and v0.4.1 also no longer delivers temperature data, or I need logs from the version in this branch to be able to determine root cause: https://github.com/hultenvp/solis-sensor/tree/65_Temperature_sensor_stopped_working

dynarida commented 2 years ago

Temperature sensor just started reporting again during 29th Jan all by itself without any intervention from me. That was before I had upgraded to v2.01. Still working on v2.01. So it seems there was a problem on the server side??

hultenvp commented 2 years ago

I'm going to close this issue as not a bug. Feel free to reopen if there is reason to believe there's an issue with the integration.

Thanks for all the input

dynarida commented 2 years ago

Thx for your help