core icon indicating copy to clipboard operation
core copied to clipboard

Venstar thermostats unavailable after upgrade to 2024.10

Open timborino opened this issue 1 year ago • 14 comments

The problem

After updating to Home Assistant Core 2024.10, venstar thermostats show unavailable. Cards display a banner that says "This entity is no longer being provided by the venstar integration. If the entity is no longer in use, delete it in settings."

The thermostats were installed last year per the integration docs and have been working great with no problems until now.

venstar1 venstar2 venstar3

What version of Home Assistant Core has the issue?

2024.10.0

What was the last working version of Home Assistant Core?

2024.9.3

What type of installation are you running?

Home Assistant OS

Integration causing the issue

venstar

Link to integration documentation on our website

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

Diagnostics information

home-assistant_venstar_2024-10-03T20-03-53.397Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: root
Source: /usr/local/lib/python3.12/site-packages/venstarcolortouch/venstarcolortouch.py:233
First occurred: 2:13:30 PM (4 occurrences)
Last logged: 2:18:49 PM

Unknown thermostat model VYG-4800, inferring API tempunits of Fahrenheit


Logger: homeassistant.components.binary_sensor
Source: helpers/entity_platform.py:595
integration: Binary sensor (documentation, issues)
First occurred: 2:13:33 PM (36 occurrences)
Last logged: 2:18:52 PM

Error adding entity None for domain binary_sensor with platform venstar
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 765, in _async_add_entity
    if self.config_entry and (device_info := entity.device_info):
                                             ^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/venstar/entity.py", line 37, in device_info
    fw_ver_major, fw_ver_minor = self._client.get_firmware_ver()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: too many values to unpack (expected 2)


Logger: homeassistant.components.climate
Source: helpers/entity_platform.py:595
integration: Climate (documentation, issues)
First occurred: 2:13:33 PM (4 occurrences)
Last logged: 2:18:52 PM

Error adding entity None for domain climate with platform venstar
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 765, in _async_add_entity
    if self.config_entry and (device_info := entity.device_info):
                                             ^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 324, in __getattribute__
    return super().__getattribute__(__name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/venstar/entity.py", line 37, in device_info
    fw_ver_major, fw_ver_minor = self._client.get_firmware_ver()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: too many values to unpack (expected 2)


Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:595
integration: Sensor (documentation, issues)
First occurred: 2:13:33 PM (48 occurrences)
Last logged: 2:18:52 PM

Error adding entity None for domain sensor with platform venstar
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 765, in _async_add_entity
    if self.config_entry and (device_info := entity.device_info):
                                             ^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/venstar/entity.py", line 37, in device_info
    fw_ver_major, fw_ver_minor = self._client.get_firmware_ver()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: too many values to unpack (expected 2)

Additional information

{ "api_ver": 7, "type": "commercial", "model": "VYG-4800", "firmware": "2.23.19" }

{ "name": "451 WEST", "mode": 3, "state": 0, "fan": 0, "fanstate": 0, "tempunits": 0, "schedule": 1, "schedulepart": 0, "holiday": 0, "override": 0, "overridetime": 0, "forceunocc": 0, "spacetemp": 73, "heattemp": 68, "cooltemp": 72, "cooltempmin": 68, "cooltempmax": 99, "heattempmin": 36, "heattempmax": 78, "setpointdelta": 2, "activestage": 0, "hum_active": 0, "hum": 0, "hum_setpoint": 0, "dehum_setpoint": 99, "availablemodes": 0 }

{ "api_ver": 7, "type": "commercial", "model": "VYG-4800", "firmware": "2.23.19" }

{ "name": "451 EAST", "mode": 3, "state": 0, "fan": 0, "fanstate": 0, "tempunits": 0, "schedule": 1, "schedulepart": 0, "holiday": 0, "override": 0, "overridetime": 0, "forceunocc": 0, "spacetemp": 73, "heattemp": 68, "cooltemp": 72, "cooltempmin": 68, "cooltempmax": 99, "heattempmin": 36, "heattempmax": 78, "setpointdelta": 2, "activestage": 0, "hum_active": 0, "hum": 0, "hum_setpoint": 0, "dehum_setpoint": 99, "availablemodes": 0 }

timborino avatar Oct 03 '24 20:10 timborino

Hey there @garbled1, @jhollowe, mind taking a look at this issue as it has been labeled with an integration (venstar) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of venstar 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 venstar 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)


venstar documentation venstar source (message by IssueLinks)

home-assistant[bot] avatar Oct 03 '24 20:10 home-assistant[bot]

Downgraded to 2024.9.3 and thermostats came back online. home-assistant_venstar_2024-10-04T16-35-44.396Z.log

timborino avatar Oct 04 '24 16:10 timborino

I am having the same issue though I never upgraded to 2024.10 and am currently on:

Core  2024.9.3
Supervisor  2024.09.1
Operating System   13.1
Frontend   20240909.1

UPDATE Hmmm just now checking and it is offline in the VENSTAR Android app itself. I disconnected the T2000 from the wall and then reconnected it. It restarted and everything is now showing up in the VENSTAR android app AND Home Assistant. Just needed a quick reboot.

kimocal avatar Oct 04 '24 16:10 kimocal

I encountered this same problem. Rebooting the thermostat and then HA fixed the problem for me. Thanks @kimocal for that tip!

Looks like my T2000 updated its own firmware from 5.28 to 5.65 recently. I'm not sure if/how that's related (probably not at all, since the OP had this problem with a different model... unless they released firmware updates for all models around the same time?), but figured I'd mention it here just in case it's relevant.

Side note: I reported a bug to Venstar a year ago, and they said the fix should be present in the new firmware. Previously the "fan" and "fanstate" entries in the json were not behaving correctly. I'll have to watch it go through various combinations of activity before concluding that it's fully fixed, but... so far so good.

tcfurrer avatar Oct 06 '24 02:10 tcfurrer

yeah, I reported that the fan and fanstate values were swapped in the returned API data for the T2000 and Venstar said it would be fixed in the next (after 5.28) firmware.

jhollowe avatar Oct 06 '24 02:10 jhollowe

I wonder if this is related to #112673

jhollowe avatar Oct 06 '24 02:10 jhollowe

I wonder if this is related to #112673

I noticed that issue as well, but this is different behavior. I never lost connectivity before 2024.10. It stopped working altogether after the update, and reloading doesn't help. Rolling back to the 2024.9.3 brings it back online and stable.

I was thinking it might be related to #126542 mentioned in the 2024.10 release notes.

timborino avatar Oct 06 '24 15:10 timborino

I encountered this same problem. Rebooting the thermostat and then HA fixed the problem for me. Thanks @kimocal for that tip!

Looks like my T2000 updated its own firmware from 5.28 to 5.65 recently. I'm not sure if/how that's related (probably not at all, since the OP had this problem with a different model... unless they released firmware updates for all models around the same time?), but figured I'd mention it here just in case it's relevant.

Side note: I reported a bug to Venstar a year ago, and they said the fix should be present in the new firmware. Previously the "fan" and "fanstate" entries in the json were not behaving correctly. I'll have to watch it go through various combinations of activity before concluding that it's fully fixed, but... so far so good.

If it loses connectivity in ha again, check if the local api is responding before you reboot it.

timborino avatar Oct 06 '24 15:10 timborino

same issue when updating to 2024.10

BC48329 avatar Oct 07 '24 21:10 BC48329

Same issue after upgrade to 2024.10 I have 14 Venstars! API works from browser, and I see requests going back and forth in tcpdump. Rebooting a sample Venstar did not help

Have not yet downgraded.

2024-10-08 16:32:56.124 ERROR (MainThread) [homeassistant.components.binary_sensor] Error adding entity None for domain binary_sensor with platform venstar 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 765, in _async_add_entity if self.config_entry and (device_info := entity.device_info): ^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/venstar/entity.py", line 37, in device_info fw_ver_major, fw_ver_minor = self._client.get_firmware_ver() ^^^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: too many values to unpack (expected 2)

broswell avatar Oct 08 '24 16:10 broswell

What firmware version are you running on the thermostats? I'm on 2024.10 but my thermostat (T2000) is still on 5.28 (firewalled off so it doesn't update until I specifically allow it internet) and I don't have any issues (this or #112673).

That ValueError: too many values to unpack (expected 2) is interesting. Can you add the output of the info endpoint (see my comment on other issue for steps)? I wonder if they changed the format of the version string in the new firmware which is causing the parsing of the version to break.

jhollowe avatar Oct 08 '24 20:10 jhollowe

I have a total of 14 units. All are one of two varients

{"api_ver":7,"type":"commercial","model":"VYG-4900","firmware":"2.23.19"} {"api_ver":7,"type":"commercial","model":"VYG-4800","firmware":"2.23.19"}

Bob Roswell @.*** 410-771-5544 ext 4336

Computer Museum Highlightshttp://museum.syssrc.com/

@.***

From: John Hollowell @.> Sent: Tuesday, October 8, 2024 4:25 PM To: home-assistant/core @.> Cc: Bob Roswell @.>; Comment @.> Subject: [EXTERNAL] Re: [home-assistant/core] Venstar thermostats unavailable after upgrade to 2024.10 (Issue #127498)

What firmware version are you running on the thermostats? I'm on 2024.10 but my thermostat (T2000) is still on 5.28 (firewalled off so it doesn't update until I specifically allow it internet) and I don't have any issues (this or the intermittent failure).

