mariusmotea / diyHue

Philips Hue emulator that is able to control multiple types of lights
Other
627 stars 107 forks source link

Generic support of any light types via shell/url #440

Closed Clodo76 closed 5 years ago

Clodo76 commented 5 years ago

I have a Konnex/EIB/Instabus system with around 50 lights. https://en.wikipedia.org/wiki/KNX_(standard) and i'm trying to understand how to manage it with diyHue.

Currently, i can turn on a light from my rPI with shell knxtool groupswrite ip:127.0.0.1 3/0/33 1 or i have an url, a php script that perform the same.

I'm studying the diyHue sources to understand how to add a config like

{
  name: "Bedroom",
  baseurl: "http://127.0.0.1/knx.php?address=3/5/33
},
{
  name: "Livingroom",
  baseurl: "http://127.0.0.1/knx.php?address=3/5/34
},

and diyHue call the baseurl by append "&action=set-switch&value=1"

or

"&action=get-switch"

and expect a response with "1" or "0". Or a sets of command shell with a similar generic behiavour.

Maybe a feature like that can be used as generic/custom bridge for support any kind of light by simply write some shell scripts or local php.

mariusmotea commented 5 years ago

From diyhue you can perform http/tcp/udp and shell requests, you only need to understand the api. I believe the best will be to add milight bulbs just to create the light resource on hue emulator. This will be color light, not sure if is the best for you, but is possible to convert it easy to other types of bulbs. You will need to add new protocol and to create new el if instance in sendLightRequest function for that protocol. Then you need to figure how to transform hue api values into that protocol values. In general hue api use values between 1 and 254, xy cie colorspace for color bulbs (function to convert to rgb is available).

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

stale[bot] commented 5 years ago

This issue has been automatically closed as it has not had any recent activity. Thank you for your contributions.