Nanoleaf Aurora Component

Does the discovery button push have to be done every time home assistant restarts, or is it stored somewhere in the config? The hue discovery where it prompts you to press the button to add without restarting or anything it is the new gold standard for me.

The integration is awesome thanks for all your hard work!

It’s stored in the config so you’ll only have to push it once during the inital setup.

1 Like

Hey @sanderant , it is saved in a config file after initial discovery, so only one time setup is needed.
The Hue component really is the gold standard :smiley: I tried getting it to work the same way, unfortunately I wasn’t able to display it the way Hue does it (with a new panel describing what to do) - this is why it only works on startup, which I hope is good enough.

Would this component work with the Nanoleaf Canvas?

1 Like

I found using discovery to configure the nanoleaf is a little flakier than setting it manually. While the lighting portion of the nanoleaf is top knotch the wifi behavior leaves a little be desired as it only appears to connect when its first turned on so if your wifi goes down it won’t reconnect and when it does it sometimes gets (requests?) a new ip. In this drama for some reason home assistant kept on munging the keys.

It would be nice if we could make host: an optional parameter where you could store the token and let discovery use a provided token.

Just a request, but otherwise working fine and very happy with the integration.

I am curious to what the color value represents when there is an effect running. Does that value represent the first tile or something?

@RandyA I was able to test it today, no it does not work with Canvas at the moment due to an incompatibility between the canvas api and the aurora api :confused:
I asked in the nanoleaf dev forum if this is a known issue (short summary: The endpoint for e.g. brightness/value returns the actual value on Aurora, but json with value, min and max on Canvas)

@sanderant That seems strange, DHCP correctly assigns my auroras the same IP addresses every time. I’d advise you in trying this route, i.e. go into your router settings and look for something like a static IP address allocation.

As for the color value, I had to check it since I had no idea. It is the last color value that was used, i.e. if you change from red to any effect, it will still show red. Not the best tbh, I don’t yet know how to better integrate that into home assistant, but I’ll find something (hopefully)

@Oro Thanks for your continuing work on this. I did assign an address via the router which did indeed solve that problem.
I have been using the integration lately with a different issue. **Sorry :slight_smile: **
About once every month or two, the Aurora crashes. The symptom is that the system just shows the white light as if when you’re first starting it and the wifi and remote are unresponsive.
While I ask Nanoleaf about that to see what the deal is. It would be nice if the HA integration could do the following things:
Determine if the Nanoleaf is unresponsive. I can check manually via the device tracker, maybe there is another state I could monitor. My idea would be to resolve this via an automated plug to reboot the system if I can figure out a way to trigger it.
The other problem is when the Nanoleaf comes up after rebooting it won’t respond to HA until HA is restarted. I don’t know if this is an HA limitation or not, but it would be nice if it could read again.
Thanks again for all your work on this. I’m learning some python and hope one day to help contribute in a more substantial fashion.

I’m also experiencing the exact same crash with the Aurora’s on two seperate controllers. Seems like it’s a firmware issue.

Well I’ve not really been “working” on it for the past few months :smiley:

And yes, error detection is pretty much nonexistent at the moment. I did a quick check with mine to see if it recovers and it does, but I assume if it is offline for longer it won’t be able to recover without a restart :frowning:

No easy fix for that I think, I’d have to change the python API wrapper to throw exceptions in case it encounters an error (and maybe also a nice way to check if it is available at all) - No idea how difficult that would be. But when I implement it HA should automatically pick up that the Nanoleaf is offline and just say “Unavailable” in HA and recover on its own.

Thankfully as of now I haven’t had issues with my Aurora, just one faulty Canvas controller that the awesome Nanoleaf support replaced very quickly.

I’m also experiencing the same error, where the light will crash and turn on to a blinding white (100% brightness) - typically happens in the middle of the night which isn’t great!

Only way to recover is an unplug at the mains socket, to reboot.

I did notice a firmware update recently to 3.0.6, but the issue still occurs

Hi !

I’m new to HA and I’m trying to configure all my devices. I’ve tried to add Canvas light, but in the log file I see some error:

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 239, in async_update_ha_state
attr = self.state_attributes or {}
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/light/__init__.py", line 444, in state_attributes
data[ATTR_BRIGHTNESS] = self.brightness
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/light/nanoleaf_aurora.py", line 107, in brightness
return int(self._brightness * 2.55)
TypeError: unsupported operand type(s) for *: 'dict' and 'float'

