March 23Mar 23 Dead Man's Switch is a plugin that requires periodic check-ins from the server owner. If you stop checking in, it triggers configurable actions (deleting files/folders,running scripts) after a deadline passes.Built for privacy-conscious users who want automated cleanup if they become unable to manage their server.Requirements: Unraid 6.12.0 or laterInstall URL:https://raw.githubusercontent.com/dereckhall/unraid-deadmans-switch/main/plugin/deadman-switch.plgAfter installing, go to Settings > Dead Man's Switch to configure.FeaturesConfigurable check-in interval (default: 30 days)Grace period with extra hours after the deadline before actions fireTrigger actions: delete files/folders with glob pattern support, or run custom bash scriptsDry run mode to safely preview exactly what would happen before going liveArm / Disarm / Pause controlsDouble-miss protection: optionally require two consecutive missed deadlines before triggeringDashboard tile with real-time countdownNotificationsDiscord webhooks with rich embeds, color-coded severity, and one-click check-in linksCustom webhooks to any HTTP endpointUptime Kuma push heartbeat monitoringWarning thresholds at 50%, 75%, 90%, and 95% of elapsed timeExternal API (port 3801)A lightweight API server runs on port 3801, separate from Unraid's authenticated nginx. Supports remote check-ins, status queries, and token-based quick check-in URLs. CORSenabled for Home Assistant and browser clients.ScreenshotsUnraid's dashboard with DMS cardUnraid's settings main menu for DMSUnraid's settings actions menu for DMSDMS's Home Assistant dashboard created by leveraging the built-in APIDMS's Home Assistant phone notification example created by leveraging the built-in APIDiscord's webhook with rich embed for DMSTroubleshootingCommon issues and solutions are documented in the README:https://github.com/dereckhall/unraid-deadmans-switch#troubleshootingSource / Issues: https://github.com/dereckhall/unraid-deadmans-switchLicense: MIT Edited March 23Mar 23 by Dereck
July 5Jul 5 I'm running a script and it's not working correctly, basically I've named it dmsshutdown.sh and inside, I just put shutdown -t now It throws an error saying that the time variable is mandatory. Don't know what I'm doing wrong...
July 11Jul 11 Author On 7/5/2026 at 4:49 PM, Anthwerp said:I'm running a script and it's not working correctly, basically I've named it dmsshutdown.sh and inside, I just putshutdown -t nowIt throws an error saying that the time variable is mandatory. Don't know what I'm doing wrong...i would change the script to the recommended way to shutdown your unraid system:#!/bin/bash/usr/local/sbin/powerdownif you must use shutdown i would use the full path and the correct syntax:/sbin/shutdown -h now
July 17Jul 17 Author On 7/14/2026 at 7:27 AM, ICDeadPpl said:How can I add a status card with a check-in button to Home Assistant?yeah, this is easy to set up. the plugin runs a little api server on port 3801 that home assistant talks to directly, no unraid login needed. you just need your server's lan ip and your api key from the plugin's settings > api tab. three parts: a rest sensor that reads status, a rest command that does the check-in, and a card that ties it together with a button.first, in configuration.yaml:rest:- scan_interval: 60resource: "http://YOUR_UNRAID_IP:3801/?action=status&key=YOUR_API_KEY"method: GETsensor:- name: "DMS Status"unique_id: "dms_status"value_template: "{{ value_json.status }}"json_attributes:- armed- paused- dry_run- warning_level- days_remaining- time_remaining_display- last_checkin- next_deadline- elapsed_pct- checkin_interval_daysrest_command:dms_checkin:url: "http://YOUR_UNRAID_IP:3801/?action=checkin&key=YOUR_API_KEY"method: GETrestart ha (or reload yaml). then add a card to your dashboard (edit > add card > manual). i use a few stacked cards so it looks decent. the status one uses a markdown card so instead of showing the raw "armed_ok" text it shows a colored alert:type: markdowncontent: >{% set s = states('sensor.dms_status') %}{% set remaining = state_attr('sensor.dms_status', 'time_remaining_display') %}{% set info = {'armed_ok': {'label': 'OK - ' ~ remaining ~ ' remaining', 'type': 'success'},'armed_reminder': {'label': 'Reminder - ' ~ remaining ~ ' remaining', 'type': 'warning'},'armed_warning': {'label': 'Warning - ' ~ remaining ~ ' remaining', 'type': 'warning'},'armed_critical': {'label': 'Critical - ' ~ remaining ~ ' remaining', 'type': 'error'},'grace_period': {'label': 'Grace Period - ' ~ remaining ~ ' remaining', 'type': 'error'},'triggered': {'label': 'TRIGGERED - deleted files', 'type': 'error'},'paused': {'label': 'Paused - ' ~ remaining ~ ' remaining', 'type': 'success'},'disarmed': {'label': 'Disarmed', 'type': 'success'}} %}{% set i = info.get(s, {'label': s, 'type': 'info'}) %}<ha-alert alert-type="{{ i.type }}">{{ i.label }}</ha-alert>then an entities card for the details:type: entitiesentities:- entity: sensor.dms_statustype: attributeattribute: time_remaining_displayname: Time Remainingicon: mdi:timer-sand- entity: sensor.dms_statustype: attributeattribute: last_checkinname: Last Check-inicon: mdi:clock-check-outline- entity: sensor.dms_statustype: attributeattribute: next_deadlinename: Next Deadlineicon: mdi:clock-alert-outlineand the check-in button. this is the important bit, it uses a confirmation prompt so you can't fat-finger a check-in:type: buttonname: Check Inicon: mdi:check-circletap_action:action: perform-actionperform_action: rest_command.dms_checkinconfirmation:text: Are you sure you want to check in to the Dead Man's Switch?tap it, confirm, and it hits the check-in endpoint and resets your timer. the status updates on the next poll (60s above).couple notes:- this assumes ha and unraid are on the same lan. through a reverse proxy you'd need to forward port 3801.- since you've got the rest_command set up you can also fire it from an automation or an actionable notification, so you get a check-in button right on your phone's lock screen when the timer's running low. that's how i've got mine, i barely open the dashboard.i've also updated the readme with all of this. let me know if you get stuck. Edited July 17Jul 17 by Dereck
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.