npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

homebridge-fantasia

v1.1.2

Published

Fantasia Viper fan plugin for Homebridge

Downloads

13

Readme

homebridge-fantasia

npm npm npm

Fantasia Viper fan plugin for Homebridge.

Fantasia is a trademark owned by Fantasia Distribution Ltd.

This plugin was developed for a Fantasia Viper ceiling fan that uses a TR32A 433.92MHz remote control. It may work with other fans that similarly use a Holtek HT12E encoder to drive an R433A 433.92MHz SAW Resonator.

Installation

  1. Connect a 433.92MHz transmitter to the computer (see partlist and wiring guide below).
  2. Install pilight by following the instructions at: https://manual.pilight.org/installation.html
  3. Configure pilight to match the wiring of the 433.92MHz transmitter (see example below).
  4. Install this plugin using: npm install -g homebridge-fantasia
  5. Edit config.json and add a Fantasia accessory for each fan to be controlled (see example below).
  6. Run Homebridge.

Partlist

Alternative small form factor computers (e.g. other Raspberry Pi models or Arduino) or 433.92MHz ASK/OOK transmitters may also be suitable.

Wiring

Connect the FS1000A 433.92MHz transmitter to the Raspberry Pi 2 Model B GPIO header J8:

| FS1000A pin | Raspberry Pi pin | | ------------ | ---------------- | | GND | Pin 6 (Ground) | | DATA | Pin 12 (GPIO 1) | | VCC | Pin 4 (5V Power) |

(Ignore the misleading ATAD silkscreen lettering on the FS1000A; the middle pin is DATA.)

Solder an antenna to the hole in the corner of the FS1000A board (not the small hole near the ANT silkscreen). This can be a simple straight piece of wire: 69.24cm (wavelength), 34.6cm (half wavelength), or 17.3cm (quarter wavelength). However, a coil loaded antenna is likely to give better results.

Example /etc/pilight/config.json

{
    "devices": {},
    "rules": {},
    "gui": {},
    "settings": {
        "log-level": 6,
        "pid-file": "/var/run/pilight.pid",
        "log-file": "/var/log/pilight.log",
        "standalone": 0,
        "port": 5000,
        "webserver-enable": 1,
        "webserver-root": "/usr/local/share/pilight/webgui",
        "webserver-http-port": 5001,
        "webserver-https-port": 5002,
        "webserver-cache": 1,
        "whitelist": "",
        "gpio-platform": "raspberrypi2"
    },
    "hardware": {
        "433gpio": {
            "sender": 1,
            "receiver": -1
        }
    },
    "registry": {
        "webserver": {
            "ssl": {
                "certificate": {
                    "location": "/etc/pilight/pilight.pem"
                }
            }
        },
        "pilight": {
            "version": {
                "current": "8.1.4"
            }
        }
    }
}

The essential changes to the default configuration are:

  • Change gpio-platform to raspberrypi2 specifying the GPIO hardware platform being used.
  • In the hardware section add 433gpio configuration to specify the GPIO used to drive the FS1000A 433.92MHz transmitter. Note that pilight use the Wiring Pi GPIO numbering scheme (not the BCM GPIO or physical header pin numbering scheme).

Example config.json

{
    "accessories":
    [{
        "accessory":    "Fantasia",
        "name":         "Bedroom Fan",
        "address":      [0, 1, 0, 1],
        "host":         "localhost",
        "port":         5001
    }]
}

The address should be set to match the code switch within the remote control and receiver. Four values are required, corresponding to switch 1 through switch 4. Use 0 if the switch is towards the numbers 1234, and 1 if it is towards the ON DIP text.

Multiple accessories can be added to control different fans. They must be each given a unique name and address.

The host and port specify how to reach the pilight daemon. They can be omitted if pilight is running on port 5000 on the same machine as this plugin.

Notes

This plugin is transmit-only; it does not monitor the fan's original remote control, so the status within HomeKit may not match the fan's actual state.

The current version of this plugin only supports fan speed control. It does not support reversing the direction or control of the light.

License

ISC License (ISC)Copyright © 2019 Alexander Thoukydides

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.