-
Notifications
You must be signed in to change notification settings - Fork 37
Home Assistant 20223.5.0 now throwing exception #217
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
Comments
Done a change for merge to stop this |
Can confirm and can also confirm that the changes made in #218 (at least on the lines 136 and 137) stop these errors. |
@rvdbreemen Could you please release binaries with fix |
Trying to fix CI pipeline... anyone any ideas what it fails, help would be welcome ;-) @serrj-sv I want to fix the pipeline, but you can download mqttha.cfg from the data folder in the dev branch and upload it manually. |
@rvdbreemen From a quick look at the error in the CI Pipeline, it kind of looks like you are running into this breaking change: arduino/arduino-cli#2085 I gathered this from the following lines: Apparently, you now need to explicitly ggive a Does that make sense? |
Ben, |
You're welcome! |
I looked into the issue myself last night. It turns out that the 2023.5.0 is breaking not just my integration, a lot of integrations broke of this change in HA Core. I have seen this before, this will also mean that 2023.5.x will most likely fix this in the Core side, but it's good to clean up the mqttha.cfg integration a bit. Please keep upgrading HA yourself too, it could also be that it will fix itself in 2-3 weeks time because they fix core. Seriously we have seen this many times before with HA, move fast break often and fix. The HA core project is really good at this ;-) |
Not sure but this is in the logs. Didnt check logs for weeks. Occurances rising fast after a reboot. `Logger: homeassistant.components.mqtt.models Exception raised when updating state of sensor.otgw_status_master, topic: 'OTGW/value/otgw-xxxx/status_master' with payload: b'-----W--' The above exception was the direct cause of the following exception: Traceback (most recent call last): |
Same issue here, I'm running HA 2023.5.2 where it is not fixed yet. I don't understand the instructions referring to post #218, Should I update the OTGW firmware, or manually change something in OTGW? Sorry in case this is a beginner question, I just try to get rid of my HA error logs, and this one has count of 56269 occurences since 48 hours already |
@rik1984 the fix needs to be validated, but you can download the mqttha.cfg from the dev branch on github. You can find it right here: https://github.com/rvdbreemen/OTGW-firmware/blob/dev/data/mqttha.cfg I have already download the beta build here: If you have some time, then please test it for me. Worst thing that could happen is that it works, and then I can release it. |
Thanks for your guidance. I have manually deleted mqttha.cfg from the file system and uploaded the new version. I can confirm that it solves the issue |
Tested with Home Assistant 2023.8.4 and it solves the error issue in the log. So far all sensors etc seem to work as normal. |
Tested on HA 2023.9.2, works like a charm, otgw sensors look well and stable. (I manually swapped out |
I still face the issue spamming logs like crazy. @rik1984 when deleting and upliading a new mqttha.cfg, did you changed anything in particular? I am using: Home Assistant 2023.9.3
|
No I didn't do anything special, only following the instructions. I'm now running HA9.1 ans will without issues (not sure whether the mqttha.cfg file has been updated along with my HA updates or whether it is still in the version I changed it to, to be honest. |
well, the mqttha.cfg file is on the otgw right? (more specifically on the wifi microcontroller on the otgw), so I don't see how that would be affected by updating ha ;) |
You are right indeed ;) so no changes done there since |
I came across this issue today I have replaced the mqtt config file as suggested, however the MQTT status fields, after a power cycle, still show: -D---W-- And the HA logs: `Logger: homeassistant.components.mqtt.models Exception raised when updating state of sensor.otgw_status_slave, topic: 'OTGW/value/otgw-2CF43257D8CD/status_slave' with payload: b'--------' During handling of the above exception, another exception occurred: Traceback (most recent call last): The above exception was the direct cause of the following exception: Traceback (most recent call last): Any ideas? |
I will have a look into this soon. To see how to fix this. It is most likely a fix to the mqttha.cfg templates that is needed. |
There is a working mqttha.cfg in the devbranch and there are dev binaries candidate available. Issue does not break HA integration. But I do need to release this. 🙈 |
As of the latest version of HA, the status string returned from OTG is throwing an exception
Logger: homeassistant.components.mqtt.models
Source: components/sensor/init.py:583
Integration: MQTT (documentation, issues)
First occurred: 06:42:09 (2631 occurrences)
Last logged: 07:40:29
Exception raised when updating state of sensor.idealboiler_status_slave, topic: 'IdealBoiler/value/idealC40/status_slave' with payload: b'-C-F----'
Exception raised when updating state of sensor.idealboiler_status_slave, topic: 'IdealBoiler/value/idealC40' with payload: b'online'
Exception raised when updating state of sensor.idealboiler_status_master, topic: 'IdealBoiler/value/idealC40' with payload: b'online'
Exception raised when updating state of sensor.idealboiler_status_master, topic: 'IdealBoiler/value/idealC40/status_master' with payload: b'-D---W--'
Exception raised when updating state of sensor.idealboiler_status_slave, topic: 'IdealBoiler/value/idealC40/status_slave' with payload: b'--------'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 579, in state
numerical_value = int(value)
ValueError: invalid literal for int() with base 10: '-D---W--'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/mqtt/models.py", line 270, in process_write_state_requests
entity.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 585, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 649, in _async_write_ha_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 591, in _stringify_state
if (state := self.state) is None:
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 583, in state
raise ValueError(
ValueError: Sensor sensor.idealboiler_status_master has device class None, state class None unit and suggested precision None thus indicating it has a numeric value; however, it has the non-numeric value: -D---W-- (<class 'str'>)
The text was updated successfully, but these errors were encountered: