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

Integration not changing activities inside activity group + question on PIN-authentication #22

Open
RC-Thoughts opened this issue Mar 7, 2024 · 7 comments

Comments

@RC-Thoughts
Copy link

After latest update to v.0.6.0 I'm unable to change activities from drop-down control. All my activities are inside activity group so old switches are not working anymore.

Version info
HA 2024.3.0
Supervisor 2024.02.1
HACS 1.34.0
Python 3.12.2

To Reproduce
Steps to reproduce the behavior:

  1. Go to device
  2. Select another activity from drop-down list

Expected behavior
Remote Two should change to selected new activity

** Question**
After every restart of HA a new remote two device is found asking for PIN, is this expected behavior?

Screenshots
image

@JackJPowell
Copy link
Owner

Hi @RC-Thoughts,

You probably know this, but just to be sure, the remote itself will not open the activity or alter its display upon activity change. If you have your activities listed on a screen, the old activity will say Off while the switched activity will say On, but that is as far as HA can take things.

Now, are you saying that when you select a new activity from the dropdown, the above isn't happening? If so, can you go into settings > system > logs after trying to switch an activity and look to see if anything is there for the unfolded circle remote? And then paste them here.

As for your other question, is this occurring even after Ignoring the discovery? On the integration page, if you click the tornado looking icon and then show ignored integrations, do you see multiple Unfolded Circle discoveries? (This would only be the case if you have been clicking ignore on them. If you have never done that, this won't apply)

In other words, if you Ignore it, does it show up again on the next reboot?

image

@RC-Thoughts
Copy link
Author

Now, are you saying that when you select a new activity from the dropdown, the above isn't happening?

No, it does not.

In the 0.3.x version we had switches to start and stop activities. In 0.6.0 selecting a activity from drop-down should to my understanding start that activity, this does not happen. So currently in 0.6.0 I have no way to control R2 from HA.

And logs are filled with lines:
2024-03-08 13:10:29.770675 +00:00 core ERROR Error encountered while processing the incoming HTTP request: AuthError("Authentication error")

Regarding the ignore reconfig, if I ignore the discovered integration and restart HA the integrations does not work since I get a message "Integration requires reconfiguration" with error "Failed to set up" and as mouseover "could not authenticate". So I need to reconfigure the integration ie need to give the pin-code again. I have only one ignored unfolded-integration in my ignored-list.

@RC-Thoughts
Copy link
Author

RC-Thoughts commented Mar 8, 2024

And here's the authentication-issue (repeating loglines in R2 logs) seen from HA logs:

2024-03-08 15:22:20.719 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/pyUnfoldedCircleRemote/remote.py", line 1264, in update_data data = await self._remote.get_entity_data(self._id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyUnfoldedCircleRemote/remote.py", line 1155, in get_entity_data await self.raise_on_error(response) File "/usr/local/lib/python3.12/site-packages/pyUnfoldedCircleRemote/remote.py", line 416, in raise_on_error raise HTTPError(response.status, msg) pyUnfoldedCircleRemote.remote.HTTPError: ('401 Request: NOT_AUTHORIZED Reason: Authentication error', 401)

@RC-Thoughts
Copy link
Author

Ok, more testing and diagnosing done, I think we know now what happens.

If you have 0.3.0 installed and update to 0.6.0 you end up with two devices under the integration, one with 1 entity and one with 24 entities. Going to any of those will show the 24 entities, you also have integration finding remote after every reboot and drop-down starting of activities does not work due authentication issue.

If you remove the integration and re-install you end up in same situation with two devices and this is where the authentication-issues occur.

Instead, you need to remove the devices from integration, then reinstall the integration. Now you get asked about the host and pin, and after that both issues are resolved. No more faulty discoveries and also the drop-down start of activities work.

Maybe the update process could use some tuning?

As an issue this is now solved.

@JackJPowell
Copy link
Owner

Thanks for the extra diagnosis and I'm glad you have it working! I definitely tested the upgrade path from .3.0 but I'll reinstall it and try again. Looks like I missed something.

Any chance you have the ID of the lone entity in the other device? Or just remember what type it was?

@RC-Thoughts
Copy link
Author

Unfortunately no ID since I cant see it anywhere anymore. The type was the same as the present one.
About the update, I did the update from HACS, you maybe did it differently?

@JackJPowell
Copy link
Owner

It was a great thought, but not quite it.

  1. Delete current integration and redownload 0.3.1 from HACS
  2. Restart Home Assistant and add back Unfolded Circle Remote (13 Entities as expected)
  3. Upgrade via HACS and restart HA
  4. Verified a single device listed with 25 entities as expected

Oh well, back to the drawing board. Thanks for the extra help.

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

No branches or pull requests

2 participants