I am building an application to control more than 20 raspberry pis where each of which controls 32 relays connected to electrical locks. having a big system like this would require self-diagnoses mechanisim to know when and where the problem in the system exists e.g. relay, lock, raspberry, etc.

Is there a mechanism to build such a system to diagnose the raspberry pi's connected components every now and then or especially on boot-up to check all relays' and locks' health and functionality e.g. if a lock is released successfully or not?

  • Ah let me see. Your question is a bit too board. Let us eat the big elephant bite by bite, say, in 3 bites: (1) How to monitor one of the 20 Rpi's is alive and well? (2) How to monitor one of the 32 relays of any Rpi is alive and well? (3) Now all together, how to monitor each of the 32 relays of each of the 20 Rpis are alive and well? If you agree we can structure the big question into these 3 smaller questions, and if yes, which question you would like to start first, then we can start. Counter suggestions welcome! :) – tlfong01 Oct 26 '19 at 5:11
  • Thanks @tlfong01. Yes, but for 1st question, I already have a system in place where each RPi sends a signal (pulse) to the system to inform that it is alive. you can say we still have questions 2 and 3 for relays and the electrical locks. thanks :) – Abdulkarim Kanaan Oct 26 '19 at 6:28
  • Good. Now perhaps you can give me the links to the relay module and solenoid door lock you would like to monitor. It is OK if you don't have the links in hand. I can use pseudo standard models, say 5V relay and 12V door lock. But it would make the design easier if you can let us know if the relay module is 16 channel, using GPIO, UART, Ethernet/Wifi control etc. – tlfong01 Oct 26 '19 at 6:56
  • Or if you don't have any door lock in mind, you can look at the following catalog and let me know which ones you like to use: AliExpress Door Lock Catalog aliexpress.com/w/wholesale-solenoid-lock.html – tlfong01 Oct 26 '19 at 7:11
  • thanks @tlfong01 Yes, it's 16 channel 5v relays. I am going to use two decoders (MCP23017 I2C) to control 32 relays using 16 channel relay board. the electrical lock is 12v – Abdulkarim Kanaan Oct 26 '19 at 7:12

You can not check the health of a relay module. But you can check if one is on or off. Try to read the pinouts and set the code and add them with your boot configs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.