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

@ppapot/homebridge-tostcorp

v2.0.9

Published

integrate the RTS TostCorp box to operate somfy blinds

Downloads

14

Readme

Homebridge TOSTCORP Platform Plugin

This is a first TOSTCORP Homebridge platform plugin and can be used to control somfy blinds thru the TOSTCORP box delivered here.

This plugin is developped with the help of the platform plugin template should as defined in the developer documentation.

the platfrom plugin connect a MQTT server and will send the proper order to the specific topic of the blind : u for Up, d for Down

The TostCorp box will subscribe to the blind topic and generate the adequate Radio Frequency message to somfy RTS blinds for up and down movement. the following modification in the TostCorp can be done to benefit of the config.h definition of the blinds to publish the DB on MQTT. Then the DB is used by the plugin in the Topic /somfy/somfy-remote/db to instanciate accesory.

modification of TostCorp SW :

in PubSubClient.h change packet size to 1024

// MQTT_MAX_PACKET_SIZE : Maximum packet size
#ifndef MQTT_MAX_PACKET_SIZE
#define MQTT_MAX_PACKET_SIZE 1024
#endif

in config.h add db_topic

const char*     status_topic = "somfy/somfy-remote/status"; // Online / offline
const char*        ack_topic = "somfy/somfy-remote/ack"; // Commands ack "id: 0x184623, cmd: u"
const char*         db_topic = "somfy/somfy-remote/db";  // topic listing the remotes
#define PORT_TX D1 // Output data on pin 23 (can range from 0 to 31). Check pin numbering on ESP8266.
#define PORT_DIO_TX D1 // Output data on pin 23 (can range from 0 to 31). Check pin numbering on ESP8266.

and in tost_corp_box_somfy_rts_release_2.0.0.ino in line 33 to initialise the DB string :

String mqtt_db = "";

in line 110 if you want to remove the additional wifi network generated by the box ( Optional)

    WiFi.mode(WIFI_STA);

add in line 167 to populate the DB string from the config.h:

 mqtt_db = mqtt_db + remote.mqtt_topic + ":" + remote.id + ":" + remote.description + ":" + remote.device_group + "::"; 

add in line 245 the publish of the string on the mqtt server

             // update DB , message is retained 
             //mqtt.publish(db_topic, "", true); // clear previously retain message
             mqtt.publish(db_topic, mqtt_db.c_str() , true);
             Serial.print("\nLOG - Published the DB to topic : ");
             Serial.println(db_topic);

TosTCorp plugin configuration

at this momemnt the config.json needs to be udapte with 3 element to ensure proper communicaation from the plugin to the MQTT server

       {
            "mqttIP": "mqtt://xxx.xxx.xxx.xxx",
            "mqttUserName": "username",
            "mqttUserPassword": "password",
            "platform": "TostCorp"
        }

In the future, I hope also to offer:

  • the MQTT server hosting in the homebridge as a plugin
  • possibility to configure the blind manually in the config.json (ongoing)

TostCorp plugin usage

once the plugin creates dynamiquely the blinds, within the IOS Home application, you can push once to genrate a up command the next psuh will be a down command. There is no feedback from the blind to tell the position (somfy RTS limitation), I alternate status between the completely close or open with each push.

in the future i will try to generate a stop action if we push on the blind within the 10s and consider the blind to be at value of the inital movement the following push will generate a opposite movement. the following sequence should be fine:

  • up => stop (within 10s) => down
  • down => stop (within 10s) => up
  • up => down (after 10s)
  • down => up (after 10s)