Philips Hue Leuchten mit Enigmalight steuern

    Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

    • Philips Hue Leuchten mit Enigmalight steuern

      "Board-Multipost"

      Hier mal ne kleine Anleitung wie ich meine Hue Go Leuchten mit Enigmalight ansteuere.
      Habe eine links und rechts neben dem TV platziert.

      1. Enigmalight installieren
      2. Curl vom Feed installieren (opkg install curl)
      3. Mit dem Hue API Debugger den Key, die Leuchtennummern und den Leuchtentyp aus der Bridge lesen **
      4. Die "enigmalight_hue_LR.py" und "rgb_xy.py" in den "\home\elight-addons\wifilight\philips_hue" Ordner kopieren (anderer Ordnerpfad ist auch möglich, muss dann nur in der config angepasst werden!)
      5. enigmalight.conf nach /etc kopieren

      ** Diese Infos müssen jetzt noch in die "enigmalight_hue_LR.py" eingetragen werden

      Zeile 7+12 : den Gamut passend zur Leuchte eintragen (je nach Leuchtentyp)
      Zeile 14+60 : den Key der Bridge
      Zeile 15+60 : die IP der Bridge
      Zeile 17+18 : ausgelesene Nummer der Leuchten


      Das sollte alles gewesen sein. Wie geschrieben habe ich die .py für die
      Go Leuchte angepasst, die anderen Typen sollten aber auch
      funktionieren.
      Die Go hat halt den Vorteil, dass man sie auf 2% runterdimmen kann was die
      anderen nicht schaffen. Sieht dann halt bescheiden aus wenn der TV
      schwarz oder halt sehr dunkle Töne darstellt
      und die Hue noch mit 15-20% munter weiterleuchten. Noch zu erwähnen, die
      Leuchten haben ein kleines Delay von ca. 800ms, soll aber mit dem
      kommenden Bridgeupdate Geschichte sein.
      Im Enigmalight Plugin muss man wie gehabt einen Farbabgleich machen. Der Speed sollte auf 100 stehen.

      Dank geht noch an "betacentauri" und "karl123456"

      Philips Hue.rar



      Ergänzung

      Paket für 1ne Hue mit Bildauslesebereich "Gesamt"

      Paket für 4x Hue mit Bildauslesebereich 1.Leuchte "links" 2.Leuchte "rechts" 3+4.Leuchte "Gesamt"

      Dateirechte (z.B. mit FTP) auf 744 stellen!
      Dateien
      • 1x_Hue.rar

        (4,35 kB, 427 mal heruntergeladen, zuletzt: )
      • 4x_Hue.rar

        (4,57 kB, 356 mal heruntergeladen, zuletzt: )
      Gr hm

      Dieser Beitrag wurde bereits 4 mal editiert, zuletzt von holymoly_EL ()

    • Hört sich gut an, werd ich an den Feiertagen gleich mal testen :)

      Danke und Frohes Fest

      Gschnoit
      Bildung ist etwas, was man ganz ohne Beeinträchtigung durch den Schulunterricht erwerben muss. (Mark Twain)

      VU+ Ultimo 4K, VU+ Solo 4K V 15.X.X; VU+ Duo², VU+ Ultimo - VTi, VU+ Duo - VTi V 11.X.X;
      SAT: Hotbird 13°, Astra 19,2°, Astra3 23,5°, Astra2 28,2°
    • Das ganze funktioniert leider nur befriedigend, falls man kein Ambilight am TV hat. Der Speed muss im Plugin zwingend auf 100 stehen sonst wird das Delay der Hue Leuchten zu groß. Das angekündigte Bridge Update von Philips steht ja noch aus! Habe das EL Plug auch schon zweimal installiert, das ging auch, leider griffen beide Plugs beim Starten doch auf die gleiche Binary zu. Vielleicht hätte da der "hmmmdata" Kollege einen Lösungsansatz. Solange habe ich leider nur das Ambilight im Einsatz.

      Hier mal ne EL config die zwei Devices (Arduino+Hue) anspricht. In geändeter Form natürlich auch für andere Devices einsetzbar!
      Dateien
      Gr hm
    • Hi,

      kann jemand helfen?

      Ich habe die 1.5 vom Feed installiert und mich an die Anleitung gehalten.

      Bekomme meine Hue-Stripes Plus aber einfach nicht zum laufen.

      Solo4K VTI 13.02

      Hier noch die FM:
      Spoiler anzeigen

      [InitLog] start of log /home/elight-addons/.enigmalight/enigmalight.log
      [CConfig::LoadConfigFromFile] Opening /etc/enigmalight.conf
      [CConfig::CheckConfig] checking config lines
      [CConfig::CheckConfig] config lines valid
      [CConfig::LoadConfigFromFile] Opening /etc/enigmalight.conf
      [CConfig::BuildConfig] building config
      [CConfig::BuildConfig] built config successfully
      [main] Start device 1 from 1
      [CDevice::Process] ambilight: starting with output "python /home/elight-addons/wifilight/philips_hue/enigmalight_hue_1".py
      [CDevice::Process] ambilight: setting up
      [CDevice::Process] ambilight: setup succeeded
      [CEnigmaLight::SetColorSequence]Set colorsequence to RGB
      set adjust 0 0 0
      [CGuiServer::Process] Start GuiServer1
      [CGuiServer::Process] Opening listening socket for Enigma2 GUI on 127.0.0.1:6767
      [CFlagManager::SetVideoGamma] Gamma not set, using 2.2 since this is default for video
      [CMainLoop::Process] Starting grabber..
      [CGrabber::Setup] Lights: 1, Cluster leds: 1 as one led
      [CGrabber::Setup] Channels: 3
      [CGrabber::Setup] Interval: 0.10
      [CGrabber::Run] Mode -> Dynamic
      [CGrabber::Run] Framegrabber initialized
      [CGrabber::Run] Framegrabber Image initialized
      [CGrabber::Run] Blackbar Detection initialized
      [CFrameGrabber::Setup] Debug mode: enabled
      [CGrabber::Run] Framegrabber set up
      [CGrabber::Run] entering grabloop
      ': [Errno 2] No such file or directoryaddons/wifilight/philips_hue/enigmalight_hue_1x.py
      [CFrameGrabber::CheckRes] Set Scanrange to 120x67 (Source 538976288x538976288)
      [CFrameGrabber::CheckRes] CheckRes NO VIDEO
      [CFrameGrabber::CheckRes] Video is blank
      [CGrabber::Run] Blank Frame

      Bunt ist das Leben und granatenstark, volle Kanne Hoschies!!! :happy4:

      :325: for ever!!!
    • Die log schreibt ja:
      ': [Errno 2] No such file or directoryaddons/wifilight/philips_hue/enigmalight_hue_1x.py

      die hmmmdada EL 1.5 schreibt ja diesen Ordner mitweilig nicht mehr (warum auch immer).

      so wie im ersten Post geschrieben, kannste ja die zwei Dateien auch in irgendeinen anderen Ordner verfrachten. Du must diesen Pfad dann halt nur in der enigmalight.conf anpassen!
      Gr hm
    • Gemacht und keine Besserung. Meldet weiterhin den Fehler mit No such file.

      (Berechtigungen habe ich gesetzt)

      In welchen Ordner schreibt die EL 1.5 von hmmmdada denn?
      Bunt ist das Leben und granatenstark, volle Kanne Hoschies!!! :happy4:

      :325: for ever!!!
    • ich hab das HowTo geschrieben bevor ich meine Solo 4k hatte, aber danach auch noch mal kontrolliert ob das mit dem alternative Pfad passt - es war OK!
      Kannst du die Lichter denn via Hue API und deinem Key ansprechen?
      Gr hm
    • Über die API kein Problem.
      Bunt ist das Leben und granatenstark, volle Kanne Hoschies!!! :happy4:

      :325: for ever!!!
    • Heute sollte meine HUE GO kommen und gerade auf diesen fred gestoßen, sehr coole Sache. Werde ich vll heute Abend gleich mal testen! Vielen Dank dafür.
    • So, neue Kiste da und eingerichtet.

      Spoiler anzeigen

      Welcome on your Vu+ !



      root@vu:~# enigmalight -d
      [InitLog] start of log /home/elight-addons/.enigmalight/enigmalight.log
      [CConfig::LoadConfigFromFile] Opening /etc/enigmalight.conf
      [CConfig::CheckConfig] checking config lines
      [CConfig::CheckConfig] config lines valid
      [CConfig::LoadConfigFromFile] Opening /etc/enigmalight.conf
      [CConfig::BuildConfig] building config
      [CConfig::BuildConfig] built config successfully
      [main] Start device 1 from 1
      [CDevice::Process] ambilight: starting with output "python /etc/enigma2/Enigmalight/enigmalight_hue_LR.py"
      [CDevice::Process] ambilight: setting up
      [CDevice::Process] ambilight: setup succeeded
      [CEnigmaLight::SetColorSequence]Set colorsequence to RGB
      set adjust 0 0 0
      1[CFlagManager::SetVideoGamma] Gamma not set, using 2.2 since this is default for video
      [CMainLoop::Process] Starting grabber..
      [CGrabber::Setup] Lights: 4, Cluster leds: 1 as one led
      [CGrabber::Setup] Channels: 12
      [CGrabber::Setup] Interval: 0.10
      [CGrabber::Run] Mode -> Dynamic
      [CGrabber::Run] Framegrabber initialized
      [CGrabber::Run] Framegrabber Image initialized
      [CGrabber::Run] Blackbar Detection initialized
      [CFrameGrabber::Setup] Debug mode: enabled
      [CGrabber::Run] Framegrabber set up
      [CGrabber::Run] entering grabloop
      [CGuiServer::Process] Start GuiServer
      [CGuiServer::Process] Opening listening socket for Enigma2 GUI on 127.0.0.1:6767
      [CFrameGrabber::CheckRes] Set Scanrange to 120x67 (Source 538976288x538976288)
      [CFrameGrabber::CheckRes] CheckRes NO VIDEO
      [CFrameGrabber::CheckRes] Video is blank
      [CGrabber::Run] Blank Frame
      [CGuiServer::Process] GuiClient 127.0.0.1:42417 connected successful.
      [CFrameGrabber::updateInfo] DBG -> gFPS:10.5 | Res:120x67 (538976288x538976288)
      [CFrameGrabber::updateInfo] DBG -> gFPS:10.0 | Res:120x67 (538976288x538976288)
      [CFrameGrabber::updateInfo] DBG -> gFPS:10.0 | Res:120x67 (538976288x538976288)
      [CFrameGrabber::updateInfo] DBG -> gFPS:10.0 | Res:120x67 (538976288x538976288)
      ^CTraceback (most recent call last):
      File "/etc/enigma2/Enigmalight/enigmalight_hue_LR.py", line 94, in <module>
      popen()
      File "/etc/enigma2/Enigmalight/enigmalight_hue_LR.py", line 25, in popen
      eingabe = sys.stdin.readline()


      Wie man sieht laufen die Hue auch mit EL 1.5 und einem anderen Ordner!
      Gr hm
    • Info:
      Hab jetzt nochmals das 1xHue Paket von #1 runter geladen, meine Daten eingegeben und auf die Box geschoben.
      Also die files sind richtig - die 1ne HueGo bei mir wurde korrekt angesprochen.

      Somit lief das Ganze jetzt auf ner Solo4k und der Uno4kSE
      Gr hm
    • Hey guys,

      I have got Solo 4K (Vti 13) and Philips Hue Starter Kit. I have downloaded 1x_Hue file and installed EnigmaLight plugin to check If I want to be able to trigger one of my lamb.

      May I kindly ask how you fill below lines (of course I know my Hue IP but other data)? I just want to check if I can test and give feedback to you as I really want to use EnigmaLight with my Hue lambs.
      Dateien
      • awe.jpg

        (45,1 kB, 245 mal heruntergeladen, zuletzt: )
    • Hi,
      you need 3 things.
      1. the Userkey
      2. Number of your lamp
      3. IP from the Hue bridge

      Point 1+2 you get from the Hue bridge.

      So open the API of your Bridge and create a new user. You can call them "enigmalight" and if you are finish the api shows you in the down Window the key for this new User.
      If you have only one Lamp, so the number of it is normally call 1.

      Here's the link to the Hue Delevoper site with the rules:
      hxxps://www.developers.meethue.com/documentation/getting-started
      Gr hm
    • Sorry again, as I am not adeveloper,

      1."user key" the result coming from typing nupnp ?

      I see a number like this: [{ "Id": "001788fffe4b2123", "internalipaddress": "192.168.1.39"}]

      2. Number of your lamp means really number of my lamps, in my case starter kit as 3 ?
    • Ok please ignore my question above, I understood and created my 3x_Hue files. Then sent them to my Vu+ Solo 4K.

      I run EnigmaLight plugin and click green button but only 1 lamp turns on and continues with only 1 light which is very weak white light. Also once I click red button it doesn't turn off
      The other 2 lamps don't turn on.

      Should I play with EnigmaLight plugin now?
    • Hi,
      you have 3 Lamps and download the 1xHue.rar package?
      you need the 4x_Hue.rar package

      "Also once I click red button it doesn't turn off"
      you have forget edit the line:
      os.system("curl -d '{\"on\":false}' -X PUT 192.168.xxx.x/api/-------key-----------/groups/0/action")
      Gr hm
    • What I did was:

      1. Downloaded 4x_Hue.rar package but deleted 4th light as I have only 3 like below and also I changed output location path as you can see below

      Spoiler anzeigen


      Quellcode

      1. #[global]
      2. [Device]
      3. name ambilight
      4. output python /etc/enigma2/Enigmalight/enigmalight_hue_3x.py
      5. channels 12
      6. type popen
      7. interval 200000
      8. debug off
      9. [Color]
      10. name red
      11. rgb 0000FF
      12. [Color]
      13. name green
      14. rgb 00FF00
      15. [Color]
      16. name blue
      17. rgb FF0000
      18. [Light]
      19. position left
      20. name 1HU
      21. color red ambilight 1
      22. color green ambilight 2
      23. color blue ambilight 3
      24. hscan 0 5
      25. vscan 10 90
      26. [Light]
      27. position right
      28. name 2HU
      29. color red ambilight 4
      30. color green ambilight 5
      31. color blue ambilight 6
      32. hscan 95 100
      33. vscan 10 90
      34. [Light]
      35. position top
      36. name 3HU
      37. color red ambilight 7
      38. color green ambilight 8
      39. color blue ambilight 9
      40. hscan 10 90
      41. vscan 10 90
      Alles anzeigen


      2. I renamed the file "enigmalight_hue_4x.py" to "enigmalight_hue_3x.py" and input my IP and key etc.. (delete 4th light as well) as you can see below

      Spoiler anzeigen


      Quellcode

      1. import sys
      2. import os
      3. import time
      4. import json
      5. import httplib
      6. from rgb_xy import Converter
      7. from rgb_xy import GamutC # or GamutB, GamutC (you must look for the type of your lamps)
      8. counter = 12
      9. def popen():
      10. converter = Converter(GamutC)
      11. spidev = file( os.getcwd()+'/aufruf.log', "wb")
      12. key = "tzi9GtzVnkoP4YYsGCNvSk78b2GSc40aLC6GPuIx"
      13. ip = "192.168.1.39"
      14. url = '/api/' + key + '/lights/'
      15. lurl = url + '1/state' # die 1 ersetzen mit der Nummer deiner Leuchte
      16. rurl = url + '2/state' # die 2 ersetzen mit der Nummer deiner Leuchte
      17. aurl = url + '3/state' # usw.
      18. MINIMAL_VALUE=0.000000000
      19. while True:
      20. eingabe = sys.stdin.readline()
      21. if len(eingabe)>0:
      22. global counter
      23. counter += 1
      24. try:
      25. lr,lg,lb,rr,rg,rb,ar,ag,ab,br,bg,bb,x = eingabe.split(' ')
      26. except ValueError:
      27. spidev.write("Not enough input parameter, do you have the same amount of lights (channels) in your enigmalight config?")
      28. spidev.flush()
      29. raise
      30. lr = (float(lr))*255
      31. lg = (float(lg))*255
      32. lb = (float(lb))*255
      33. rr = (float(rr))*255
      34. rg = (float(rg))*255
      35. rb = (float(rb))*255
      36. ar = (float(ar))*255
      37. ag = (float(ag))*255
      38. ab = (float(ab))*255
      39. br = (float(br))*255
      40. bg = (float(bg))*255
      41. bb = (float(bb))*255
      42. lll = calcLuminance(lr,lg,lb)
      43. llr = calcLuminance(rr,rg,rb)
      44. lla = calcLuminance(ar,ag,ab)
      45. llb = calcLuminance(br,bg,bb)
      46. if (counter>=13):
      47. connection = httplib.HTTPConnection(ip, timeout=10)
      48. lparams = {'xy': converter.rgb_to_xy(lr,lg,lb), 'colormode': 'xy', 'bri': int(lll), 'on': True}
      49. connection.request('PUT', lurl, json.dumps(lparams))
      50. response = connection.getresponse()
      51. rparams = {'xy': converter.rgb_to_xy(rr,rg,rb), 'colormode': 'xy', 'bri': int(llr), 'on': True}
      52. connection.request('PUT', rurl, json.dumps(rparams))
      53. response = connection.getresponse()
      54. aparams = {'xy': converter.rgb_to_xy(ar,ag,ab), 'colormode': 'xy', 'bri': int(lla), 'on': True}
      55. connection.request('PUT', aurl, json.dumps(aparams))
      56. response = connection.getresponse()
      57. bparams = {'xy': converter.rgb_to_xy(br,bg,bb), 'colormode': 'xy', 'bri': int(llb), 'on': True}
      58. connection.request('PUT', burl, json.dumps(bparams))
      59. response = connection.getresponse()
      60. connection.close()
      61. counter=0
      62. else:
      63. os.system("curl -d '{\"on\":false}' -X PUT 192.168.1.39/api/tzi9GtzVnkoP4YYsGCNvSk78b2GSc40aLC6GPuIx/groups/0/action")
      64. break
      65. def calcLuminance(r,g,b):
      66. LUM_VALUE=5
      67. luminance=1
      68. if (r + g + b > 1):
      69. luminance= r + g + b + LUM_VALUE
      70. if (luminance>=255):
      71. luminance=254
      72. return luminance
      73. import time
      74. time.sleep(1)
      75. popen()
      Alles anzeigen



      3. I sent the file "enigmalight.conf" to my Vu+ Solo 4K /etc/ folder
      4. I created a folder under /etc/enigma2 as EnigmaLight and I put 2 files into that folder (enigmalight_hue_3x.py and rgb_xy.py)
      5. I installed "EnigmaLight" plugin and "curlytx" plugin from feed and Restarted my device

      After all above, I run EnigmaLight plugin and did no settings, just tried to press Green button to see what will happen and only 1 lamp is turning on and gives very weak white lighting at all. The other 2 lamps don't turn on or the light which is very weak white doesn't turn off when I click red button.

      PS: Not sure how I can get log file to give you details ? <X
    • first, you have delete the fourth lamp in the EL config! this will not work ,so you must edit the "channels" to 9.

      try this first and if that does not work we must edit your hue_3x.py
      Gr hm
    • Interestingly, once I changed channels from 12 to 9 nothing happens.
      If 12, one light turns with very weak white lighting.
      If 9, nothing happens.
    • what kind of lamps do you have?

      if modelId in ('LST001', 'LLC010', 'LLC011', 'LLC012', 'LLC006', 'LLC007', 'LLC013'):
      return GamutA
      elif modelId in ('LCT001', 'LCT007', 'LCT002', 'LCT003', 'LLM001'):
      return GamutB
      elif modelId in ('LCT010', 'LCT014', 'LCT011', 'LLC020', 'LST002'):
      return GamutC

      you can see that in the hue API.
      give me this info please and iwill create you a new hue_3x.py
      Gr hm