Closed LW-Ho closed 6 months ago
It looks like it's getting an empty response when it tries to download the feed.
You can try downloading the feed yourself by visiting (using your browser, or curl
):
# (Replace NAME and PASSPHRASE below)
https://:PASSPHRASE@explore.garmin.com/Feed/Share/NAME
If that succeeds in downloading a KML file, then the name/passphrase should have worked in Home Assistant too. Consider sharing the contents of that file here (after editing out any private info) if it's still not working.
If not, please confirm that you are able to visit https://share.garmin.com/share/NAME in a browser (the normal way) using the same name and passphrase you provided during setup.
Yes, my mapshare without password set, so replacing 'NAME' allows to download feed.kml.
So, I visited this link https://share.garmin.com/share/NAME , and my mapshare appeared as expected.
Thanks.
The feed seems fine, and is parsed correctly when I load it into the integration code manually. I'm not sure why, but it seems like the fetch came back empty (which Garmin will typically do if the NAME is wrong or does not exist).
I've just pushed a new version (v0.2.4) with slightly better logging which may help with identifying the problem.
Hi,
this is debug messages, thanks your debug.
2023-12-16 21:32:15.910 ERROR (MainThread) [custom_components.garmin_mapshare.coordinator] Unexpected error fetching garmin_mapshare-mushroomXXXXXXXXXXX data: Received empty response from https://explore.garmin.com/Feed/Share/mushroomXXXXXXXXXXX using auth: False
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 290, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/garmin_mapshare/coordinator.py", line 80, in _async_update_data
self.raw_values = await self.mapshare.fetch_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/garmin_mapshare/kml_fetch.py", line 38, in fetch_data
raise ValueError(
ValueError: Received empty response from https://explore.garmin.com/Feed/Share/mushroomXXXXXXXXXXX using auth: False
2023-12-16 21:32:15.927 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Garmin MapShare' for garmin_mapshare integration not ready yet: Received empty response from https://explore.garmin.com/Feed/Share/mushroomXXXXXXXXXXX using auth: False; Retrying in background
2023-12-16 21:32:21.315 ERROR (MainThread) [custom_components.garmin_mapshare.coordinator] Unexpected error fetching garmin_mapshare-mushroomXXXXXXXXXXX data: Received empty response from https://explore.garmin.com/Feed/Share/mushroomXXXXXXXXXXX using auth: False
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 290, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/garmin_mapshare/coordinator.py", line 80, in _async_update_data
self.raw_values = await self.mapshare.fetch_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/garmin_mapshare/kml_fetch.py", line 38, in fetch_data
raise ValueError(
ValueError: Received empty response from https://explore.garmin.com/Feed/Share/mushroomXXXXXXXXXXX using auth: False
2023-12-16 21:32:30.724 DEBUG (MainThread) [custom_components.garmin_mapshare.coordinator] MapShareCoordinator: {'link_name': 'mushroomXXXXXXXXXXX'}
2023-12-16 21:32:31.057 ERROR (MainThread) [custom_components.garmin_mapshare.coordinator] Unexpected error fetching garmin_mapshare-mushroomXXXXXXXXXXX data: Received empty response from https://explore.garmin.com/Feed/Share/mushroomXXXXXXXXXXX using auth: False
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 290, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/garmin_mapshare/coordinator.py", line 80, in _async_update_data
self.raw_values = await self.mapshare.fetch_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/garmin_mapshare/kml_fetch.py", line 38, in fetch_data
raise ValueError(
ValueError: Received empty response from https://explore.garmin.com/Feed/Share/mushroomXXXXXXXXXXX using auth: False
2023-12-16 21:32:31.069 DEBUG (MainThread) [custom_components.garmin_mapshare.coordinator] Finished fetching garmin_mapshare-mushroomXXXXXXXXXXX data in 0.343 seconds (success: False)
2023-12-16 21:32:31.070 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Garmin MapShare' for garmin_mapshare integration not ready yet: Received empty response from https://explore.garmin.com/Feed/Share/mushroomXXXXXXXXXXX using auth: False; Retrying in background
2023-12-16 21:32:35.728 DEBUG (MainThread) [custom_components.garmin_mapshare.coordinator] MapShareCoordinator: {'link_name': 'mushroomXXXXXXXXXXX'}
2023-12-16 21:32:36.002 ERROR (MainThread) [custom_components.garmin_mapshare.coordinator] Unexpected error fetching garmin_mapshare-mushroomXXXXXXXXXXX data: Received empty response from https://explore.garmin.com/Feed/Share/mushroomXXXXXXXXXXX using auth: False
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 290, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/garmin_mapshare/coordinator.py", line 80, in _async_update_data
self.raw_values = await self.mapshare.fetch_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/garmin_mapshare/kml_fetch.py", line 38, in fetch_data
raise ValueError(
ValueError: Received empty response from https://explore.garmin.com/Feed/Share/mushroomXXXXXXXXXXX using auth: False
2023-12-16 21:32:36.013 DEBUG (MainThread) [custom_components.garmin_mapshare.coordinator] Finished fetching garmin_mapshare-mushroomXXXXXXXXXXX data in 0.284 seconds (success: False)
2023-12-16 21:32:36.014 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Garmin MapShare' for garmin_mapshare integration not ready yet: Received empty response from https://explore.garmin.com/Feed/Share/mushroomXXXXXXXXXXX using auth: False; Retrying in background
Received empty response from https://explore.garmin.com/Feed/Share/mushroomXXXXXXXXXXX
Does the logged URL here exactly match the URL you used earlier to download the KML feed?
I got bit by using my full URL where it really just wants the NAME component of the url in the setup
Received empty response from https://explore.garmin.com/Feed/Share/mushroomXXXXXXXXXXX
Does the logged URL here exactly match the URL you used earlier to download the KML feed?
Yes, I can use this to download feed.kml
In that case I'm out of ideas for now 😕 Perhaps it's a temporary issue with Garmin's server and the updates will catch up eventually, or if you're using an outbound http proxy behind Home Assistant maybe there could be an issue there. The same request should have the same response in both cases.
In that case I'm out of ideas for now 😕 Perhaps it's a temporary issue with Garmin's server and the updates will catch up eventually, or if you're using an outbound http proxy behind Home Assistant maybe there could be an issue there. The same request should have the same response in both cases.
Thank you for your response. I also use Sonoff and August components in Home Assistant and haven't encountered any network issues.
Thanks to the author!
I wonder if the issue might be a redirect? I noticed that in some other regions, the direct feed URL points to different regional hostnames -- maybe this could explain the difference between the results before.
Can you run the following using your map's NAME (and be sure to redact the NAME in the output if you don't want it visible here):
curl -sv https://explore.garmin.com/Feed/Share/NAME 2>&1 | grep -i location
If that turns out to be the issue, I have a change in main
that may fix it. You can try it out by going to HACS -> Integrations -> Garmin MapShare -> menu (top-right corner) -> Redownload and select the version main
.
Version v1.0.1 includes that change as well as better logging / error handling messages; Hopefully these can help track down the problem.
@LW-Ho - I've just tagged version v1.1.0 with a new base URL, which I believe may fix this issue for non-USA accounts. Please update using HACS and let me know if that works!
@LW-Ho - I've just tagged version v1.1.0 with a new base URL, which I believe may fix this issue for non-USA accounts. Please update using HACS and let me know if that works!
Thank you very much! This version successfully connects now! Forgot to mention, my account is under the name Taiwan. Also, grateful to the author for identifying this issue.
Hi, I configured my link, but there is an error with the setup.
This is debug message: