This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 400,000 packages pre-installed, including
homebridge-rcswitch-gpiomem2 with all
npm packages installed. Try it out:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
Control RF outlets with HomeKit / Siri using rcswitch-gpiomem2
npm install -g homebridge
npm install --global homebridge-rcswitch-gpiomem
unitcode are required.
My switches use on and off codes, so that's what I recommend and all I can
really help with.
accessory: Must be
name:: string :: What you want to call the switch. Keep in mind that Siri will prefer anything other than your homebridge switch if there's any confusion, so name it something unique
offCode:: int or string
systemcode:: string :: RF system code. I don't use this, please refer to other docs.
unitcode:: int :: RF unit code. I don't use this, please refer to other docs.
pin:: int, optional :: BCM pin connected to 433 mhz transmitter, defaults to
pulseLength:: int, optional :: RF pulse length, defaults to
bitLength:: int, optional :: bit length of RF code, only used if using decimal RF code, defaults to
repeats:: int, optional :: Number of times to repeat the transmission of the code, defaults to 10 (as per the original rcswitch code)
It seems that the
gpiomem system I use and the SysFS method of interacting with the GPIO are not compatible for reasons explained in this issue. Make sure that you aren't also using programs that access the GPIO by way of SysFS or this library may not work.
setRepeatTransmitto just before calling
switchOn()to facilitate multiple switches with different desired repeat counts
setPulseLengthfrom initialization to just before calling
switchOn()to facilitate multiple switches with different pulse lengths (closes #2).