-
Notifications
You must be signed in to change notification settings - Fork 10
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
Use api.forecast.solar host in API calls #25
base: master
Are you sure you want to change the base?
Conversation
Rather than using the looked-up IP address for API calls, use 'api.forecast.solar' so that certificate for https call matches
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.
Did they solve the original issue that is in #5? And if so, this PR needs to clean up that whole workaround (not just the hostname change).
Ah I see. Makes sense now why it's making the API call by IP address.
Looks like either the cert needs fixing, the IPv6 DNS entry needs removing, or IPv6 access needs fixed. Or both! |
Yup... :( Unfortunately, this is an upstream issue. |
According to Knut's info, the problem with the IPv6 is now solved? 🤷🏻♂️ If any of us could confirm that, we could remove the workaround. |
For now this pull request has been marked as a draft, until it is really clear that the workaround is no longer needed and can be removed completely. |
I've just tested the API from an IPv6 endpoint, it seems to work correctly now.
|
Does the IPv6 still work properly? Is it time to remove the workaround? |
I think so, yes 👍 |
Rather than using the looked-up IP address for API calls, use 'api.forecast.solar' so that certificate for https call matches.
For context, I'm getting the error:
Config entry 'Preesall' for forecast_solar integration not ready yet: 0, message='Attempt to decode JSON with unexpected mimetype: text/html', url=URL('https://148.251.178.234/estimate/53.xxx/-2.xxx/36/30/4.0?time=iso8601&damping=0.0&inverter=4.0'); Retrying in background
This is due to my firewall seeing that the certificate presented by the API server at 148.251.178.234 is for pv-log.net and has expired. Sending the correct host header ("api.forecast.solar") gets the correct certificate and will not fall foul of any certificate inspection firewalls.