That ValueError: too many values to unpack (expected 2) is interesting. Can you add the output of the info endpoint (see my comment on other issue for stepshttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_home-2Dassistant_core_issues_112673-23issuecomment-2D2046486495&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=IdFC6KVjMh11poEAtOxdlSfBzRH90l3lbPvEjfJS1FE&m=i3ioKvbAYjRqAQk0LlJlbEVTHR5r8o0Pse8l92twdVftFO2b7KnqQYKt_HcmQR45&s=Bs5VirtkMeG0w2-YSPVHKRcpizxfi2wP5UGOWBJKHq0&e=)? I wonder if they changed the format of the version string in the new firmware which is causing the parsing of the version to break.

Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_home-2Dassistant_core_issues_127498-23issuecomment-2D2400755181&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=IdFC6KVjMh11poEAtOxdlSfBzRH90l3lbPvEjfJS1FE&m=i3ioKvbAYjRqAQk0LlJlbEVTHR5r8o0Pse8l92twdVftFO2b7KnqQYKt_HcmQR45&s=nevG9UPwvv9_ohyLp5NqzpY2qatj-X0LHxvVXmDq51Y&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ABORPT5QMOAI6JPMDN22QQTZ2Q5SJAVCNFSM6AAAAABPKQ5NDSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBQG42TKMJYGE&d=DwMCaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=IdFC6KVjMh11poEAtOxdlSfBzRH90l3lbPvEjfJS1FE&m=i3ioKvbAYjRqAQk0LlJlbEVTHR5r8o0Pse8l92twdVftFO2b7KnqQYKt_HcmQR45&s=oO7kO81TLmO_isFXV3g5MIxCta_W_BaFHg3_EgCFPkM&e=. You are receiving this because you commented.Message ID: @.@.>>

broswell avatar Oct 08 '24 20:10 broswell

I wonder if this is related to #112673

I noticed that issue as well, but this is different behavior. I never lost connectivity before 2024.10. It stopped working altogether after the update, and reloading doesn't help. Rolling back to the 2024.9.3 brings it back online and stable.

I was thinking it might be related to #126542 mentioned in the 2024.10 release notes.

@epenet could this be related?

timborino avatar Oct 08 '24 23:10 timborino

And do you get the ValueError: too many values to unpack (expected 2) with those? It looks like the x.y.z version of the thermostat is messing up the version string parsing

jhollowe avatar Oct 09 '24 00:10 jhollowe

I think the issue comes instead from #125987 Previously the first two keys were used, even if there were three. After #125987 it is assumed there are always just two keys in the firmware version

Cc @albertomontesg

epenet avatar Oct 09 '24 05:10 epenet

If you take a look at https://github.com/home-assistant/core/tree/dev/tests/components/venstar/fixtures, you will see that colortouch and t2k have 5 sample files, but vyg4800 has none.

If you are able to provide the corresponding 5 files (it seems maybe info + root are in the issue description but not the other 3) then it will make the integration more robust going forward.

epenet avatar Oct 09 '24 05:10 epenet

If you take a look at https://github.com/home-assistant/core/tree/dev/tests/components/venstar/fixtures, you will see that colortouch and t2k have 5 sample files, but vyg4800 has none.

If you are able to provide the corresponding 5 files (it seems maybe info + root are in the issue description but not the other 3) then it will make the integration more robust going forward.

Sample files attached. I just loaded the query URLs in Chrome, saved the output, and prefixed the filenames with my model number.

I don't know how to "Prettify" them like the other sample files. Is that just cosmetic for human readability?

Thank you for the suggestion and your contributions!

timborino avatar Oct 09 '24 21:10 timborino

It looks like there was a bug fix but I don't know how to use it? Any direction?

HD3L3C7R0 avatar Oct 09 '24 21:10 HD3L3C7R0

@HD3L3C7R0

It looks like there was a bug fix but I don't know how to use it? Any direction?

Download all the files in the venstar folder. You can use this nifty tool to download just that folder instead of the whole repo.

Edit the manifest.json file - add a comma at the end of the requirements line, and add in a fake version number.

{
  "domain": "venstar",
  "name": "Venstar",
  "codeowners": ["@garbled1", "@jhollowe"],
  "config_flow": true,
  "documentation": "https://www.home-assistant.io/integrations/venstar",
  "iot_class": "local_polling",
  "loggers": ["venstarcolortouch"],
  "requirements": ["venstarcolortouch==0.19"],
  "version": "1.2.3"
}

This may not be necessary, but I renamed the downloaded venstar folder to custom-venstar.

Then upload the folder to /config/custom_components and restart Home Assistant.

Finally, I went to the Integrations page and the Venstar component now has an orange circular icon with a box meaning it's loading the custom integration.

Hope that helps! Just remember that when the fix is officially released in an update to remove the folder you uploaded to the custom_components folder.

cvick avatar Oct 09 '24 23:10 cvick

The fix is live in the core update

HD3L3C7R0 avatar Oct 12 '24 16:10 HD3L3C7R0

Just updated. Working great

BC48329 avatar Oct 12 '24 17:10 BC48329

FIXED after updating to Core 2024.10.3


I just updated to 2024.10.2 and it's showing as Unavailable:

image

I rebooted the vm and have tried reloading the integration.

kimocal avatar Oct 16 '24 19:10 kimocal