Ankündigung

Einklappen
Keine Ankündigung bisher.

Neuer Baustein Hue Group (14100)

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    En3rGy
    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)

    Kommentar


      Zitat von cevers Beitrag anzeigen
      En3rGy
      I found a way to use the room name to get the group id (since you cannot turn on/off rooms)
      I copied your post to a feature request in got hub. I hope that‘s the way for me to integrate your solution in the code

      Feel free to submit a pull request but don‘t forget the unit test

      Kommentar


        cevers, I updated the code. The info page will now print out the room name (independent of included devices) and the corresponding group id.
        The new release is on github until the stability is confirmed: https://github.com/En3rGy/14100_Hue/releases/tag/v3.7
        So, it should be easy to identify the rooms group id and use the module as given

        Kommentar


          En3rGy, Thanks alot. I will test it this week, should make a bit easier to figure out what ID to use.

          Kommentar


            Could you please re-open issue 29. I've provided some more information.

            Kommentar






              image.png
              I get this error messages when I look in the homeserver, can some one tell me what I'm doing wrong? Thanks

              Kommentar


                Zitat von Ysmart Beitrag anzeigen
                I get this error messages when I look in the homeserver, can some one tell me what I'm doing wrong? Thanks
                The 403 suggests that your key is invalid. When you browse to 172.16.40.172:8080 what does that say?

                SpleXyo That module is working perfectly with the HUE logic, thank you very much
                En3rGy 3.7 is working like a charm and now the group id is easy to find. Also thanks

                Kommentar


                  Zitat von ArchieSmith Beitrag anzeigen

                  Was kann ich da genau machen ?
                  Bei einem 2. System genau das gleiche Problem.
                  Konntest Du schon was feststellen woran das liegen kann bzw. was ich machen kann ?
                  Wie gesagt, habe ich bei mir privat sowie auch in der Firma das Problem. HUE ist sehr langsam manchmal.
                  2 unterschiedliche Netzwerke, 2 unterschiedliche Homis.
                  Gruß Andree Czybulski

                  Kommentar


                    Zitat von ArchieSmith Beitrag anzeigen
                    Konntest Du schon was feststellen woran das liegen kann bzw. was ich machen kann ?
                    Bei mir kann ich das nicht nachvollziehen -> läuft in der Regel unauffällig. Sehr selten habe ich ganz wenige Sekunden Delay. Das schiebe ich aber auf Netzwerkmagie.
                    Du musst irgendwie herausbekommen, warum die Hue-Bridge manchmal nicht gefunden wird. Also z.B. den Netzwerkverkehr aufzeichnen und analysieren, wenn der Effekt auftritt?

                    Kommentar


                      ​Hallo zusammen,

                      erst Mal danke für den tollen Baustein - ich habe ihn heute am Abend erstmalig verwendet. Ich bin auch schon recht weit gekommen, habe aus der Homeserver App keine Probleme.

                      Allerdings klappt die Dimmung über einen Gira TS3 Komforttaster nicht so recht. Das Licht dimmt willkürlich, pulsiert, aber eine korrekte Dimmung habe ich noch nicht hinbekommen.

                      Vermutlich habe ich die Funktionsweise des Bausteins in Zusammenspiel mit der Taster-Parametrierung nicht richtig verstanden. Hat jemand eine Idee was ich falsch gemacht haben könnte? Tasterseitig habe ich es erst ohne die erweiterten Parameter, dann mit und ohne Stoptelegramm versucht, aber es kam nie eine saubere Dimmung heraus.

                      Hoffe jemand hat einen guten Tipp.

                      Grüße
                      Chris

                      grafik.png

                      Kommentar


                        Zitat von Chris010887 Beitrag anzeigen
                        ​Hat jemand eine Idee was ich falsch gemacht haben könnte?
                        In der Hilfe zum Baustein heißt es:
                        Der zugh. Taster muss wie folgt parametrisiert werden:
                        Relatives dimmen mit Stopp-Signal, ohne Telegramm-Wiederholung​
                        Hast du das gemacht?
                        Wenn ja, musst du mit dem Eingang KNX Dimm Ramp experimentieren.

                        Kommentar


                          Ja im Zuge das herumprobierens auch so eingestellt gehabt, aber nie hat es ordentlich funktioniert. Vielleicht hatte ich noch nicht die korrekte Abstimmung mit dem KNX Ramp Eingang. Ich werde das bei Gelegenheit bei einer anderen Installtion nachzustellen versuchen.

                          LG Chris

                          Kommentar


                            Zitat von Chris010887 Beitrag anzeigen
                            Vielleicht hatte ich noch nicht die korrekte Abstimmung mit dem KNX Ramp Eingang.
                            Bei mir läufts mit den Std.-Einstellungen. Deshalb sind‘s ja die Std.-Einstellungen 😄

                            Kommentar


                              Zitat von cevers Beitrag anzeigen

                              The 403 suggests that your key is invalid. When you browse to 172.16.40.172:8080 what does that say?

                              SpleXyo That module is working perfectly with the HUE logic, thank you very much
                              En3rGy 3.7 is working like a charm and now the group id is easy to find. Also thanks
                              When I go to 172.16.40.172 I get a Philips hue page with just a lot of text, when I add the 8080 port it just keeps loading and opens nothing

                              Kommentar


                                Zitat von Ysmart Beitrag anzeigen

                                When I go to 172.16.40.172 I get a Philips hue page with just a lot of text, when I add the 8080 port it just keeps loading and opens nothing
                                Sorry, i meant 172.16.40.176:8080
                                And are you sure that the key is correct?

                                Kommentar

                                Lädt...
                                X