Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

Osram Smart Plug on HUE


Bodyart

Question

For the Philips Hue lovers there is cheap

Please login or register to see this link.

Smart Plug, which can be easily added to Philips Hue bridge in order to make non Hue lamps controlled by Hue bridge.

 

Please login or register to see this attachment.

 

I made a simple small VD based on @Sankotronic's Hue devices.

Please login or register to see this code.

I hope someone will have use for it :-)

 

 

 

  • Like 1
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Once I did the same based on @Sankotronic HUE system integration.

 

I created nice icons for this :

 

Please login or register to see this image.

/monthly_2017_08/59876c54eaead_OSRAMPLUGERRORX.png.2e03723c83587eaaf212ae7557f65fe8.png" alt="59876c54eaead_OSRAMPLUGERRORX.png.2e03723c83587eaaf212ae7557f65fe8.png" />59876c588347a_OSRAMPLUGERROR.png.f104cc409b4e3a9bcb6d4b81c326d152.png59876c5bf01be_OSRAMPLUGOFF.png.e1fb86853ddd33c5dd5cf9dbcdf49aeb.png59876c5e2fc0a_OSRAMPLUGON.png.c4c4cf1705d7c50f88523edd0128f841.png59876c6096e54_OSRAMPLUG.png.d5bd98db9b022cb614bb1c22c53968c9.png

 

 

Edited by gucio1234
  • Like 1
Link to comment
Share on other sites

  • 0
On 10/31/2017 at 1:06 PM, Bodyart said:

 

I made a simple small VD based on @Sankotronic's Hue devices.

I hope someone will have use for it :-)

 

Hi Bodyart, thanks for the code to switch the Osram smart plug. However I need a bit more explanation on that one, if you could be so kind as to enlighten me.

I created a VD, entered IP address and TCP port in the mask and then, what do I need to do with the code?

Put it into the main loop, or add a button and put the code there?

 

Then I adapt some things according to my system like: hueID of course and hueUser. But please explain the following code to me:

local hueUser = _f:getGlobal('.... 

Does this mean I need to save the Username to some global variable? If so, how?

 

Thank you so much!

 

 

Link to comment
Share on other sites

  • 0
  • Inquirer
  • Hi @Freebird,

     

    in my case i was storing HueUser in a global variable. But that is not necessary.

    Instead of the code:

    Please login or register to see this code.

    you can simply use:

    Please login or register to see this code.

    The whole code is to be placed in a VD under the "Of/Off" toggle button.

    Enjoy coding

    Link to comment
    Share on other sites

    • 0

    Thank you for your quick reply!

    I tried to find what I am doing wrong but can't find it...:

    1. I create a VD, put the IP address of the Hue bridge into the field and the TCP port 80.

    2. In advanced settings I add a button (a single one), label it and copy your code into the window and check "LUA Code".

    By the way: Is it important to check the field "primary"?

    3. I change the variable "hueID"

    4. I change the variable "hueUser" (as you said either as global variable or directly)

    5. I change the 4 variables representing the icon IDs

    6. Save the whole thing

    That should be it?

     

    Thank you for helping!

     

    When I debug the button I get:

     

    [DEBUG] 18:12:38: hueOn = false
    [DEBUG] 18:12:38: hueReachable = false
    [DEBUG] 18:12:42: hueOn = false
    [DEBUG] 18:12:42: hueReachable = false
    [DEBUG] 21:10:41: hueOn = true
    [DEBUG] 21:10:41: hueReachable = false
     

    Link to comment
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...