当前位置: 首页 > 软件库 > 其他开源 > 物联网 >

homebridge-mqtt-blinds

homebridge plugin to control blinds via mqtt
授权协议 MIT License
开发语言 JavaScript
所属分类 其他开源、 物联网
软件类型 开源软件
地区 不详
投 递 者 纪畅
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

homebridge-mqtt-blinds

This is a homebridge plugin to control blinds/shutters via mqtt. �� �� It can be used with DIY systems or retrofit solutions like Shelly2 andShelly2.5.

Installation

If you are new to Homebridge, please first read the Homebridge documentation. To install the plugin use:

sudo npm install homebridge-mqtt-blinds -g

Configuration

config.json example (generic)

{
    "bridge": {
        "name": "homebridge",
        "username": "CC:22:3D:E3:CE:30",
        "port": 51826,
        "pin": "031-45-154"
    },
    "accessories": [{
      "accessory": "BlindsMQTT",
      "name": "Living Room Blind",
      "manufacturer": "DIY",
      "model": "Prototype",
      "serialNumberMAC": "01.01.01.01",
      "mqttBrokerUrl": "mqtt://192.168.0.10:1883",
      "mqttUsername": "username",
      "mqttPassword": "password",
      "mqttMainTopic": "myBlind",
      "mqttSetTopics": {
        "targetPosition": "SET/targetPosition"
      },
      "mqttGetTopics": {
        "currentPosition": "GET/currentPosition",
        "positionState": "GET/positionState",
        "targetPosition": "GET/targetPosition"
      },
      "mqttPositionStateValues": ["0", "1", "2"],
      "useManualControls": false
    }
    ],

    "platforms": [
    ]
}

config.json example (for shelly2 devices)

{
    "bridge": {
        "name": "Homebridge",
        "username": "CC:22:3D:E3:CE:30",
        "port": 51826,
        "pin": "031-45-154"
    },
    "accessories": [{
      "accessory": "BlindsMQTT",
      "name": "Living Room Blind",
      "manufacturer": "Allterco",
      "model": "Shelly2",
      "serialNumberMAC": "01.01.01.01",
      "mqttBrokerUrl": "mqtt://192.168.0.10:1883",
      "mqttUsername": "username",
      "mqttPassword": "password",
      "mqttMainTopic": "shellies/shellyswitch-<YOUR_SHELLYID>/roller",
      "mqttSetTopics": {
        "targetPosition": "0/command/pos"
      },
      "mqttGetTopics": {
        "currentPosition": "0/pos",
        "positionState": "0",
        "targetPosition": "0/dummy"
      },
      "mqttPositionStateValues": ["open", "close", "stop"],
      "useManualControls": true
    }
    ],

    "platforms": [
    ]
}

Basic

Variable Description Example
accessory Name of the accessory plugin. BlindsMQTT
name Name for your blinds. Living Room Blind
manufacturer Manufacturer of your blind DIY
model Model of your blind. Prototype
serialNumberMAC Serial number of your blind. 01.01.01.01

MQTT

Basics

Variable Description Example
mqttBrokerUrl IP Adress of your MQTT Broker mqtt://192.168.0.10:1883
mqttUsername Your MQTT Broker username username
mqttPassword Your MQTT Broker password password
mqttMainTopic The main topic of your blind myBlind

Get Topics

Use these variables to set topics to inform the plugin about the current status of your blind. The plugin subscribes these topics.

Variable Description Example
currentPosition Topic to get the current position of your blind. The value has to be between 0-100. GET/currentPosition
positionState Topic to get the current position state of your blind. Custom PositionStates messages from your device can be configured with mqttPositionStateValues. GET/positionState
targetPosition Topic to get the target position of your blind. The value has to be between 0-100. GET/targetPosition

Set Topics

Use these variables to define the topic that the plugin uses to control your blind. The plugin will publish on these topics.

Variable Description Example
targetPosition Topic to set the target position of your blind. The value has to be between 0-100. SET/targetPosition

Position State Values

Use this variable to configure custom payloads for positionState messages for your device.

Variable Description Example
mqttPositionStateValues ["DECREASEING_STATE", "INCREASING_STATE", "STOPPED_STATE"] ["open", "close", "stop"] or ["0", "1", "2"]

Manual Controls

Smart Shutters are usually used in parallel with an automation and with manual controls (wall mounted switches). Set "useManualControls"=true if you have manual controls in your setup. This will force to plugin to "simulate" a target position when the manual controls are in use and no real target position is known.

Usage

Build up your blind. Use MQTT to communicate with homebridge. To explain how it works i will use the values of the examples above.For example, if you use the home app to open your blind 100%, the plugin will publish 100on the topic myBlind/SET/targetPosition. The blind should send the current position on the topic myBlind/GET/currentPosition, the position state on myBlind/GET/positionState an the target position on myBlind/GET/currentPosition.


Have fun with this plugin. Let me know if you find a issue.

 相关资料
  • DEPRECATION NOTICE This package is deprecated. Please use homebridge-mqtthing instead. It is more mature, better tested, and offers additional-features. homebridge-mqtt-temperature Get Temperature Sen

  • Using a raspberry pi 3, homebridge and homebridge-mqtt to relay commands to raspberry pi zeros and node-red from homekit. HAP-HodeJS: https://github.com/KhaosT/HAP-NodeJS Homebridge: https://github.co

  • Arduino Homebridge MQTT Arduino library for connecting to Homebridge. Dependancies: Mosquitto Homebridge Homebridge-MQTT Installation Guide PlatformIO Arduino IDE Usage // Switch example#include <Ardu

  • DEPRECATION NOTICE This package is deprecated. Please use homebridge-mqtthing instead. It is more mature, better tested, and offers additional-features. homebridge-mqtt-humidity Get Humidity Sensor da

  • MQ 遥测传输 (MQTT) 是轻量级基于代理的发布/订阅的消息传输协议,设计思想是开放、简单、轻量、易于实现。这些特点使它适用于受限环境。例如,但不仅限于此: 网络代价昂贵,带宽低、不可靠。 在嵌入设备中运行,处理器和内存资源有限。 该协议的特点有: 使用发布/订阅消息模式,提供一对多的消息发布,解除应用程序耦合。 对负载内容屏蔽的消息传输。 使用 TCP/IP 提供网络连接。 有三种消息发布服

  • 一、简介 mica-mqtt 基于 t-io 实现的简单、低延迟、高性能 的 mqtt 物联网开源组件。 二、功能 支持 MQTT v3.1、v3.1.1 以及 v5.0 协议。  支持 websocket mqtt 子协议(支持 mqtt.js)。  支持 http rest api,http api 文档详见。  支持 MQTT client 客户端。  支持 MQTT server 服务端。