rxseger / homebridge-ipmi

IPMI sensor plugin for Homebridge
MIT License
5 stars 4 forks source link

Chassis intrusion detector as a ContactService #2

Open rxseger opened 7 years ago

rxseger commented 7 years ago

ipmitool supports other features besides temperature and fans, not all has any relevant corresponding service in Homebridge - see https://github.com/KhaosT/HAP-NodeJS/blob/master/lib/gen/HomeKitTypes.js - but some may very well. Some ideas:

rxseger commented 7 years ago

Intrusion detector can be reset on Supermicro boards as described on http://www.supermicro.com/Aplus/support/faqs/faq.cfm?faq=11894

The spec is that once the chassis was opened, the status of intrusion will become "detected" even if the cover has been restored. 
It is to notify user that server had been intruded. 
You can hit the "intrusion reset" or issue following commands to reset the sensor reading. 
Ipmitool -I lanplus -H xxx.xxx.xxx.xxx -U ADMIN -P ADMIN raw 0x30 0x03 
or 
smcipmitool xxx.xxx.xxx.xxx ADMIN ADMIN ipmi oem clrint

but I haven't found out to trigger it yet. IPMIView says "Chassis Intru" active, but after I reset (either through ipmitool raw 0x30 0x03, or Reset in the app), or open the case, nothing happens - maybe needs to be enabled in BIOS? Looks like it:

$ ipmitool chassis status
System Power         : on
Power Overload       : false
Power Interlock      : inactive
Main Power Fault     : false
Power Control Fault  : false
Power Restore Policy : always-off
Last Power Event     : 
Chassis Intrusion    : inactive
Front-Panel Lockout  : inactive
Drive Fault          : false
Cooling/Fan Fault    : false