Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Idiots Guide to running a python script

Featured Replies

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

Get the User Scripts plugin, that will allow you to set any schedule you like.

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 by primeval_god

  • 8 months later...
  • 1 month later...

I am also trying to do this, but I am having no luck getting it to work.

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.