Closed Metus88 closed 2 years ago
Could you please check if this behavior still exists in version pre-v6.1.0?
I just upgrade to beta version "pre-v6.1.0" from hacs. I restarted homeassistant and there are changes:
2022-04-13 21:11:05 WARNING (SyncWorker_6) [homeassistant.loader] We found a custom integration multiscrape which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-04-13 21:11:12 ERROR (MainThread) [custom_components.multiscrape.http] letture date gas # Error executing get request to url: unknown.
Error message:
UnsupportedProtocol("Request URL is missing an 'http://' or 'https://' protocol.")
2022-04-13 21:11:12 ERROR (MainThread) [custom_components.multiscrape.coordinator] letture date gas # Updating failed with exception: Request URL is missing an 'http://' or 'https://' protocol.
2022-04-13 21:11:12 ERROR (MainThread) [custom_components.multiscrape.coordinator] Error fetching multiscrape data: Unable to update data from resource
2022-04-13 21:11:22 WARNING (MainThread) [homeassistant.setup] Setup of multiscrape is taking over 10 seconds.
2022-04-13 21:11:25 ERROR (MainThread) [custom_components.multiscrape.http] letture date gas # Error executing get request to url: unknown.
Error message:
UnsupportedProtocol("Request URL is missing an 'http://' or 'https://' protocol.")
2022-04-13 21:11:25 ERROR (MainThread) [custom_components.multiscrape.coordinator] letture date gas # Updating failed with exception: Request URL is missing an 'http://' or 'https://' protocol.
2022-04-13 21:11:25 WARNING (MainThread) [homeassistant.components.sensor] Platform multiscrape not ready yet: None; Retrying in background in 30 seconds
2022-04-13 21:11:25 WARNING (MainThread) [homeassistant.components.sensor] Platform multiscrape not ready yet: None; Retrying in background in 30 seconds
2022-04-13 21:11:25 WARNING (MainThread) [homeassistant.components.sensor] Platform multiscrape not ready yet: None; Retrying in background in 30 seconds
2022-04-13 21:11:25 WARNING (MainThread) [homeassistant.components.sensor] Platform multiscrape not ready yet: None; Retrying in background in 30 seconds
2022-04-13 21:11:25 WARNING (MainThread) [homeassistant.components.sensor] Platform multiscrape not ready yet: None; Retrying in background in 30 seconds
2022-04-13 21:11:25 WARNING (MainThread) [homeassistant.components.sensor] Platform multiscrape not ready yet: None; Retrying in background in 30 seconds
2022-04-13 21:11:25 WARNING (MainThread) [homeassistant.components.sensor] Platform multiscrape not ready yet: None; Retrying in background in 30 seconds
2022-04-13 21:11:25 WARNING (MainThread) [homeassistant.components.sensor] Platform multiscrape not ready yet: None; Retrying in background in 30 seconds
2022-04-13 21:11:25 WARNING (MainThread) [homeassistant.components.sensor] Platform multiscrape not ready yet: None; Retrying in background in 30 seconds
2022-04-13 21:11:27 WARNING (MainThread) [homeassistant.components.sensor] Platform multiscrape not ready yet: None; Retrying in background in 30 seconds
2022-04-13 21:11:55 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform multiscrape is taking over 10 seconds.
2022-04-13 21:11:57 ERROR (MainThread) [custom_components.multiscrape.http] letture date gas # Error executing get request to url: https://************CENSORED************** (I edit it to privacy =) ).
Error message:
ConnectTimeout('')
2022-04-13 21:11:57 ERROR (MainThread) [custom_components.multiscrape.coordinator] letture date gas # Updating failed with exception:
However after a few minutes all the sensors works again (like the preview version). So i don't know if I can give you more details. I'm noob =/ I think that my problem is that I want use a link that is inside a txt file that I read with sensor
sensor:
- platform: file
file_path: /config/filestatisensori/linkautoletturagas.txt
name: link gas da file
And during the startup of home assistant this sensor is maybe empty... so multiscrape have not the link (resource_template)
multiscrape:
- resource_template: "{{ states('sensor.link_gas_da_file')}}"
scan_interval: 3600
name: letture date gas
....
So it is not your problem... but mine. I try to set resource_template directly the link and I will prove that is not you problem but mine.
EDIT: YES! I can confirm it. If I set directly the link on the resource_template all work great.... no warning or error during startup of home assistant.
multiscrape:
- resource_template: https://*****CENSORED*******
scan_interval: 3600
name: letture date gas
I have to google if there is a way to add a delay to some sensor in home assistant or dependency...
Ok, makes sense, multiscrape parses the resource_template before the file sensor has run. I'll close the issue.
Version of the custom_component
v5.7.0
System Health
Home Assistant Community Store
GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 3957 Installed Version | 1.24.1 Stage | running Available Repositories | 1006 Downloaded Repositories | 33Home Assistant Cloud
logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | okLovelace
dashboards | 1 -- | -- resources | 19 views | 24 mode | storageConfiguration
Describe the bug
During the startup of home assistant there are Errors in log that tell that the "resource_template" is not a link like http or https. How you can see from my configuration.yaml I use a sensor file where inside the txt file is wrote the url link. I don't know if it's possible to add a "delay" (standard or editable from the user) during the startup for the component/sensor OR a waiting template.
Is not a big problem. Maybe there is already a solution that I don't know. However also with this log info/error it works great... so thanks a lot for your fantastic component!
Debug log