Closed weha closed 1 year ago
This is almost always permission related. Are you certain the user has appropriate permissions? Can you try with an root key/secret to ensure the integration otherwise works in your environment?
These permissions work fine:
@travisghansen @alexdelprete It seems that when migrating to another device and transferring the configuration does not include the priviliges... it worked before the migration so I did not think about this. Would it be possible to change / add information in the error about this? Because now it's so generic that it more likely seems an issue with the plugin.
It’s not always a permission error. The error is so generic from the api that I can’t really assume that either but perhaps someday I will just male that assumption.
Hey,
I have been facing this error recently as well.
Trying the root or any other admins
users.
Do you happen to know whether there are any opnsense logs that could help identify the error from the opnsense api side?
Can you share the hass logs? I recently added code that should give a little better insight from the hass side about what is causing the issue.
I have been facing this error recently as well.
recently means it was working before and now it breaks? can you show the log please?
recently means it was working before and now it breaks
It has worked before with I believe an older opnsense version, but I didn't have any monitoring to exactly pinpoint the date when the integration broke.
Can you share the hass logs?
Sure, I am using version v0.1.13
2023-01-31 20:15:20.685 ERROR (SyncWorker_6) [custom_components.opnsense.pyopnsense] Unexpected get_system_info error err=TypeError('string indices must be integers'), type(err)=<class 'TypeError'>
2023-01-31 20:15:20.695 ERROR (MainThread) [custom_components.opnsense.config_flow] Unexpected err=TypeError('string indices must be integers'), type(err)=<class 'TypeError'>
Hello. I hope you can help. I have installed the os-homeassistant-maxit plugin version 1.0. The Version of my OpnSense Firewall (IP 192.168.100.1 is 23.1_6. When I try to connact home assistant (IP 192.168.1.23) to my Opnsense, I got a time out error or unexpected error. I have a new user with the privileges created. Changing firewall rules doesn't work. What I making wrong? What login shell for user in opnsense I have to choose?
Thanks a lot in advance.
Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht
Logger: custom_components.opnsense.pyopnsense Source: custom_components/opnsense/pyopnsense/init.py:100 Integration: OPNsense (documentation, issues) First occurred: 21:17:37 (6 occurrences) Last logged: 21:18:33
Unexpected get_system_info error err=TimeoutError('timed out'), type(err)=<class 'TimeoutError'> Unexpected get_system_info error err=TypeError('string indices must be integers'), type(err)=<class 'TypeError'>
Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht
Logger: custom_components.opnsense.config_flow Source: custom_components/opnsense/config_flow.py:148 Integration: OPNsense (documentation, issues) First occurred: 21:18:25 (4 occurrences) Last logged: 21:18:33
Unexpected err=TypeError('string indices must be integers'), type(err)=<class 'TypeError'>
I think someone is going to have to get a dev env setup and just start digging into the code :( or if someone can get me temporary access to your fw I can help as well (I assure you, I have not interest in your fw beyond getting the integration going).
t has worked before with I believe an older opnsense version, but I didn't have any monitoring to exactly pinpoint the date when the integration broke.
what version of HA? Can you please try creating a new user, with the privileges of my first post in the thread (check the screenshot), remove the integration and re-add it using the new user?
t has worked before with I believe an older opnsense version, but I didn't have any monitoring to exactly pinpoint the date when the integration broke.
what version of HA? Can you please try creating a new user, with the privileges of my first post in the thread (check the screenshot), remove the integration and re-add it using the new user?
Hello Alex,
thank you for help. I will try it today on evening. At work I have no access to my opnsense. I will come back as soon as possible.
Ronny
I think someone is going to have to get a dev env setup and just start digging into the code :( or if someone can get me temporary access to your fw I can help as well (I assure you, I have not interest in your fw beyond getting the integration going).
Hello Travis,
thank you for your help. But access to my firewall :-| I don't know, if I want this. Let my think about it. May be I found annother solution. Nevertheless, thank you for your help. I will try Alex's procedure tonight.
Totally understandable.
Hello Together,
here my further information:
OpnSense Version 23.1_6 HA Version 2023.1.6 (OP 9.5 / SuperV 2023.01.1) -> installed in a VM on my Synology DS918+
IP OpnSense 192.168.100.1 IP HA 192.168.1.23 (is in an access rule to allow to connect to Management consule) PlugIn os-homeassistant-maxit was deleted and installed again via SSH (Version 1.0)
What I have done:
I hope you have an idea and can help. Home Assistant is fantastic and I would monitor my internet speed in a dashboard. From where to where counts the secret api key? From "key="? Or from "=" or AFTER "key="? It is a little bit unclear.
Thank you very much in advance and have a nice week and please stay healthy.
Ronny
After key=
I have found the error. It was my fault!!! I copied too much from the text file when I entered it. I had not seen that the text file generated by Opnsense contained both Api Key and Api Secret.
I apologise very much. Now it works fine. ;-)
Have a nice weekend and please stay healthy.
Ronny
When I try to add the firewall it gives me this error in the log (unexpected error in the ui): ERROR (MainThread) [custom_components.opnsense.config_flow] Unexpected err=TypeError('string indices must be integers'), type(err)=<class 'TypeError'>
OpnSense + plugin & HASS + plugin is up to date