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-somfy

v0.9.2

Published

Homebridge plugin to control somfy shutters

Downloads

12

Readme

Homebridge Somfy Remote

This Homebridge plugin allows control of Raspberry Pi GPIO pins, more specifically to control a Somfy remote + schematics to wire the remote to the Raspberry Pi.

To install this plugin simple type sudo npm install homebridge-somfy -g --unsafe-perm=true. Next open the config.json that contains your Homebridge configuration and add a block like the following one to the accessories array:

{
    "accessory": "HomebridgeSomfy",
    "name": "display-name",
    "pinup": "hardware pin number",
    "pindown": "hardware pin number",
    "movementduration": "average full up/down motion in seconds",
    "pressduration": "duration of button press in milliseconds",
    "delay": "the delay in seconds (can be 0 for the first plugin instance)", 
    "mqttbroker": "mqtt://broker-url:1883",
    "mqttuser": "username",
    "mqttpassword": "password",
    "mqtttopicin": "/path/and/topic/in",
    "mqtttopicout": "/path/and/topic/out"
}

The accessory name has to be HomebridgeSomfy to link to the plugin. The name field is for the display name in the HomeKit app. The pinup and pindown fields are your hardware pin numbers for shutters up/down. The movementduration field sets the duration (in seconds as a string) it takes for the shutters to fully open or close. The pressduration field sets the duration (in milliseconds as a string) the button on the remote is activated/pressed. The delay field is optional when only one instance of this plugin is used. The mqttbroker field is the broker url (including mqtt:// and port, default 1883) to connect to. The mqttuser field is the username used for the mqtt connection. The mqttpassword field is the password used for the mqtt connection. The mqtttopicin field contains the topic for controlling the shutters via mqtt, payload must be JSON with a field name target being either up or down. The mqtttopicout field contains the topic for sending updates when the shutters are controlled, the messages have the retained flag set. When using multiple instances of this plugin it is required to specify this field. It contains the number of seconds that the plugin should wait before sending a signal to the remote.

The default state for the shutters in the HomeKit app is disabled, which means the shutters are raised. If the switch is active it means the shutters are lowered. The plugin only sends a short activation signal and keeps internal state of the shutters.

Hardware Requirements

  • Telis 1/4 RTS remote - Remote control for Somfy systems
    • The Telis 1 remote can be bought for about 30 euros but can only control one channel!
  • Raspberry Pi (any version)

Hardware guide

  • Program the remote with your original remote
  • Open the remote and remove the battery
  • Remove the last remaining screw (Torx Security, can be removed with tweezers)
  • Remove the logic board from the unit (beware no the break the clasps)
  • Look at the image below and solder wires to these exact points Logic board with soldered wires
    • The Orange wire: VCC
    • The Grey wire: GND
    • The Yellow wire: Signal UP
    • The Purple wire: Signal DOWN
  • Make some cutouts in the soft plastic of the side of the remote, this will allow the wires to pass through. Wire cutouts
  • Close the remote (leave out the Torx screw)
  • Hook up the remote to the Raspberry Pi as seen in the picture. Wire cutouts
    • Holding the Pi in the position as shown
    • Pin 1 (Top right): VCC
    • PIN 2: Signal UP (hardware pin: 3, use this number in the config)
    • PIN 3: Signal DOWN (hardware pin 5, use this number in the config)
    • PIN 4: Not connected
    • PIN 5: GND
  • Once fully connected, install this package with the command in the beginning of this readme and add the config to the Homebridge config.json file.
  • If desired you can use any combination of the available GPIO pins on the Pi, just be sure to enter the correct hardware pin numbers in the config!

This code makes use of the node-rpio library, more information here