johlc / pfsense-fauxapi-ha Goto Github PK
View Code? Open in Web Editor NEW!DEPRECIATED! A custom component for Home Assistant that interfaces with FauxAPI installed on a pfSense device
License: MIT License
!DEPRECIATED! A custom component for Home Assistant that interfaces with FauxAPI installed on a pfSense device
License: MIT License
Can you share your configuration.yaml you used for your download and upload sensor in Mbps
Don't showing information gateways
Looks great, thanks for your work.
The intructions refer to function-info.py
, but it's not in the code
Error in home assistant log:
No file found 'custom_components/pfsense_fauxapi/manifest.json' – HACS (ERROR)
Obviously this means there is no manifest.json file
How do I configure download and upload Mbps as it's showed in the screenshot?
It would be really nice if this was available to install via HACS.
If i get time i may try to submit a pull request to provide HACS compatibility, but the guidelines are listed here: https://hacs.xyz/docs/publish/start
I have my firewall configured to use 4343 instead of 443 for security purposes (plus it conflict with web services behind it on that port. Try as I might I could not get this going with port 4343.
I tried:
switch:
switch:
switch:
I also tried all combinations with:
pf_api_restart: "python3 /config/custom_components/pfsense_fauxapi/function-reboot.py 192.168.2.1:4343 PFFAXXX
pf_api_command: "python3 /config/custom_components/pfsense_fauxapi/function-iterate.py 192.168.2.1:4343 PFFAXXX
These were the errors I got:
`
2021-06-24 20:11:53 ERROR (SyncWorker_3) [custom_components.pfsense_fauxapi.switch] Problem getting rule set from pfSense host: 192.168.2.1. Likely due to API key or secret. More Info:HTTPSConnectionPool(host='192.168.2.1', port=443): Max retries exceeded with url: /fauxapi/v1/?action=config_get&__debug=true (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f864280ee20>: Failed to establish a new connection: [Errno 110] Operation timed out'))
2021-06-24 20:18:03 ERROR (SyncWorker_22) [homeassistant.components.command_line] Command failed: python3 /config/custom_components/pfsense_fauxapi/function-iterate.py 192.168.2.1:4343 PFFAcredential1 3jmtdkbfvp3kndq5wswavbq4spakj6pmc82dno4sfc
Traceback (most recent call last):
File "/config/custom_components/pfsense_fauxapi/function-iterate.py", line 26, in
gw_status = FauxapiLib.gateway_status()
File "/config/custom_components/pfsense_fauxapi/PfsenseFauxapi.py", line 95, in gateway_status
return self._api_request('GET', 'gateway_status')
File "/config/custom_components/pfsense_fauxapi/PfsenseFauxapi.py", line 141, in _api_request
raise PfsenseFauxapiException('Unable to complete {}() request'.format(action), json.loads(res.text))
PfsenseFauxapi.PfsenseFauxapiException: ('Unable to complete gateway_status() request', {'callid': '60d520bc375a2', 'message': 'action authorization failed'})
2021-06-24 20:18:04 ERROR (SyncWorker_24) [homeassistant.components.command_line] Command failed: python3 /config/custom_components/pfsense_fauxapi/function-iterate.py 192.168.2.1:4343 PFFAcredential1 3jmtdkbfvp3kndq5wswavbq4spakj6pmc82dno4sfc
Traceback (most recent call last):
File "/config/custom_components/pfsense_fauxapi/function-iterate.py", line 26, in
gw_status = FauxapiLib.gateway_status()
File "/config/custom_components/pfsense_fauxapi/PfsenseFauxapi.py", line 95, in gateway_status
return self._api_request('GET', 'gateway_status')
File "/config/custom_components/pfsense_fauxapi/PfsenseFauxapi.py", line 141, in _api_request
raise PfsenseFauxapiException('Unable to complete {}() request'.format(action), json.loads(res.text))
PfsenseFauxapi.PfsenseFauxapiException: ('Unable to complete gateway_status() request', {'callid': '60d520bc3d358', 'message': 'action authorization failed'})
2021-06-24 20:18:04 ERROR (SyncWorker_16) [homeassistant.components.command_line] Command failed: python3 /config/custom_components/pfsense_fauxapi/function-iterate.py 192.168.2.1:4343 PFFAcredential1 3jmtdkbfvp3kndq5wswavbq4spakj6pmc82dno4sfc
Traceback (most recent call last):
File "/config/custom_components/pfsense_fauxapi/function-iterate.py", line 26, in
gw_status = FauxapiLib.gateway_status()
File "/config/custom_components/pfsense_fauxapi/PfsenseFauxapi.py", line 95, in gateway_status
return self._api_request('GET', 'gateway_status')
File "/config/custom_components/pfsense_fauxapi/PfsenseFauxapi.py", line 141, in _api_request
raise PfsenseFauxapiException('Unable to complete {}() request'.format(action), json.loads(res.text))
PfsenseFauxapi.PfsenseFauxapiException: ('Unable to complete gateway_status() request', {'callid': '60d520bcf0495', 'message': 'action authorization failed'})
2021-06-24 20:18:05 ERROR (SyncWorker_24) [homeassistant.components.command_line] Command failed: python3 /config/custom_components/pfsense_fauxapi/function-iterate.py 192.168.2.1:4343 PFFAcredential1 3jmtdkbfvp3kndq5wswavbq4spakj6pmc82dno4sfc
Traceback (most recent call last):
File "/config/custom_components/pfsense_fauxapi/function-iterate.py", line 26, in
gw_status = FauxapiLib.gateway_status()
File "/config/custom_components/pfsense_fauxapi/PfsenseFauxapi.py", line 95, in gateway_status
return self._api_request('GET', 'gateway_status')
File "/config/custom_components/pfsense_fauxapi/PfsenseFauxapi.py", line 141, in _api_request
raise PfsenseFauxapiException('Unable to complete {}() request'.format(action), json.loads(res.text))
PfsenseFauxapi.PfsenseFauxapiException: ('Unable to complete gateway_status() request', {'callid': '60d520bd02736', 'message': 'action authorization failed'})
2021-06-24 20:18:05 ERROR (SyncWorker_13) [homeassistant.components.command_line] Command failed: python3 /config/custom_components/pfsense_fauxapi/function-iterate.py 192.168.2.1:4343 PFFAcredential1 3jmtdkbfvp3kndq5wswavbq4spakj6pmc82dno4sfc
Traceback (most recent call last):
File "/config/custom_components/pfsense_fauxapi/function-iterate.py", line 26, in
gw_status = FauxapiLib.gateway_status()
File "/config/custom_components/pfsense_fauxapi/PfsenseFauxapi.py", line 95, in gateway_status
return self._api_request('GET', 'gateway_status')
File "/config/custom_components/pfsense_fauxapi/PfsenseFauxapi.py", line 141, in _api_request
raise PfsenseFauxapiException('Unable to complete {}() request'.format(action), json.loads(res.text))
PfsenseFauxapi.PfsenseFauxapiException: ('Unable to complete gateway_status() request', {'callid': '60d520bdae6bd', 'message': 'action authorization failed'})
2021-06-24 20:18:05 ERROR (SyncWorker_4) [homeassistant.components.command_line] Command failed: python3 /config/custom_components/pfsense_fauxapi/function-iterate.py 192.168.2.1:4343 PFFAcredential1 3jmtdkbfvp3kndq5wswavbq4spakj6pmc82dno4sfc
2021-06-24 20:19:11 ERROR (SyncWorker_6) [custom_components.pfsense_fauxapi.switch] Problem getting rule set from pfSense host: 192.168.2.1. Likely due to API key or secret. More Info:HTTPSConnectionPool(host='192.168.2.1', port=443): Max retries exceeded with url: /fauxapi/v1/?action=config_get&__debug=true (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fb73b382460>: Failed to establish a new connection: [Errno 110] Operation timed out'))
`
pfSense does indeed have a legit xmlrpc api. Would you have any interest in migrating this to use that instead of fauxapi? I have fairly extensive experience using it as I’ve built other integrations (ie: https://github.com/travisghansen/kubernetes-pfsense-controller and other non public tools) leveraging it.
I want to setup a presence detection that uses hostnames instead of IP. How would i accomplish that. I already have the basic sensors working
**Is your feature request related to a problem?no]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
I spent multiple days trying to figure out why I couldn't get this working. Only to find out that I had PFSense setup as HTTP access, when FauxAPI requires HTTPS. Could you add a note to the installation instructions to prevent some other n00b from making my same mistake?
Thanks for this great repo.
My Problem is that i dont get it how to activate in HomeAssistant to use python3 from the command line.
There are a bunch of intergrations but they seem not to work the way it should with this addon here.
Can you tell how you have done this.
Thanks and have a nice day
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.