mgranger Posted March 26, 2018 Share Posted March 26, 2018 (edited) I am trying to add a script that can be called from the command line but not sure where I should add this script file. I understand there is a user scripts plugin and I have used this and it is great however I am trying to run a script from Home Assistant through a command line and I don't think this plugin would work with that. Where should I add my script to make this work? Edited March 26, 2018 by mgranger Quote Link to comment
trurl Posted March 26, 2018 Share Posted March 26, 2018 Assuming you are running Home Assistant as a docker, if you put it in the appdata for the docker then the application will be able to get to it wherever it has appdata mapped. I don't know any details about how to make Home Assistant use the script. Quote Link to comment
Squid Posted March 26, 2018 Share Posted March 26, 2018 1 hour ago, mgranger said: Home Assistant through a command line and I don't think this plugin would work with that it should. Script would be something like docker exec HomeAssistant /config/NameOfScript.sh Quote Link to comment
trurl Posted March 26, 2018 Share Posted March 26, 2018 24 minutes ago, Squid said: it should. Script would be something like docker exec HomeAssistant /config/NameOfScript.sh Yes that would work if you needed to run it yourself. I was thinking more in terms of letting HomeAssistant run it as needed. I briefly looked at HomeAssistant since I have some home automation, but my needs are so simple I figured that would be a project for another day. Quote Link to comment
mgranger Posted March 26, 2018 Author Share Posted March 26, 2018 Ok so here is what I am trying to do even though I am sure it is unecessary. I am trying to monitor how many days are left on my let's encrypt cert. So I came across this forum but it requires a script that someone wrote. https://community.home-assistant.io/t/sensor-to-show-expiry-date-of-ssl-certificate/13479 So I am kind of unsure where to put this script file to get it to run from home-assistant. @trurl I would suggest trying home-assistant sometime. I started with the basic stuff but have branched out over about a year and half of using it. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.