1 Star 5 Fork 2

好冷/node-red-contrib-blinker-mqtt

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

node-red-contrib-blinker-mqtt

put Blinker(www.diandeng.tech) Mqtt message to Node-Red

BlinkerAPP接入(node-red-contrib-blinker-mqtt)

接入BlinkerAPP中的设备到Node-RED
1.0.5版支持一个流中放置多个节点
1.0.6修复了MQTT发送失败的bug
业余时间开发,欢迎入群交流(776817275)

简单使用教程

示例:

[{"id":"65a77e7e.bea8d","type":"tab","label":"苏蔚家的Blinker控灯","disabled":false,"info":""},{"id":"34d4d6f2.f9f9da","type":"Blinker-IN","z":"65a77e7e.bea8d","name":"客厅","blinker":"a9068b30.e9caf8","x":90,"y":160,"wires":[["5d678266.19a84c"]]},{"id":"5d678266.19a84c","type":"switch","z":"65a77e7e.bea8d","name":"查询还是执行","property":"payload","propertyType":"msg","rules":[{"t":"hask","v":"get","vt":"str"},{"t":"hask","v":"set","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":260,"y":160,"wires":[["a3c9c0e2.1e3f7"],["52f9f761.367f98"]]},{"id":"a3c9c0e2.1e3f7","type":"function","z":"65a77e7e.bea8d","name":"客厅走廊和入户","func":"let gds=[\n \"light.vv_livingroom_zd\",//客厅大灯\n \"light.vv_livingroom_sd\",//客厅灯带\n \"light.vv_bedroom_sub\",//入户灯\n \"light.vv_livingroom_zl\"//走廊灯\n ]\nreturn {\n SecretKey:msg.SecretKey,\n payload:{\n entity_id:gds[msg.payload.num-1]\n }\n}","outputs":1,"noerr":0,"x":460,"y":100,"wires":[["d1b66b49.f94d38"]]},{"id":"52f9f761.367f98","type":"function","z":"65a77e7e.bea8d","name":"客厅走廊和入户","func":"let ids=[\n \"light.vv_livingroom_zd\",//客厅大灯\n \"light.vv_livingroom_sd\",//客厅灯带\n \"light.vv_bedroom_sub\",//入户灯\n \"light.vv_livingroom_zl\"//走廊灯\n ]\nreturn {\n payload:{\n domain:\"light\",\n service: msg.payload.set.pState?\"turn_on\":\"turn_off\",\n data:{\n entity_id:ids[msg.payload.set.num-1]\n }\n }\n}\n","outputs":1,"noerr":0,"x":460,"y":220,"wires":[["508b96a6.691288"]]},{"id":"508b96a6.691288","type":"api-call-service","z":"65a77e7e.bea8d","name":"开关控制","server":"c21a3934.c1b6c8","version":1,"debugenabled":true,"service_domain":"light","service":"","entityId":"","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":640,"y":220,"wires":[[]]},{"id":"d1b66b49.f94d38","type":"api-current-state","z":"65a77e7e.bea8d","name":"状态查询","server":"c21a3934.c1b6c8","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"","state_type":"habool","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":640,"y":100,"wires":[["30fd535f.72905c"],["30fd535f.72905c"]]},{"id":"30fd535f.72905c","type":"function","z":"65a77e7e.bea8d","name":"当前状态","func":"return {\n send:true,\n SecretKey:msg.SecretKey,\n payload:{\n pState:msg.payload,\n num:1\n }\n};","outputs":1,"noerr":0,"x":820,"y":100,"wires":[["5a448244.ad561c"]]},{"id":"5a448244.ad561c","type":"Blinker-OUT","z":"65a77e7e.bea8d","x":850,"y":200,"wires":[[]]},{"id":"a9068b30.e9caf8","type":"blinker-conf","z":"","name":"测试客厅","SecretKey":"1f844d0eeef9","DeviceType":"multi_outlet","autoRes":"true"},{"id":"c21a3934.c1b6c8","type":"server","z":"","name":"Home Assistant","legacy":false,"addon":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

MIT License Copyright (c) 2020 suwill Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
JavaScript 等 2 种语言
MIT
取消

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/suwillT_T/node-red-contrib-blinker-mqtt.git
git@gitee.com:suwillT_T/node-red-contrib-blinker-mqtt.git
suwillT_T
node-red-contrib-blinker-mqtt
node-red-contrib-blinker-mqtt
master

搜索帮助