Philips Hue scan improvements

Hello,

I’ve started working on improving the Philips Hue scan by:

  • adding the N-UPnP scan (but this requires an additional request to retrieve the serial number)
  • adding the ability to enter an IP address manually from the front end

I need help with 3 things:

  • the design of the front-end form. I tried it in a card, in a form, it’s still ugly :nauseated_face:
  • I can’t set a value bridge.ipaddress from an input and use it later. It seems basic but I’m stuck (in SetupTab.jsx)
  • I can’t test it for real because I don’t have a Philips Hue bridge anymore :neutral_face:

The branch is here: feat(philips-hue): N-UPnP Search + manual configuration from IP · cicoub13/Gladys@df3fe52 · GitHub

Ah yes, it’s noted in the documentation that the N-UPnP scan only works if the bridge has been registered in the official app. We should add that to our documentation as a prerequisite.

Hi @cicoub13 :slight_smile: So cool, thanks for the PR!

Maybe you could reuse the format we have on the other integrations?

A « + » button next to « Search on the network », which would add a card (take inspiration from the design of the other device cards)

I recommend reading code from other places in Gladys to understand :slight_smile:

Example for the dashboard page, we create a function: Gladys/front/src/routes/dashboard/index.js at master · GladysAssistant/Gladys · GitHub

Which is then passed as props to the component: Gladys/front/src/routes/dashboard/index.js at master · GladysAssistant/Gladys · GitHub

If you’re new to Preact/React, maybe doing a tutorial could help?

React’s documentation is really well done and there is an interactive tutorial: Quick Start – React

For that we’ll find someone who has one as soon as the PR is ready!

Good news,

I had reported the detection problem a long time ago.
For some it worked well and for others not at all.

The frontend and backend are working :sweat_smile:

An image is available to test:

  • Scanning and adding still work
  • N-UPnP scan works for people who previously had issues
  • Manual IP addition works
  • Device control (lights) still works (because I tweaked the storage of the bridge configurations a bit)

docker pull cicoub13/gladys:philips-hue-improve-scan

1 Like

@cicoub13 Super cool, glad you were able to find what wasn’t working on the front end :slight_smile:

Maybe post a message on the EN forum — maybe the user who had the issue can do some testing too!

1 Like

Fait : Phillips Hue Not findable - #9 by cicoub13 - Configuration - Gladys Community (EN)

Nice tutorial on running a Docker image! Thanks for taking the time :folded_hands:

PR ready (tested by an English-speaking user)

1 Like

@cicoub13 Excellent work, it’s good for me and it’s been merged into master :clap:

3 Likes

This feature is available in Gladys Assistant 4.31! :rocket:

I’m closing this topic, feel free to create another one if you find bugs with this feature :slight_smile: