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

itsfrosty/control4-2way-web-driver: Control4 2way web driver - Used by Home Brid ...

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

开源软件名称:

itsfrosty/control4-2way-web-driver

开源软件地址:

https://github.com/itsfrosty/control4-2way-web-driver

开源编程语言:


开源软件介绍:

control4-2way-web-driver

This driver allows you to get and set the state of any control4 device by making an http request. The response is in JSON format.

Use Case:

I am using this (along with my homebridge-c4-plugin) to connect homekit to my control4. So I can say "Siri turn on Kitchen Lights" or "Siri is my garage door closed". You can use this with any other hub which supports making http requests.

Examples:

  • Get the current level of dimmer light: http://CONTROLLER_IP:9000/?command=get&proxyID=25&variableID=1001

Result: {"1001":"75"} which means the dimmer light with proxyID 25 is currently at 75%

  • Update the current level of dimmer light: http://CONTROLLER_IP:9000/?command=set&proxyID=25&variableID=1001&newValue=100

Result: {"success":"true"}

  • Get the current temperature set for thermostat: http://CONTROLLER_IP:9000/?command=get&proxyID=34&variableID=1132,1130

Result: {"1132":"68","1130":"67","success":"true"} which means the thermostat is set to 68F and current temperature is 67F

  • Update the temperature of thermostat: http://CONTROLLER_IP:9000/?command=set&proxyID=34&variableID=1132&newValue=66

Result: {"success":"true"}

  • Get list of all variables for a device: http://CONTROLLER_IP:9000/?command=getvariables&proxyID=25

Result: {"1005":"MAX_ON_LEVEL","1006":"MIN_ON_LEVEL","1003":"CLICK_RAMP_RATE_DOWN","1007":"START_ON_LEVEL","1000":"LIGHT_STATE","1004":"PRESET_LEVEL","1008":"START_ON_TIME_MS","1001":"LIGHT_LEVEL","1002":"CLICK_RAMP_RATE_UP","success":"true"}

How to use:

Sorry this is not currently easy to use :(. You will have to find the variableID and proxyID for each device you want to connect. I hope in future we can make it use device names and variable names instead of IDs.

  • You need to either have access to ComposerPro or ask your dealer to install it for you.
  • To find proxyID, mouse over the device or check info for the device.
  • To find variableID, execute: for k,v in pairs(C4:GetDeviceVariables(34)) do print(k, v.name, v.value) end which will print all variables, their IDs and current values.

Warning:

This is completely unencrypted and unsecure. Anybody with access to your wifi will be able to control any of your control4 connected devices. So don't open it to internet and also make sure you have a secured wifi.




鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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