• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

ilcato/homebridge-mqttswitch: Homebridge accessory plugin that create an HomeKit ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

ilcato/homebridge-mqttswitch

开源软件地址:

https://github.com/ilcato/homebridge-mqttswitch

开源编程语言:

JavaScript 100.0%

开源软件介绍:

homebridge-mqttswitch

An homebridge plugin that create an HomeKit Switch accessory mapped on MQTT topics

Installation

Follow the instruction in homebridge for the homebridge server installation. The plugin is published through NPM and should be installed "globally" by typing:

npm install -g homebridge-mqttswitch

Release notes

Version 0.0.4 Dynamic Status

  • This new version uses an additional status command, sent via the "set" Topic, to dynamically retrieve the status of the switch from the device. The status should be then published by the device on the "get" topic, as usual. You should develop the device code to accept the status command on the "set" topic and answer publishing the actual status using the "get" topic. The status values must be the same used for the onValue and offValue configurations. This new version is able to detect the actual state of the device. This fixes also partially the issue #12. But, if the switch is off (I mean, the MQTT client is not responding to the status command) the best thing on the Home app is to put the device in a "No Response" state. You can't be sure that the device is really off, just think about a network problem, instead of a power problem. The method for this is not yet implemented in this version.

Version 0.0.3

  • Added onValue, offValue and integerValue params

Version 0.0.2

  • Initial public draft

Configuration

Remember to configure the plugin in config.json in your home directory inside the .homebridge directory. Configuration parameters:

  • "accessory": "mqttswitch",
  • "name": "PUT THE NAME OF YOUR SWITCH HERE",
  • "url": "PUT URL OF THE BROKER HERE",
  • "username": "PUT USERNAME OF THE BROKER HERE",
  • "password": "PUT PASSWORD OF THE BROKER HERE",
  • "caption": "PUT THE LABEL OF YOUR SWITCH HERE",
  • "topics": { "statusGet": "PUT THE MQTT TOPIC FOR THE GETTING THE STATUS OF YOUR SWITCH HERE", "statusSet": "PUT THE MQTT TOPIC FOR THE SETTING THE STATUS OF YOUR SWITCH HERE" }
  • "onValue": "OPTIONALLY PUT THE VALUE THAT MEANS ON HERE (DEFAULT true)",
  • "offValue": "OPTIONALLY PUT THE VALUE THAT MEANS OFF HERE (DEFAULT false)",
  • "statusCmd": "OPTIONALLY PUT THE STATUS COMMAND HERE"
  • "integerValue": "OPTIONALLY INCLUDE THIS TO USE 1/0 AS VALUES"

Note that if set, integerValue will override both onValue and offValue.

Look for a sample config in config.json example




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap