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

Matter Thermoset not available after restart of Home Assistant until status change #126073

Closed
craigwitter opened this issue Sep 16, 2024 · 7 comments · Fixed by #126286
Closed

Comments

@craigwitter
Copy link

The problem

My Matter Thermostat (Nest) has no entities available after restart of Home Assistant, until status change. Presently our Thermostat is in the off position, the only way that I am able to get the thermostat to show entities after a restart is to change the state to Heat or Cool. Oddly, the Matter addon interface shows the device is online, it's just not pushing any update to the front end. I am on the latest version of the matter addon (6.5.1).

What version of Home Assistant Core has the issue?

2024.9.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Matter

Link to integration documentation on our website

https://www.home-assistant.io/integrations/matter

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

Hey there @home-assistant/matter, mind taking a look at this issue as it has been labeled with an integration (matter) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of matter can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign matter Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


matter documentation
matter source
(message by IssueLinks)

@craigwitter
Copy link
Author

Restarting the addon has no impact. Addon event log looks clean (at least to me)

Add-on: Matter Server
Matter WebSocket Server for Home Assistant Matter support.

Add-on version: 6.5.1
You are running the latest version of this add-on.
System: Home Assistant OS 13.1 (amd64 / qemux86-64)
Home Assistant Core: 2024.9.2
Home Assistant Supervisor: 2024.09.1

Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.

s6-rc: info: service banner successfully started
s6-rc: info: service matter-server: starting
s6-rc: info: service matter-server successfully started
s6-rc: info: service legacy-services: starting
[14:58:38] INFO: Starting Matter Server...
s6-rc: info: service legacy-services successfully started
[14:58:39] INFO: Using 'enp0s3' as primary network interface.
[14:58:39] INFO: Successfully send discovery information to Home Assistant.
[1726513122.877296][126:126] CHIP:CTL: Setting attestation nonce to random value
[1726513122.884078][126:126] CHIP:CTL: Setting CSR nonce to random value
[1726513122.906133][126:126] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_kvs
[1726513122.906391][126:126] CHIP:DL: writing settings to file (/tmp/chip_kvs-V4f3BK)
[1726513122.906540][126:126] CHIP:DL: renamed tmp file to file (/tmp/chip_kvs)
[1726513122.907052][126:126] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /data/chip_factory.ini
[1726513122.912154][126:126] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /data/chip_config.ini
[1726513122.912869][126:126] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /data/chip_counters.ini
[1726513122.915243][126:126] CHIP:DL: writing settings to file (/data/chip_counters.ini-SvknPI)
[1726513122.915667][126:126] CHIP:DL: renamed tmp file to file (/data/chip_counters.ini)
[1726513122.915731][126:126] CHIP:DL: NVS set: chip-counters/reboot-count = 187 (0xBB)
[1726513122.916490][126:126] CHIP:DL: Got Ethernet interface: enp0s3
[1726513122.916793][126:126] CHIP:DL: Found the primary Ethernet interface:enp0s3
[1726513122.917489][126:126] CHIP:DL: Failed to get WiFi interface
[1726513122.917512][126:126] CHIP:DL: Failed to reset WiFi statistic counts
2024-09-16 14:58:43.374 (Dummy-2) CHIP_ERROR [chip.native.DL] Long dispatch time: 318 ms, for event type 2

@craigwitter craigwitter changed the title Matter Thermost not available after restart of Home Assistant until status change Matter Thermoset not available after restart of Home Assistant until status change Sep 17, 2024
@marcelveldt
Copy link
Member

Can you please also inspect the Home Assistant core log ? I suspect there might be an error in there

@craigwitter
Copy link
Author

Here's from the core log:

2024-09-17 12:16:36.892 ERROR (MainThread) [homeassistant.components.climate] Error adding entity climate.living_room for domain climate with platform matter
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 595, in _async_add_entities
await coro
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 909, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1366, in add_to_platform_finish
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1005, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1130, in _async_write_ha_state
self.__async_calculate_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1069, in __async_calculate_state
if state_attributes := self.state_attributes:
^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/init.py", line 323, in getattribute
return super().getattribute(__name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/init.py", line 542, in state_attributes
hass, self.target_temperature_high, temperature_unit, precision
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/init.py", line 323, in getattribute
return super().getattribute(__name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/functools.py", line 995, in get
val = self.func(instance)
^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/init.py", line 627, in target_temperature_high
return self._attr_target_temperature_high
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/init.py", line 323, in getattribute
return super().getattribute(__name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/init.py", line 323, in getattribute
return super().getattribute(__name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'MatterClimate' object has no attribute '__attr_target_temperature_high'. Did you mean: '_attr_target_temperature_high'?
2024-09-17 12:17:03.839 ERROR (MainThread) [homeassistant.core] Error running job: <Job onetime listen homeassistant_start <function _async_at_core_state.._matched_event at 0x7f471f6374c0> HassJobType.Callback <_OneTimeListener homeassistant.helpers.start:<function _async_at_core_state.._matched_event at 0x7f471f6374c0>>>
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 657, in state
numerical_value = int(value)
^^^^^^^^^^
ValueError: invalid literal for int() with base 10: 'unknown'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 660, in state
numerical_value = float(value)
^^^^^^^^^^^^
ValueError: could not convert string to float: 'unknown'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/core.py", line 1562, in async_fire_internal
self._hass.async_run_hass_job(job, event)
File "/usr/src/homeassistant/homeassistant/core.py", line 937, in async_run_hass_job
hassjob.target(*args)
File "/usr/src/homeassistant/homeassistant/core.py", line 1423, in call
self.hass.async_run_hass_job(self.listener_job, event)
File "/usr/src/homeassistant/homeassistant/core.py", line 937, in async_run_hass_job
hassjob.target(*args)
File "/usr/src/homeassistant/homeassistant/helpers/start.py", line 44, in _matched_event
hass.async_run_hass_job(at_start_job, hass)
File "/usr/src/homeassistant/homeassistant/core.py", line 937, in async_run_hass_job
hassjob.target(*args)
File "/usr/src/homeassistant/homeassistant/components/template/template_entity.py", line 487, in _async_template_startup
result_info.async_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 1122, in async_refresh
self._refresh(None)
File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 1308, in _refresh
self.hass.async_run_hass_job(self._job, event, updates)
File "/usr/src/homeassistant/homeassistant/core.py", line 937, in async_run_hass_job
hassjob.target(*args)
File "/usr/src/homeassistant/homeassistant/components/template/template_entity.py", line 436, in _handle_results
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1005, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1130, in _async_write_ha_state
self.__async_calculate_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1067, in __async_calculate_state
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1011, in _stringify_state
if (state := self.state) is None:

@marcelveldt
Copy link
Member

Ah look, the device is sending a null value where it should have been an integer.
Ofc that is strictly speaking a device issue but I'll patch it on our side.

@craigwitter
Copy link
Author

craigwitter commented Sep 17, 2024 via email

@mkkm2112
Copy link

mkkm2112 commented Sep 18, 2024

Hello. I have the same problem. 4 matter Nest thermostats (my apartment has 4 individual air conditioner/heater units.)

Since a recent update, all devices show unavailable. They are visible in Google Home (where I set them up 1.5 yrs ago). If one goes into the device info, there is a switch. That turns the unit on and then the unit shows as available and is controllable. However, when switched off, the unit disappears from HA in 30-60 seconds. Also, the unit log constantly shows "Nest thermostat switch turned off" followed by "Nest thermostat switch became unavailable" once every 30-60 seconds.

Also, if I turn a specific unit on using Google Home, it becomes visible in Home Assistant. Even when visible the log shows it go offline for a brief half second every 30-60 seconds.

It was working superbly well for 1.5 yrs. Please help.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants