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

drumfreak/homebridge-tuya-colorlight: Tuya Color LED Light control for homebridg ...

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

开源软件名称:

drumfreak/homebridge-tuya-colorlight

开源软件地址:

https://github.com/drumfreak/homebridge-tuya-colorlight

开源编程语言:

JavaScript 100.0%

开源软件介绍:

Tuya LED Color Light Support for Homebridge

Example config.json for LED Color Light Controllers that support RGB or RGBWW:

"accessories": [
	{
        "accessory": "TuyaColorLight",
        "name": "Fountain Color Light",
        "ip": "192.168.104.31",
        "devId": "XXXXXXXXXX",
        "localKey": "XXXXXXXXXXXXXX",
        "gwId":"XXXXXXXXXXXXXXXX",
        "productKey":"IXXXXXXXXXW",
        "apiMinTimeout" : 100,
        "apiMaxTimeout" : 1000,
        "apiRetries": 1,
        "apiDebug" : false,
        "refreshInterval" : 120,
        "debugPrefix" : "~~~!~~~ ",
        "debug" : false,
        "deviceEnabled" : true
    }
]

Example config.json for Tuya based multiple LED Color Lights:

"accessories": [
    {
        "accessory": "TuyaColorLight",
        "name": "Fountain Color Light",
        "ip": "192.168.104.31",
        "productId":"IXXXXXXXXXW",
        "devId": "XXXXXXXXXX",
        "localKey": "XXXXXXXXXXXXXX",
        "apiMinTimeout" : 100,
        "apiMaxTimeout" : 1000,
        "apiRetries": 1,
        "apiDebug" : false,
        "refreshInterval" : 120,
        "debugPrefix" : "~~~!~~~ ",
        "debug" : false,
        "deviceEnabled" : true
    },

    {
        "accessory": "TuyaColorLight",
        "name": "Tree Color Light",
        "ip": "192.168.104.32",
        "productId":"IXXXXXXXXXW",
        "devId": "XXXXXXXXXX",
        "localKey": "XXXXXXXXXXXXXX",
        "apiMinTimeout" : 100,
        "apiMaxTimeout" : 1000,
        "apiRetries": 1,
        "apiDebug" : false,
        "refreshInterval" : 120,
        "debugPrefix" : "~~~!~~~ ",
        "debug" : false,
        "deviceEnabled" : true
    }
]

This was originally derived from the homebridge-tuya-outlet plugin and modified to utilize the 'dps' in the Tuya api for managing multiple device function points.

Carefully read and review the procedures to obtain the Tuya api device ID (hint: it has the MAC address in it) and the localKey. It's quite a procedure, but it's easy once learned: Tuya API Sniffing Procedures

This plugin requires a modified version of the tuyapi that I extended found here: homebridge-tuyapi-extended

See tuyapi for original inspiration.

Tested on the following LED lights (Non affiliated links following:)

This plugin should work with any TUYA based LED Color light that can be added to the Tuya, or Smart Life apps. A popular brand I've found is LOHAS Lights or on Amazon: LOHAS Lights on Amazon

Helpful things to note:

  1. I found it is best to assign a static IP address through DHCP on my router to each device. Add that IP address to the config file in homebridge when setting up your devices. So each unique physical device should have it's own static ip. Even though this is not required in the original tuyapi and homebridge-tuya-outlet, I found that there is a potential hang in homebridge while waiting on the IP address to be obtained. By adding it static, it reduced the wait time and lag when accessing these devices.

  2. At this time, until the homebridge-tuyapi-extended is updated, if you add a device and it is in your config file, but unplugged, this may cause your homebridge to crash or hang. This is being worked out, and a reason for the fork of the original tuyapi.




鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
1Password/homebrew-tap: Homebrew tap to install 1Password products.发布时间:2022-06-17
下一篇:
mas-cli/homebrew-tap: 发布时间:2022-06-17
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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