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
Unable to do initial configuration #9
Comments
Welcome! Yeah not sure entirely where this thing will go, but we'll run with it for a little bit and see what happens. A couple of the parts of the README haven't really been tweaked to move over from pfSense to OPNsense so I wouldn't worry about those minor configuration issues you missed. I would also revert the changes to the tunable (it's not really necessary with how the integration works). OK, so to the issue at hand, it may be a little difficult to debug this but if you are willing to dig in the easiest thing to do will be to hack this line here: https://github.com/travisghansen/hass-opnsense/blob/main/custom_components/opnsense/pyopnsense/__init__.py#L47 Beware it will log your OPNsense creds, but will provide some valuable data. Try to enable it and then send over the cleansed output so we can try to see what is causing the data to return incorrectly (I'm guessing it will take even more than this however). |
I set verbose to True and restarted HA, but I don't see any change in the logs. It's re-logged the same stack trace as above a few times. I'm looking in /config/logs (URL) is there a better place to look? I'm available for screen-share over Jitsi or Discord if that's easier. |
Sure ping me on discord and we can get something setup.. |
How do I find you? I just joined the Home Assistant server. I joined the Lobby Hangout voice channel. |
What account are you using to authenticate with OPNsense, is it an admin one? If not, did you double-check it has The errors you have are right after you add the integration or after you configure it? It's not clear based on your first post. Everything's working fine here, with same HA/OPNsense versions... |
We discovered the issue leading to this actually. It was a division by 0 error due to having no swap. Fixed in commit e4a892e |
That's why you need more testers, everybody has its specific setup...glad it was fixed. Travis, could you put a debug switch in the addon configuration so users can turn it on without hacking files? |
It’s likely to cause more problems than help. The critical thing to view is the errors on the opnsense dashboard actually as they tell is exactly what is erroring out. |
We’ll keep an eye on it though and see where the needs go. |
Super excited for this integration!
I followed most of the instructions in the README. My OPNSense version 21.7.5 doesn't have System -> Advanced so I wasn't able to set Max Processes despite looking around for it.
Also my tunables are under System > Settings > Tunables rather than System -> Advanced -> System Tunables and I had to manually add net.link.ether.inet.max_age, which I set to 300.
I added your repo to HACS and installed it, restarted HA, refreshed my browser and I see the integration in the Configuration > Integrations but when I add it, I get "Retrying setup: the JSON object must be str, bytes or bytearray, not bool" but I am able to see my devices in the Device Tracker Options, so some aspect of it is working.
I double-checked the permissions/ownership/content of the PHP files and they seem fine.
My Home Assistant is version 2021.11.4.
Please let me know if I can help or provide more information!
Lastly here's the stack trace from the logs:
This error originated from a custom integration.
Logger: custom_components.opnsense
Source: custom_components/opnsense/pyopnsense/init.py:91
Integration: OPNsense (documentation, issues)
First occurred: 2:01:19 PM (108 occurrences)
Last logged: 2:20:53 PM
The text was updated successfully, but these errors were encountered: