core icon indicating copy to clipboard operation
core copied to clipboard

Vizio Integration not loading

Open pgsylvestre opened this issue 2 years ago • 18 comments
trafficstars

The problem

Config Flow error 500 and unable to initialize if previously setup in this beta release.

What version of Home Assistant Core has the issue?

2023.5.0b0

What was the last working version of Home Assistant Core?

2023.4.x

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Vizio Smartcast

Link to integration documentation on our website

https://rc.home-assistant.io/integrations/vizio/

Diagnostics information

2023-04-26 21:48:25.581 INFO (MainThread) [homeassistant.setup] Setting up vizio 2023-04-26 21:48:25.581 INFO (MainThread) [homeassistant.setup] Setup of domain vizio took 0.0 seconds

2023-04-26 21:48:28.492 ERROR (MainThread) [homeassistant.components.vizio] Unexpected error fetching vizio data: '' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 258, in _async_refresh self.data = await self._async_update_data() File "/usr/src/homeassistant/homeassistant/components/vizio/init.py", line 123, in _async_update_data if data := await gen_apps_list_from_url( File "/usr/local/lib/python3.10/site-packages/pyvizio/util/init.py", line 46, in gen_apps_list_from_url return gen_apps_list(app_names, app_configs) File "/usr/local/lib/python3.10/site-packages/pyvizio/util/init.py", line 85, in gen_apps_list config_json = app_config["chipsets"][""][0]["app_type_payload"] KeyError: '' 2023-04-26 21:48:28.493 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Vizio SmartCast' for vizio integration not ready yet: ''; Retrying in background

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

pgsylvestre avatar Apr 27 '23 03:04 pgsylvestre

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

Code owner commands

Code owners of vizio 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 vizio Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


vizio documentation vizio source (message by IssueLinks)

home-assistant[bot] avatar Apr 27 '23 03:04 home-assistant[bot]

have you tried restoring to 2023.4.* to confirm it's the beta? as far as I know nothing has changed since this was merged on March 15th which would have made the April release: https://github.com/home-assistant/core/pull/89003

raman325 avatar Apr 27 '23 04:04 raman325

I will give that a try. I did load fine moments before the beta update was installed.

pgsylvestre avatar Apr 27 '23 04:04 pgsylvestre

It’s not the beta. This happens on the previous version as well.

dmulcahey avatar Apr 27 '23 10:04 dmulcahey

I'm on 2023.4.6 and have the same exact error message.

dbs179 avatar Apr 27 '23 13:04 dbs179

I got the same thing on 2023.4.6 and its something wrong in pyvizio. I am assuming the tv had an update and that is what breaking things. I will repo this issue in that repo.

pyvizio --ip {TV-IP} get-apps-list Traceback (most recent call last): File "/usr/local/bin/pyvizio", line 8, in sys.exit(cli()) File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1130, in call return self.main(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1657, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python3.10/site-packages/click/core.py", line 760, in invoke return __callback(args, **kwargs) File "/usr/local/lib/python3.10/site-packages/pyvizio/helpers.py", line 13, in wrapper return asyncio.run(f(args, **kwargs)) File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/usr/local/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete return future.result() File "/usr/local/lib/python3.10/site-packages/pyvizio/cli.py", line 631, in get_apps_list apps = await VizioAsync.get_apps_list(country) File "/usr/local/lib/python3.10/site-packages/pyvizio/init.py", line 726, in get_apps_list apps_list = await gen_apps_list_from_url(session=session) or APPS File "/usr/local/lib/python3.10/site-packages/pyvizio/util/init.py", line 46, in gen_apps_list_from_url return gen_apps_list(app_names, app_configs) File "/usr/local/lib/python3.10/site-packages/pyvizio/util/init.py", line 85, in gen_apps_list config_json = app_config["chipsets"][""][0]["app_type_payload"] KeyError: ''

Reported here: https://github.com/vkorn/pyvizio/issues/141

bjohnson8949 avatar Apr 27 '23 16:04 bjohnson8949

I was seeing this behavior as well. After install HAOS 10.1 and rebooting it is functioning again. ¯_(ツ)_/¯

vcdx71 avatar Apr 27 '23 18:04 vcdx71

I was seeing this behavior as well. After install HAOS 10.1 and rebooting it is functioning again. ¯_(ツ)_/¯

Rebooting it as in TV or home assistant? I have rebooted home assistant and used the reboot option on TV. I haven't tried unplugging but I will now.

bjohnson8949 avatar Apr 27 '23 19:04 bjohnson8949

I was seeing this behavior as well. After install HAOS 10.1 and rebooting it is functioning again. ¯(ツ)

Rebooting it as in TV or home assistant? I have rebooted home assistant and used the reboot option on TV. I haven't tried unplugging but I will now.

I rebooted HA. I had done it previously as well with no luck, not sure why it came back.

vcdx71 avatar Apr 27 '23 19:04 vcdx71

have you tried restoring to 2023.4.* to confirm it's the beta? as far as I know nothing has changed since this was merged on March 15th which would have made the April release: https://github.com/home-assistant/core/pull/89003

I am running on 2023.4.6 and having this issue. I never upgraded to the beta. I have tested a few commands using pyvizio and some work like checking power state or available inputs but get-apps-list fails. I feel like Vizio changed the response but haven't gotten a chance to valid that far.

bjohnson8949 avatar Apr 27 '23 19:04 bjohnson8949

I know what the issue is, it's a change on the Vizio side. I will try to address it tonight, if not this weekend

raman325 avatar Apr 27 '23 20:04 raman325

can you try again? It looks like there was an upstream error, it seems to have resolved itself.

raman325 avatar Apr 27 '23 23:04 raman325

can you try again? It looks like there was an upstream error, it seems to have resolved itself.

I checked for updates on TV and restarted my tv and just to be safe pulled latest docker image which was the same 2023.4.6.

First error in home assistant logs:

Config entry 'Vizio SmartCast' for vizio integration not ready yet: '*'; Retrying in background

Second error:

Unexpected error fetching vizio data: '' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 250, in _async_refresh self.data = await self._async_update_data() File "/usr/src/homeassistant/homeassistant/components/vizio/init.py", line 123, in _async_update_data if data := await gen_apps_list_from_url( File "/usr/local/lib/python3.10/site-packages/pyvizio/util/init.py", line 46, in gen_apps_list_from_url return gen_apps_list(app_names, app_configs) File "/usr/local/lib/python3.10/site-packages/pyvizio/util/init.py", line 85, in gen_apps_list config_json = app_config["chipsets"][""][0]["app_type_payload"] KeyError: '*'

bjohnson8949 avatar Apr 27 '23 23:04 bjohnson8949

ah probably because of the caching I introduced 🤦🏾‍♂️ do you have the ability to run a custom build of pyvizio? I have a fix but I have no good way to test.

raman325 avatar Apr 28 '23 02:04 raman325

https://github.com/vkorn/pyvizio/pull/142

raman325 avatar Apr 28 '23 02:04 raman325

I pulled just pyvizio/util/init.py since everything else was labeled under clean up and replaced my copy in the container and restarted and it picked up my tv and is working now!

Thanks for such a fast turn around!

bjohnson8949 avatar Apr 28 '23 02:04 bjohnson8949

Great I will push a fix for 2023.5 thanks for the report and the testing

On Thu, Apr 27, 2023 at 10:43 PM bjohnson8949 @.***> wrote:

I pulled just pyvizio/util/init.py since everything else was labeled under clean up and replaced my copy in the container and restarted and it picked up my tv and is working now!

Thanks for such a fast turn around!

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/92102#issuecomment-1526901645, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABXILVTW7C5WFSAHBLMBGALXDMVDHANCNFSM6AAAAAAXNIZX2A . You are receiving this because you were mentioned.Message ID: @.***>

-- Raman

raman325 avatar Apr 28 '23 03:04 raman325

Also here for same issue and to confirm 0.1.61 will resolve.

May is just around the corner yet so far away. unofficially sharing of workaround on 2023.4.6 with container:

docker exec homeassistant sed -i 's/0.1.60/0.1.61/' /usr/src/homeassistant/homeassistant/components/vizio/manifest.json

then: restart from ui

vthoang avatar Apr 30 '23 03:04 vthoang

Is there any work around to get this working yet?

I see @vthoang has a fix but that's (only?) for builds running on docker it seems.

coltography avatar May 02 '23 23:05 coltography

Is there any work around to get this working yet?

I see @vthoang has a fix but that's (only?) for builds running on docker it seems.

You can do the same thing manually too. Open homeassistant/components/vizio/manifest.json then change the version from 0.1.60 to 0.1.61

bjohnson8949 avatar May 02 '23 23:05 bjohnson8949

2023.5 will be released tomorrow. Once it's available and you update, no workarounds will be necessary

raman325 avatar May 02 '23 23:05 raman325

this has been released in 2023.5

raman325 avatar May 04 '23 16:05 raman325