-
-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Add AWS Route53 Dynamic DNS support #17072
Conversation
homeassistant/components/route53.py
Outdated
|
||
if response['ResponseMetadata']['HTTPStatusCode'] is not 200: | ||
_LOGGER.warning(response) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
blank line at end of file
homeassistant/components/route53.py
Outdated
changes.append( | ||
{ | ||
'Action' : 'UPSERT', | ||
'ResourceRecordSet' : { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace before ':'
homeassistant/components/route53.py
Outdated
|
||
changes.append( | ||
{ | ||
'Action' : 'UPSERT', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace before ':'
homeassistant/components/route53.py
Outdated
return | ||
|
||
except: | ||
_LOGGER.warning('The ipify logic in the route53 component failed and needs futher investigation') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (105 > 79 characters)
homeassistant/components/route53.py
Outdated
ipaddress = get_ip() | ||
|
||
except ConnectionError: | ||
_LOGGER.warning('Unable to reach the ipify service to most likely because of a network error on your end.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (115 > 79 characters)
homeassistant/components/route53.py
Outdated
return True | ||
|
||
|
||
def _update_route53(aws_access_key_id, aws_secret_access_key, zone, domain, records): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (85 > 79 characters)
homeassistant/components/route53.py
Outdated
|
||
def update_records_service(now): | ||
"""Set up service for manual trigger.""" | ||
_update_route53(aws_access_key_id, aws_secret_access_key, zone, domain, records) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (88 > 79 characters)
homeassistant/components/route53.py
Outdated
|
||
def update_records_interval(now): | ||
"""Set up recurring update.""" | ||
_update_route53(aws_access_key_id, aws_secret_access_key, zone, domain, records) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (88 > 79 characters)
homeassistant/components/route53.py
Outdated
import homeassistant.helpers.config_validation as cv | ||
from homeassistant.helpers.event import track_time_interval | ||
|
||
REQUIREMENTS = ['boto3==1.9.6', 'ipify==1.0.0' ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace before ']'
homeassistant/components/route53.py
Outdated
import homeassistant.helpers.config_validation as cv | ||
from homeassistant.helpers.event import track_time_interval | ||
|
||
REQUIREMENTS = ['boto3==1.9.6','ipify==1.0.0'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing whitespace after ','
Thanks for your contribution, however I didn't found the reason we need this as part of homeassistant, it is better fit for a hass.io add-on IMO. |
Hey @awarecan, This is based on the cloudflare DNS component that is already part of home assistant, alongside duckdns/freedns and a number of other providers. Given AWS is the biggest cloud provider out there today, it made sense for me to add it. I have already got this as an add-on, however a number of people i know don't run it as hass, rather under docker directly, so they can't use the add-on. Let me know what you think, Cheers, K |
To be honest I disagree, I think this goes well in along side the other services we have like DuckDNS, Namecheap, google, freedns, no-ip, Cloudflare. |
7ad7bab
to
b788db1
Compare
Hey @fabaff , I've overhauled the code and tested it all works OK. I've got all the outstanding CI issues resolved and it is ready for your approval and merge into dev. Let me know if there are any other things i need to do. Thanks :) |
03ceb4d
to
a8c73fd
Compare
Description:
This component adds AWS Route53 dynamic DNS support.
I've tested this and updated the documentation accordingly.
This is my first real Python code, so go easy on me ;)
Example entry for
configuration.yaml
(if applicable):Checklist:
tox
.If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
REQUIREMENTS
variable (example).requirements_all.txt
by runningscript/gen_requirements_all.py
..coveragerc
.If the code does not interact with devices: