luisiam / homebridge-cmdswitch2

CMD Plugin for HomeBridge (API 2.0): https://github.com/nfarina/homebridge
Apache License 2.0
176 stars 29 forks source link

Is there a way to send a dim command? #11

Closed jthurston closed 7 years ago

jthurston commented 7 years ago

I am using a command line project called CM15ADEMO that sends commands to my X10 modules which is working nicely with the Homebridge and the cmswitch2 plugin! I was wondering can I make a enhancement request to send a dim command?

luisiam commented 7 years ago

Do you mean the slider to control the brightness?

jthurston commented 7 years ago

Yes, or be able to use SIRI to set a light dim value... homebridge-http seems to have the following:

"accessories": [ { "accessory": "Http", "name": "Alfresco Lamp", "switchHandling": "realtime", "http_method": "GET", "on_url": "http://localhost/controller/1700/ON", "off_url": "http://localhost/controller/1700/OFF", "status_url": "http://localhost/status/100059", "service": "Light", "brightnessHandling": "yes", "brightness_url": "http://localhost/controller/1707/%b", "brightnesslvl_url": "http://localhost/status/100054", "sendimmediately": "", "username" : "", "password" : ""
} ]

"Set Living Room Lamps brightness to 50%" would produce a command of "Command" 50%

luisiam commented 7 years ago

Technically speaking, it's possible. However, this plugin is implemented as a general switch in HomeKit. This requires changes in the service (switch to lightbulb) or adding extra characteristics, which is too specific for certain application and I don't plan to do that in this plugin. Thanks.

jthurston commented 7 years ago

Okay, thank you for looking at it.