Hi all… got my nanoleaf today… and it worked right away with hass. Now i am hesitating with my firmware upgrade. Actual firmware is 2.3.0 and new firmware would be 3.0.6

are here people who can report if this upgrade won’t break any function or even restrictions (like Harmony etc).

Thanks in advance.

@4D3K canvas does not work at the moment with this component unfortunately, see my comment at #57 Nanoleaf Aurora Component

With the next firmware upgrade everything except directly setting on/off should be working, to get on/off to work I (or someone else) would need to change the API in use from https://github.com/software-2/nanoleaf . I don’t know when I will be able to get around that since I am currently a bit swarmed with work (a good problem to have tbh).

As for an issue with white light or firmware upgrades, this has nothing to do with homeassistant and if it occurs please talk with Nanoleaf directly. For what it’s worth both my Auroras worked fine since day one, even though I am always on the latest version.

Hi @Oro and @Software2 I´m coming from a commercial home automation software named SYMCON. You can extend the functionality with modules. There is also a Nanoleaf modules which was initially for the Aurora but also works with the Canvas.

Here is the gut hub link https://github.com/Wolbolar/IPSymconNanoleaf

Maybe this helps?

For me I really need the support for canvas as its one of my Ceilinglights :slight_smile:

I had some time today and created a Pull Request on https://github.com/home-assistant/home-assistant/pull/21913 which will allow home assistant to also work with Canvas.

To get it merged might take some time and would currently result in a breaking change from platform: nanoleaf_aurora to platform: nanoleaf, I hope that this does not cause too much confusion.
If this gets merged I’ll post an update :slight_smile:

2 Likes

Update sooner than expected :slight_smile: It got merged, so come next version you’ll have to change to platform: nanoleaf for the lights to continue working.
If you’re using auto discovery you’ll need to change the .nanoleaf-aurora.conf in ~/.homeassistant/ to .nanoleaf.conf.

Also, the integration should now gracefully fail if the lights become unavailable (once https://github.com/home-assistant/home-assistant/pull/21945 is merged)

In short: Change to platform: nanoleaf, Canvas now supported, graceful failing if the lights become unavailable.

2 Likes

Hi. Is it possible to command each panel individually?

1 Like

Hi everyone,

I need some help applying a scene or brightness with the native component.
My nanoleaf aurora works well from the lovelace ui, and it was discovered flawlessly by home assistant 0.95.4 (I did not even need to push the nanoleaf on button for 5 seconds).

But I want to set a scene from a script when I change my hue scenes.

I tried this code:

        - service: light.turn_on
          data:
            entity_id: light.nanoleaf_light_panels_55_7d_00
            brightness: 35
            effect: 'Fraise'

It switches on the nanoleaf, but ignored brightness and scene (the scene name is the same in the app).

Do I need to install a custom component ? I thought it was included natively.

I do not understand the example provided above:

light.aurora:
  state: on
  brightness: 204
  effect: Vintage Modern

How do I use this in a script ?

Well I will answer to myself, I found a solution.
I did it manually.

First I declared two shell commands in the configuration file.

shell_command:
  nanoleaf_brightness: "curl -X PUT -H \"Content-Type: application/json\" -d '{\"brightness\" : {\"value\":{{ brightness }} }}' \"http://192.168.0.XXX:16021/api/v1/XXX_TOKEN_XXX/state/\""
  nanoleaf_scene: "curl -X PUT -H \"Content-Type: application/json\" -d '{\"select\" : \"{{ scene }}\"}' \"http://192.168.0.XXX:16021/api/v1/XXX_TOKEN_XXX/effects/\""

You need to open the port 16021 in your firewall.

Then you can use the commands in a script like this:

    start_party:
      sequence:
        - service: shell_command.nanoleaf_scene
          data:
            scene: 'Streaking Notes'
        - service: shell_command.nanoleaf_brightness
          data:
            brightness: 95

It is really fast.
I hope it helps someone.

2 Likes

Glad you got it working, weird however that the integration worked without you needing to press the button and that the script did not work as expected - also weird that you did not have to allow 16021 before your script.
I tried it just now (changed entity_id and effect name, of course) and got the expected results, low brightness and changed effect.

Maybe you are using something like Homekit or Google Assistant instead of the native integration Seeing as you’ve already solved it a different way that is probably already moot anyway :slight_smile:

@Entropyst nope. I might be implementing it in the future seeing as this is something I would also like, but not in the near future, sorry. If someone else wants to pick it up that would be very much appreciated.

1 Like