Skip to content
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

✨ [REQUEST] ChangeDetection.io WEBDRIVER_URL environment variable #1057

Closed
2 tasks done
Kokbo opened this issue Nov 1, 2023 · 10 comments
Closed
2 tasks done

✨ [REQUEST] ChangeDetection.io WEBDRIVER_URL environment variable #1057

Kokbo opened this issue Nov 1, 2023 · 10 comments
Labels
enhancement New feature or request prevent stale Prevents stale being applied

Comments

@Kokbo
Copy link

Kokbo commented Nov 1, 2023

Checked

  • If a new addon, I have checked on Google that such as addon doesn't already exists
  • If a new feature, I have searched in the discussions & issues that it was not already covered

Which addon?

ChangeDetection.io

Is your feature request related to a problem? Please describe

No.

Describe the solution you'd like

ChangeDetection.io has the capability to use watch JavaScript changes. For this to function, you need to give it a URL of a network connection that is running a WebDriver+Chrome server. Normally, this can be done by setting 'WEBDRIVER_URL' var in the docker environment variables, but it would be nice to be able to enter this URL in the add-on's configuration options (same BASE_URL, TZ, etc).

@Kokbo Kokbo added enhancement New feature or request prevent stale Prevents stale being applied labels Nov 1, 2023
@alexbelgium
Copy link
Owner

Hi, you can add any ENV variables that you want to my addons by following this guide : https://github.com/alexbelgium/hassio-addons/wiki/Add%E2%80%90ons-feature-:-add-env-variables

Hope this helps

@Kokbo
Copy link
Author

Kokbo commented Nov 1, 2023

Thanks, didn't know this feature.

@Kokbo Kokbo closed this as completed Nov 1, 2023
@alexbelgium
Copy link
Owner

Please let me know if it worked - but indeed I had implemented it for users flexibility and to avoid to many options in addons

@Kokbo
Copy link
Author

Kokbo commented Nov 1, 2023

Doesn't seem to recognize the environment variable:

/etc/cont-init.d/01-custom_script.sh: executing [11:03:53] INFO: Execute /config/addons_autoscripts/changedetection.io.sh if existing [11:03:53] INFO: ... script found, executing /./config/addons_autoscripts/changedetection.io.sh: line 1: WEBDRIVER_URL:: command not found Error : /etc/cont-init.d/01-custom_script.sh exiting 127

Just checked the LinuxServer image, but it seems the environment variable isn't available.

@alexbelgium
Copy link
Owner

Yup, I made a mistake : actually the path is"/config/addons_config/$slug/config.yaml"

So inside this file you should have :

WEBDRIVER_URL: "url"

@Kokbo
Copy link
Author

Kokbo commented Nov 1, 2023

Now it doesn't find the yaml.

[11:27:15] INFO: Execute /config/addons_autoscripts/changedetection.io.sh if existing
[11:27:15] INFO: ... no script found

I've put the env var in /config/addons_config/changedetection.io/config.yaml.

If I look in 01-custom_script.sh, it says it looks for it in /config/addons_autoscripts/"${slug}".sh. Also tried it there but then i get the same error as before (/./config/addons_autoscripts/changedetection.io.sh: line 1: WEBDRIVER_URL:: command not found
Error : /etc/cont-init.d/01-custom_script.sh exiting 127).

@alexbelgium
Copy link
Owner

Actually the correct script that would be used is 01-config_yaml.sh (01-custom_script.sh is used to execute custom scripts). If the first script is not there probably i'll need to push a new version as it would mean this script was not added at time of creation

@Kokbo
Copy link
Author

Kokbo commented Nov 1, 2023

Yeah there's no config.yaml in /config/addons_config/changedetection.io/

alexbelgium added a commit that referenced this issue Nov 1, 2023
@alexbelgium
Copy link
Owner

I've launched a new build to include my latest scripts. It should now run the "01-config_yaml.sh" script that will go read the config.yaml file that you need to create manually in the folder /config/addons_config/changedetection.io/

Sorry for that I have too much addons and I don't use 80% of them so they can have different level of versions of my base scripts

@Kokbo
Copy link
Author

Kokbo commented Nov 1, 2023

Thanks Alexbelgium for the prompt replies and fix! Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request prevent stale Prevents stale being applied
Projects
None yet
Development

No branches or pull requests

2 participants