schford Posted August 24, 2020 Share Posted August 24, 2020 Hi guys, I have a python script that I use to pull info from my alarm system into MQTT which I then use in Home Assistant. I always used to call this from home assistant. They have now changed HA so that scripts can only run for 60 seconds and this needs to keep running. Has anyone any advice on how I could do this natively in unraid? I'd be very grateful for any help. Cheers Stuart Quote Link to comment
allanp81 Posted August 24, 2020 Share Posted August 24, 2020 Get the User Scripts plugin, that will allow you to set any schedule you like. Quote Link to comment
primeval_god Posted August 24, 2020 Share Posted August 24, 2020 (edited) So far as the python part goes my recommendation is to use a python docker container to run your python script in. So you would create a User Scripts script to launch your python script, but rather than call it directly you would do something like docker run --rm -d -v /path/to/script/containing/folder/on/host:/mnt:ro --workdir /mnt python:3 ./your-script.py --argument-for-script YES Edited August 24, 2020 by primeval_god Quote Link to comment
burgess22 Posted May 10, 2021 Share Posted May 10, 2021 (edited) On 8/25/2020 at 2:34 AM, primeval_god said: my recommendation is to use a python docker container what is this python docker you speak of? im trying to work out a way to run this in unraid https://pythonawesome.com/a-cross-platform-plot-manager-for-chia-plotting/ (pythonawesome.com) Edited May 10, 2021 by burgess22 Quote Link to comment
primeval_god Posted May 10, 2021 Share Posted May 10, 2021 This is what i was referring to https://hub.docker.com/_/python Quote Link to comment
Subasically Posted June 21, 2021 Share Posted June 21, 2021 I am also trying to do this, but I am having no luck getting it to work. 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.