Code Monkey home page Code Monkey logo

14100_hue's Introduction

Anurag's GitHub stats

14100_hue's People

Contributors

en3rgy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

14100_hue's Issues

all lights are switched on when putting 1 on

When i put 1 light on, the other that is in the same group does the same after 1 sec. I'm not using the group id.
When i put the same light out, the other stays on.
Changing the color does not have the same issue. Only the put on is responding to that command.

Color not correct

RGB to xy conversion seems buggy. rgb = (0, 255, 0) results in some kind of yellow

Version 1.5 totally not working.

expert 4.11
no reaction from lamps, neither groups
Debug page shows this error.
AttributeError: HueGroup_14100_14100 instance has no attribute 'PIN_I_NGROUP'

Min brightness is 1%

Min brightness in hue app is 1% when using the dim function. The corrsponding abs value is 0 while for 100% it's 254.
Output RM Brighness shall send 1% when the internal value is 0.

Feature request: allow light control in addition of group control

En3rGy : Schau mal du bist an der Sache aktiver dran als ich... ich hab das mit den Lichtern und den Gruppen in meinem Baustein ja so gelöst das es einen Eingang für ein Gerät und eine für Gruppen gibt. Und im Baustein frag ich das dann entsprechend so ab:

Code:

if self.id > 0:
self.base = "/api/{0}/lights/{1}".format(self.key,self.id)
self.mode = "state"
self.ident = "D{0}".format(self.id)
if self.gid > 0:
self.base = "/api/{0}/groups/{1}".format(self.key,self.gid)
self.mode = "action"
self.ident = "G{0}".format(self.gid)

und entsprechend verwende ich dann in den Funktionen die Vars ... :-) vielleicht kannst du es ja ähnlich so adaptieren :-)

Gruß
Paul

Control rooms

Reported by https://knx-user-forum.de/forum/öffentlicher-bereich/knx-eib-forum/1451665-neuer-baustein-hue-group-14100?p=1890274#post1890274

I found a way to use the room name to get the group id (since you cannot turn on/off rooms)

When you look at the /resource/grouped_light the grouped lights in question have an owner, this is the room in which the lights are.
So with some hack code i'm able to get the ID from the name -> RID -> ID. This way i can adjust my own code and keep it working with V2.😂
I know you have your own code to deal with and the bugs that come with that. But this might help in the future, so just sharing for that and not to pester you to implement it 😊

Code:

import json
import httplib
import ssl
def call_https_hue(ipadres, path):
  h = httplib.HTTPSConnection(ipadres,context=ssl._create_unverified_context())
  headers = {"Content-type": "text/plain" ,"hue-application-key": "myhuekey"}
  h.request('GET', path, headers=headers)
  return h
roomname = ("Eetkamer")
ipadres = ('192.168.178.128')
path = ('/clip/v2/resource/room')
h = call_https_hue(ipadres,path)
r = json.load(h.getresponse())
for i, member in enumerate(r['data']):
    x = str(member['metadata']['name'])
    if  x.lower() == roomname.lower():
      index_a = i
 
naam = (r['data'][index_a]['metadata']['name'])
rid = (r['data'][index_a]['id'])
print(naam)
print(rid)
path = ('/clip/v2/resource/grouped_light')

k = call_https_hue(ipadres,path)
l = json.load(k.getresponse())
for i, member in enumerate(l['data']):
    x = (member['owner']['rid'])
    if  x == rid:
      index_b = i
id = (l['data'][index_b]['id'])
print(id)​

roomname is the one i can change in whatever room and it will spit out the ID at the end. (the one before that is the Owner ID)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.