Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exceptions since HA 2023.9.0 #158

Closed
ndurchx opened this issue Sep 8, 2023 · 22 comments
Closed

Exceptions since HA 2023.9.0 #158

ndurchx opened this issue Sep 8, 2023 · 22 comments
Assignees
Labels
bug Something isn't working

Comments

@ndurchx
Copy link

ndurchx commented Sep 8, 2023

Since HA 2023.9.0 I get exceptions:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 591, in state
    numerical_value = float(value)  # type:ignore[arg-type]
                      ^^^^^^^^^^^^
ValueError: could not convert string to float: 'unavailable'
...
ValueError: Sensor sensor.monthly_pv_generation_current has device class 'energy', state class 'total_increasing' unit 'kWh' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'unavailable' (<class 'str'>)

Afterwards I have to reload the yaml to bring the sensor values back. Perhaps this is caused by an unstable lan connection. Would be a solution to check every value for the string "unavailable" before using it as sensor value?

@mkaiser
Copy link
Owner

mkaiser commented Sep 8, 2023

yes, you are right.

When the yaml is loaded, some modbus values are still not present. The template sensors should check this before.

@mkaiser mkaiser self-assigned this Sep 8, 2023
@mkaiser mkaiser added the bug Something isn't working label Sep 8, 2023
@mjunker61
Copy link

The same here, I have no sensors. Is it the same bug, as to update 2023.8.3 ?
What is the crew from homeassistant doing ?

@mkaiser
Copy link
Owner

mkaiser commented Sep 8, 2023

well its more broken in my code :)

But I don't know yet, why it is triggering now

@Louisbertelsmann
Copy link
Collaborator

an "availability" option in the templates could solve it, I can add those if you want. Of course only if you aren't working on the code a lot, so I don't trigger too many conflicts merging.

@mkaiser
Copy link
Owner

mkaiser commented Sep 8, 2023

Already coded it..will check in tonight after some testing ;)

@mjunker61
Copy link

Above I forgot to say, that I make a downgrade to core-2023.8.4 and now it works for now.

@mkaiser
Copy link
Owner

mkaiser commented Sep 8, 2023

Can you double check, if it is fixed?

I am on 2023.09 and there are no more log entries after "full" restart and none after "yaml reload"

@ndurchx
Copy link
Author

ndurchx commented Sep 9, 2023

The error does not come up again. 2023.09 and 2023.09.01
The sensors do not work like before ha update, but i think it is more a problem of the modbus integration itself: home-assistant/core#99784

@HKUser1
Copy link

HKUser1 commented Sep 9, 2023

Hello Same here no Sensors again since 2323.09.01.
If I do a restart it woks for e few seconds or some minutes.... then the Sensors are offline again...

The Solution seems to be this... https://github.com/home-assistant/core/pull/99988/files
But i don't know how to do that.....

I have loaded the newest yaml , but the sensors are still unavailable

@HKUser1
Copy link

HKUser1 commented Sep 10, 2023

Anything new about the Modbus Problem since 23.09.0 I can not use my surplus charging :)

@mjunker61
Copy link

mjunker61 commented Sep 10, 2023

Can you double check, if it is fixed?

I am on 2023.09 and there are no more log entries after "full" restart and none after "yaml reload"

The modbus_sungrow.yaml last update: 2023-09-08 (2) doesn't work here.

I made for testing and logging a snapshot from my working ha-vm with ha core-2023-08.4. Than I updated the modbus_sungrow.yaml and after that I updated the ha core. After Update to ha core-2023-09.1 the sensors works for maybe 20 minutes, then sensores are not available. HA works completely a bit slower (not testing, only feeling by clicking ;))

Here is my abstracted Log with ha core-2023-09.1 and Sungrow Hybrid Inverter SH10RT:

auszug-log-nach-core-update-2023-09.1-home-assistant_2023-09-10T18-06-19.729Z.log

After the HA-VM-Rollback to ha core-2023-08.4 all works fine !!!

@TheFreaker86
Copy link

The update 2023-09-08 (2) works well with the SH10RT. The previous version worked as well until something broke. So thank you very much for the quick fix!

@storkio
Copy link

storkio commented Sep 10, 2023

Hello , same here since 2323.09.01.
modbus_sungrow.yaml update 2023-09-08 (2) doesn't help.
After restart or yaml reload it woks for a few minutes and goes offline again.

Update 2023.11.09 - since last reload of yaml - took time (don't know how long - over night :) ), to reload all sensors, but runs stable now

@TheFreaker86
Copy link

I reverted to Home Assistant version 2023.8.4. The more recent HA release doesn't work

@HKUser1
Copy link

HKUser1 commented Sep 11, 2023

i tried two times to resore 2023.08.4 but it doesn t work. What am i doing wrong.
HA disappears and only a reboot after 30 min brings HA back with 2023.9.1

@mkaiser
Copy link
Owner

mkaiser commented Sep 11, 2023

Who of you is using a modbus proxy?

I am using one and not experiencing all these issues.

Could you maybe try https://github.com/Akulatraxas/ha-modbusproxy/ ?

@TheFreaker86
Copy link

Who of you is using a modbus proxy?

I am using one and not experiencing all these issues.

Could you maybe try https://github.com/Akulatraxas/ha-modbusproxy/ ?

I don't. At least I did not configure one.

@ndurchx
Copy link
Author

ndurchx commented Sep 12, 2023

Who of you is using a modbus proxy?

I am using one and not experiencing all these issues.

Could you maybe try https://github.com/Akulatraxas/ha-modbusproxy/ ?

I changed to using a proxy. Now the connection seems stable. Even though I don't like the idea of another layer between, it is a working temporary fix, until the core integration is fixed.

@BrettLynch123
Copy link
Contributor

BrettLynch123 commented Sep 13, 2023

FYI seems to be fixed in HA 2023.9.2 and fixed by this PR home-assistant/core#99988
Havent been able to test properly though.
Edit: Seems to be working ok for 1.5 hours ok so far. but data looks weird. Seems to have breaks in the data so maybe not fixed but less bad.

What it should be
image

What I'm getting
image

@HKUser1
Copy link

HKUser1 commented Sep 13, 2023

with HA 2023.9.2 everything is working fine since this morning.

@mkaiser
Copy link
Owner

mkaiser commented Sep 13, 2023

FYI seems to be fixed in HA 2023.9.2 and fixed by this PR home-assistant/core#99988 Havent been able to test properly though. Edit: Seems to be working ok for 1.5 hours ok so far. but data looks weird. Seems to have breaks in the data so maybe not fixed but less bad.

What it should be image

What I'm getting image

sorry, I cannot derive anything from the plots. What is shown there? (Axis description is missing)

@TheFreaker86
Copy link

works fine with the latest HA release. Thank you very much! 👍

@mkaiser mkaiser closed this as completed Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants