Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add exit handler/watchdog for safety #189

Open
solnus opened this issue Aug 21, 2024 · 2 comments
Open

Add exit handler/watchdog for safety #189

solnus opened this issue Aug 21, 2024 · 2 comments
Labels

Comments

@solnus
Copy link
Contributor

solnus commented Aug 21, 2024

Currently if the process exits while the relay is closed, the relay remains closed. This could be a safety issue. I see a couple initial options, but I'm sure there are others:

  • Add an exit handler that attempts to force the output pin to off state, or power off and hope the pin goes to hi-Z and shuts off the relay
  • Add a linux watchdog for the process, such that if the process stops kicking the watchdog a safety mechanism kicks in
@jbruce12000
Copy link
Owner

it is impossible to fully overcome stuck hardware. when SSRs fail, it's almost always a short circuit. this means that full power is applied until power is removed (even if the rpi is powered off). There are other hw solutions, which you are free to explore, but I don't think they should be part of this codebase.

some folks have relays that trip if the kiln draws 100% etc.

@solnus
Copy link
Contributor Author

solnus commented Aug 21, 2024

@jbruce12000 this request was more about software exceptions, not SSR hardware failure. If the process exits normally, or throws an exception and aborts (bugs are always possible), it should set the digital output pin to OFF or Open. I think the first step here could just be catching exceptions in main and disabling the pin when caught.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants