Issue with Control4 integration: "error": "Unauthorized", "details": "Expired or invalid token"

So this started a few days ago with my Control4 integration. I still get updates in Home Assistant when I turn lights on or off from C4 or the keypads/dimmers. However, any change originating from Home Assistant gets the following error message:

Failed to call service light/turn_off. { “error”: “Unauthorized”, “details”: “Expired or invalid token” }

Now, I haven’t changed anything on the authentication side either from the customer.control4.com page or on the controller itself. I still see pyControl4 as a device in my customer portal. I’d like to know if there’s a way to clear/reset/update the token without having to delete and re-add the integration as that would probably screw up my programming in HA. Any ideas?

Fairly new HA user. I set up the Control4 Integration a few weeks ago. Everything worked great. But a few days ago, I have this same issue. The status of the integration is “Failed to set up”. I do not see any place to go to refresh the token or even view the credentials I used to set up the integration.
I know this is over a year later, but did you ever find a solution?

Fixed it. At some point recently I change my Control4 password, that is why the integration was failing to load. I unhid the .storage folder from Studio Code Server so I could edit core.confg_entries. Found the creds there and updated them. Then had to reboot HA.
Would be nice to have a better message in the UI. It just said “Failed to set up”. The log file has more information, but somewhat cryptic. And there should be a way to update the password from the UI.

Hopefully this helps someone else.

After a power outage I started getting similar messages. I have the red exclamation point and “Failed to set up” in the UI.

I checked the core.config_entries file and the login is correct. My other devices that use that account are all able to connect to the EA controller so I believe that the HA driver is in some kind of stuck state. These are the errors I"m seeing in the log:

2024-04-29 22:47:16.130 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry control4_ea5_000XXXXXXXXXX for control4
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 551, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/control4/__init__.py", line 77, in async_setup_entry
    director_token_dict = await account.getDirectorBearerToken(controller_unique_id)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyControl4/account.py", line 234, in getDirectorBearerToken
    data = await self.__sendControllerAuthRequest(controller_common_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyControl4/account.py", line 137, in __sendControllerAuthRequest
    async with self.session.post(
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 1197, in __aenter__
    self._resp = await self._coro
                 ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 608, in _request
    await resp.start(conn)
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 976, in start
    message, payload = await protocol.read()  # type: ignore[union-attr]
                       ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/streams.py", line 640, in read
    await self._waiter
aiohttp.client_exceptions.ServerDisconnectedError: Server disconnected

Any help would be greatly appreciated. I have 90 devices imported from C4 and I would prefer to not have to re-create them.