Closed dawiinci closed 2 years ago
Hi.
Sorry, but I do not understand what you are referring to with a 'token'. Perhaps if you explain to me, in detail, how to replicate your issue then I can try to be of more help.
I have set up many test instances of both HyperHDR and Home Assistant (along with the integration) and all I have ever needed to connect them is the ip address of the HyperHDR instance; I have never needed a token before.
For a simple setup guide, please follow the steps in the wiki.
Under Token management inside Network services are entries from Home Assistant. They are made by going to hyperhdr frontend. This is probably an automatic feature of HA.
I have these settings enabled:
Mainly because it wasn't working without that. Should I configure using yaml? If so, how?
Thank you for the explanation of how you are setting up tokens.
I have never used tokens before and I was able to do some testing today however I was unable to replicate the error shown in your logs.
I typically use the default settings shown below:
I discovered that the tokens are required after "Local API Authentication" is enabled. After enabling Local API Authentication and clicking save I set up the integration in two different ways
Both attempts were successful.
The only way I was able to force a failure during the setup was to block HyperHDR from communicating using the firewall of the system it is running on. This did cause the setup to fail but resulted in a very different Home Assistant log message:
2022-05-12 14:59:52 WARNING (MainThread) [hyperhdr.client] Failed HyperHDR (192.168.41.41:19444) command: {'command': 'sysinfo', 'error': 'No Authorization', 'success': False, 'tan': 1}
Afterward, I removed the block in the firewall then went through setup again and it worked without issue.
The only things I can think of for you to check and/or try are:
Sorry, forgot to answer your last question in my long reply. There is not a way to set up the integration using yaml.
Thanks. It is, however, still not working.
Logger: hyperhdr.client
Source: /Users/server/homeassistant/lib/python3.9/site-packages/hyperhdr/client.py:624
First occurred: 20:17:34 (7 occurrences)
Last logged: 20:18:40
Failed HyperHDR (localhost:19444) command: {'command': 'authorize', 'error': 'Errors during specific message validation, please consult the HyperHDR Log', 'success': False, 'tan': 1}
Failed HyperHDR (localhost:19444) command: {'command': 'authorize-requestToken', 'error': 'Token request timeout or denied', 'success': False, 'tan': 1}
I see the IP address you entered was actually a hostname? e.g. localhost
What device are you using to host HyperHDR?
I am on macOS. And I tried the ip as well.
What is your Home Assistant running on?
I still think something on the HyperHDR host (your mac) is blocking communications.
As a fairly simple test, please try setting up the HyperHDR addon in Home Assistant and connecting my integration to it. I just now tested setting up my integration with that addon and it worked perfectly.
After installing and starting the addon visit its webpage to make sure it is running but don't change any settings, then set up my integration (manual setup is fine for a 1-off test) and just provide the LAN IP address of your Home Assistant instance.
If the test works then it points to your mac as being the source of the communication issue. I do not have a mac so I don't know how to help further with that.
If the test doesn't work then it points to something in your Home Assistant configuration as the culprit and I would ask that you follow the instructions to set up a fresh Virtual Machine of Home Assistant OS (don't import a backup, just set it up as basic as possible) then install the HyperHDR addon linked above and set up my integration to verify connectivity/functionality.
These tests should help to narrow down where the issue may be coming from; please let me know the results.
If all of the above tests still fail then I'm not sure how to be of further help as I cannot reproduce a setup failure without intentionally blocking communication between Home Assistant and HyperHDR.
Everything is running on the same Mac. I use Core (python venv) installation, so the addon can’t be used.
Thanks for your help though.
Version of the custom_component
0.0.6
Tested with HyperHDR 17.0.0.0 and 18.0.0.0b2
Configuration
I just wanted to add the integration in the frontend, but it fails to configure.
Describe the bug
I can get a token which is shown in HyperHDR but in the next step the integration just shows "error".
Logs