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


LIFX lights on HC3


James R

Recommended Posts

One of the things that was missing for me when I got my HC3 recently was support for LIFX lights. I have some of these lights and wanted to add them to my integrations in HC3. So, I have written a QA to provide this integration. It’s my first QA (and Lua programming) but seems to work OK.

The QA is a controller for the LIFX lights in the system. On start-up it discovers the lights on the network and for each light it creates a child device. Discovery is run regularly (based on a number of seconds in a QA Variable) to allow for devices being added. Light capabilities are read from the LIFX repository on GitHub and each child is given a UI according to it’s capabilities (e.g. white temperature, colour, infrared). These are then devices in the dashboard and can be operated from scenes and other QAs like EventRunner4. This is stretching the boundaries of official feature support on the HC3 but it works!

Lights are polled on a regular interval (again set by a QA Variable) to get their latest settings. This allows for the fact that other software such as the LIFX official app may also be used to control the lights and keeps them in sync.

If a device goes “dark” for a period of time, (it may be turned off at a switch), then the child device is hidden. It is not deleted as it may then be created with a different ID when available again and that would make it difficult to keep consistent in other scenes/QAs. If a device is no longer used or has failed, then there is a button in the controller UI to toggle hidden children and you can then delete it using the dashboard.

Light names are read from the devices and used to name the child device. Location is read and can be seen in the log file when the list devices button is used in the UI. The location is not used as you can put the devices in your own sections and rooms in the HC3.

I only have white, variable white temperatures and colour lights which I can test with. It should also work with the infrared light as well. Multi-zone products are not supported as I cannot test them, and it is a UI challenge on the HC3.

The controller uses the LAN protocol as I didn’t want to be dependent on the LIFX web services being available given the aim is to keep things controlled from the hub. It’s UDP over Wi-Fi so packets can go missing occasionally especially if other software is interacting with the lights as they are not good with concurrent queries and tend to send incomplete packets. This does not happen very often though.

You will still need to use the LIFX app to edit names or if there are firmware upgrades available.

This is a first version but does most of what I think is needed. If others think this is of any use, then I can add it to the download section.

Please login or register to see this attachment.

Edited by James R
additions
  • Like 2
Link to comment
Share on other sites

  • Topic Author
  • small optimisation

    Please login or register to see this attachment.

    • Thanks 1
    Link to comment
    Share on other sites

    • 3 months later...

    Hi,

     

    This looks great, thanks for making this available.

     

    I am a complete newbie to this but I am looking at purchasing some Fibaro gear in the next week. I'm starting small to see how it goes - but I already have some LIFX downlights.

     

    I was considering buying the HC3 Lite, but I'm unsure if this integration will work with it? I know the Lite doesn't support non Z-Wave protocols, but it sounds like this might just communicate by IP over the local subnet and therefore be fine? Do you know if it would work?

     

    Sorry for the basic question.

     

    Cheers

    Link to comment
    Share on other sites

    • 2 months later...
  • Topic Author
  • I have developed this on an HC3 but don't see why it wouldn't work. It communicates with the bulbs using IP. If you do want to use it let me know as there are a few bug fixes in my current version so I need to upload the latest version.

    Link to comment
    Share on other sites

    • 2 months later...
  • Topic Author
  • Update with a few fixes including fix for memory leak.

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

    • 6 months later...
    • 1 month later...
    On 1/12/2024 at 6:11 PM, James R said:

    Update with a few fixes including fix for memory leak.

    Please login or register to see this attachment.

     

    WOW, thank you man!!!!!!!!

    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
    Reply to this topic...

    ×   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...