rxseger / homebridge-ipmi

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

How you control fan? #5

Open toshibochan opened 7 years ago

toshibochan commented 7 years ago

How did you control fan? You use raspberry pi and relays?

rxseger commented 7 years ago

homebridge-ipmi is not using relays (or the Raspberry Pi, per se, although it can run on a Pi to monitor a server using IPMI remotely) - it uses the Intelligent Platform Management Interface, basically a separate computer in many servers that has its own IP address and lets you control or monitor the server out-of-band, including reading and adjusting fan speeds. It speaks over the network using https://www.npmjs.com/package/node-ipmi

For controlling relays, checkout https://github.com/rxseger/homebridge-gpio-cmd (posted about it here: https://github.com/nfarina/homebridge/issues/801#issuecomment-252531006) or the first section of Home automation with Raspberry Pi + Homebridge. This just drives a GPIO pin, which can then be used to drive a relay or other load. I'm also using this same technique with https://github.com/rxseger/homebridge-pwm-fan - with the addition of an GPIO input pin for a tachometer (no relay in this case, transistor driver only).

I think this video describes it better than I can: https://www.youtube.com/watch?v=W7cV9_W12sM&t=0m43s titled "Controlling a DC Motor with the Raspberry Pi", but the same circuit can be used to control a relay coil from GPIO (just replace the motor with the coil).

toshibochan commented 7 years ago

I want control ceiling fan by connecting PI to relay and relay to remote control. Exemple this video: https://www.youtube.com/watch?v=bFAyaKc0ChU But this note using homebridge. She use HAP nodejs. I wish some one can make for homebridge. Exemple this other one: https://github.com/jasoncodes/homebridge-tosr0x-fan But he use expensive relay connect to the network. Raspberry pi be more cheaper(raspberry pi zero is only $5 + $5 to $10 for relay.