Skip to content

Hooks for command or script to run at power loss and power recovery.p #94

@ArjenR

Description

@ArjenR

🚀 Feature Request

Just like for the shutdown where you can replace the command with a script for example I see a (personal) necessity to run a script on loss of power and also when power recovers before shutdown.

This would be optional in the config file.

🔈 Motivation

USB attached touch screen monitors and other USB equipment can draw power from the USB port and thus parasite the power from the capacitors needed for proper shutdown. Especially when containers need to be stopped, this can take some time.

In my case the commands to run would be to disable one the USB ports on powerloss and re-enable on power recovery.

🛰 Alternatives

A script that constantly requests power state from the deamon and performs the actions mentioned.

📎 Additional context

The waveshare usb powered touch screens have this for example.

Adding to this: I also noted that there is some parasitic powerloss on poweroff. The led power indicator for nav equipment in my switchboard stays dimly lit until the halpi shuts down. I use the external 12v power, not via n2k.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions