AtmoHue - BETA - Philips Hue support for AtmoLight & AtmoWin (1 Viewer)

Rick164

MP Donator
  • Premium Supporter
  • January 7, 2006
    1,335
    1,006
    Home Country
    Netherlands Netherlands
    For XML parsing I have tons of example code from other projects laying around, judging by the example code it looks easy enough.
    Seems I would need to do the following:

    - Authenticate via OATH using basic POST command
    - Use that auth to get the data
    - Write received data to XML locally (or html/text file?) and maybe some timer in windows form to do this periodically.

    If you have an access token (client_id etc..) and example url to test I can make the base for it and put it on github :)
     

    Rick164

    MP Donator
  • Premium Supporter
  • January 7, 2006
    1,335
    1,006
    Home Country
    Netherlands Netherlands
    Added account so you can remove the link, looking for the client id and app secret they mention but it doesn't seem to be in the obvious place (profile).
    If you want you can also mail me the client ID / app secret, my mail address should be listed under station guest accounts :)
     
    Last edited:

    Rick164

    MP Donator
  • Premium Supporter
  • January 7, 2006
    1,335
    1,006
    Home Country
    Netherlands Netherlands
    Attached an basic first version that tests the authentication part, according to the docs:

    https://dev.netatmo.com/doc/authentication/usercred

    it requires 4 authentication strings mainly ID / secret / username / password which is pretty strict as you would only expect the need for the ID/secret in most other APIs, you can test it out and see if you can get an valid result (400 means invalid auth).
     

    Attachments

    • NetAtmoNET.zip
      8.8 KB

    Rick164

    MP Donator
  • Premium Supporter
  • January 7, 2006
    1,335
    1,006
    Home Country
    Netherlands Netherlands
    Looks good :) , currently it saves all the 4 values you enter in it and the retrieved Access Token gets refreshed when it expires.

    Should we put this to an own thread - not to fill the hue one up with this?

    Yep, new thread would be best.
     

    pur_berger

    Super User
  • Team MediaPortal
  • Super User
  • May 14, 2007
    1,679
    309
    52
    Vienna
    Home Country
    Austria Austria
    Hm - something I have also recognised ... in dark scenes the Strpe and Iris are blue - the bulb is (much more) white which I think is (more?) correct.

    Colors like this

    [ 22:32:40.135703 ] - [ ATMOLIGHT ] Setting color #Color [A=255, R=0, G=24, B=31] to Hue Bridge
    [ 22:32:40.145704 ] - [ ATMOLIGHT ] Completed sending color Color [A=255, R=0, G=24, B=31] to Hue Bridge
    [ 22:32:40.366760 ] - [ ATMOLIGHT ] [ PRIO 200 ] - Got color command from Atmolight
    [ 22:32:40.375763 ] - [ ATMOLIGHT ] Setting color #Color [A=255, R=0, G=23, B=30] to Hue Bridge
    [ 22:32:40.383761 ] - [ ATMOLIGHT ] Completed sending color Color [A=255, R=0, G=23, B=30] to Hue Bridge
    [ 22:32:40.604815 ] - [ ATMOLIGHT ] [ PRIO 200 ] - Got color command from Atmolight
    [ 22:32:40.611816 ] - [ ATMOLIGHT ] Setting color #Color [A=255, R=0, G=22, B=29] to Hue Bridge
    [ 22:32:40.617822 ] - [ ATMOLIGHT ] Completed sending color Color [A=255, R=0, G=22, B=29] to Hue Bridge
    [ 22:32:40.844874 ] - [ ATMOLIGHT ] [ PRIO 200 ] - Got color command from Atmolight
    [ 22:32:40.851881 ] - [ ATMOLIGHT ] Setting color #Color [A=255, R=0, G=21, B=28] to Hue Bridge
    [ 22:32:40.858879 ] - [ ATMOLIGHT ] Completed sending color Color [A=255, R=0, G=21, B=28] to Hue Bridge
    [ 22:32:41.084933 ] - [ ATMOLIGHT ] [ PRIO 200 ] - Got color command from Atmolight
    [ 22:32:41.091937 ] - [ ATMOLIGHT ] Setting color #Color [A=255, R=0, G=21, B=27] to Hue Bridge
    [ 22:32:41.097937 ] - [ ATMOLIGHT ] Completed sending color Color [A=255, R=0, G=21, B=27] to Hue Bridge
    [ 22:32:41.324992 ] - [ ATMOLIGHT ] [ PRIO 200 ] - Got color command from Atmolight
    [ 22:32:41.332001 ] - [ ATMOLIGHT ] Setting color #Color [A=255, R=1, G=20, B=28] to Hue Bridge
    [ 22:32:41.338996 ] - [ ATMOLIGHT ] Completed sending color Color [A=255, R=1, G=20, B=28] to Hue Bridge
     

    pur_berger

    Super User
  • Team MediaPortal
  • Super User
  • May 14, 2007
    1,679
    309
    52
    Vienna
    Home Country
    Austria Austria
    Hm - I'm wondering - and probaly running in a complete wrong direction ...

    There is a startup delay of 3-4 seconds with the bridge resulting in every colourchange 3-4 seconds behind the actual picture. So - doesn't that mean if you fake the atmolight startup 3 seconds in advance before Atmolight really starts wouldn' that eliminate the delay as hue is already running?

    Ok - I'm confusing myslef now a little :)
     
    Last edited:

    Rick164

    MP Donator
  • Premium Supporter
  • January 7, 2006
    1,335
    1,006
    Home Country
    Netherlands Netherlands
    The initial startup delay is something we have no real control over sadly, the initial TurnOn() command varies from 3-10s and after playback we send it TurnOff().
    To get back in sync you can briefly stop playback but have found the Hue bridge does this eventually by itself depending on how fast the initial color commands get in.
    What I did in the past was not use the TurnOff() command which results in the Hue constantly awaiting for new commands however this made it not accept any other commands from other devices,

    Could of course make it optional which method to use in the next release, we're currently working on a new AtmoLight version which is almost done which will have few new Hue options among other things.
    Once that one is released will start finishing up on a few AtmoHue bugfixes and features next week :)
     

    pur_berger

    Super User
  • Team MediaPortal
  • Super User
  • May 14, 2007
    1,679
    309
    52
    Vienna
    Home Country
    Austria Austria
    Hm - but this will only work if you don't use an effect for Mediaportal Menue? Or does the playback stop and start again with the gif reader?
     

    Users who are viewing this thread

    Top Bottom