Nanoleaf plugin for v.2022?

User avatar
Different Computers
Posts: 2730
Joined: Sat Jan 02, 2016 10:07 am
Location: East Coast
Contact:

Nanoleaf plugin for v.2022?

Post by Different Computers »

I've just got my hands on an M1 Mini, so transitioning Indigo to python3 is very much on my mind.

Any chance the Nanoleaf plugin will see a compatibility update? viewtopic.php?f=75&t=26470&p=213090#p213090
Sonoma on a Mac Mini M1 running Airfoil Pro, Bond Home, Camect, Roku Network Remote, Hue Lights, DomoPad, Adapters, Home Assistant Agent, HomeKitLinkSiri, EPS Smart Dimmer, Fantastic Weather, Nanoleaf, LED Simple Effects, Grafana, Yamaha RX Receiver.
autolog
Posts: 4077
Joined: Tue Sep 10, 2013 3:07 am
Location: West Sussex, UK
Contact:

Re: Nanoleaf plugin for v.2022?

Post by autolog »

Different Computers wrote:... Any chance the Nanoleaf plugin will see a compatibility update? viewtopic.php?f=75&t=26470&p=213090#p213090
Every chance ! :)

I am currently working on an update that is transitioning the plugin to work with a new Python 3 Nanoleaf library that is being kept up-to-date. The library the plugin currently uses is five years old and not kept up-to-date. So this update is a bit more involved than a simple Python 2 to Python 3 conversion.

Hopefully the update should be available by the end of next month at the latest.
User avatar
Different Computers
Posts: 2730
Joined: Sat Jan 02, 2016 10:07 am
Location: East Coast
Contact:

Re: Nanoleaf plugin for v.2022?

Post by Different Computers »

Thanks!
Sonoma on a Mac Mini M1 running Airfoil Pro, Bond Home, Camect, Roku Network Remote, Hue Lights, DomoPad, Adapters, Home Assistant Agent, HomeKitLinkSiri, EPS Smart Dimmer, Fantastic Weather, Nanoleaf, LED Simple Effects, Grafana, Yamaha RX Receiver.
User avatar
Different Computers
Posts: 2730
Joined: Sat Jan 02, 2016 10:07 am
Location: East Coast
Contact:

Re: Nanoleaf plugin for v.2022?

Post by Different Computers »

I'm curious--which is the "kept up to date" python library for Nanoleaf?

And if that library doesn't handle the bulbs, does that mean no chance that nanoleaf bulbs will get added to the plugin?
Sonoma on a Mac Mini M1 running Airfoil Pro, Bond Home, Camect, Roku Network Remote, Hue Lights, DomoPad, Adapters, Home Assistant Agent, HomeKitLinkSiri, EPS Smart Dimmer, Fantastic Weather, Nanoleaf, LED Simple Effects, Grafana, Yamaha RX Receiver.
autolog
Posts: 4077
Joined: Tue Sep 10, 2013 3:07 am
Location: West Sussex, UK
Contact:

Re: Nanoleaf plugin for v.2022?

Post by autolog »

This is the more recent library I am integrating: nanoleafapi

It does not support Nanoleaf bulbs because the Nanaoleaf API only supports: Aurora [NL22], Canvas [NL29], Shape [NL42], Element [NL52] and Line [NL59].

I did waste my money on buying a bulb only to discover it couldn't be controlled.

So, no, the plugin won't be supporting bulbs, sorry. :|

On a more positive note, I have largely completed the conversion to Python 3 and am in the process of testing the changes. So should still be on target for the end of the month. :)
User avatar
Different Computers
Posts: 2730
Joined: Sat Jan 02, 2016 10:07 am
Location: East Coast
Contact:

Re: Nanoleaf plugin for v.2022?

Post by Different Computers »

Thanks very much for the info, and all your work! I'm excited to see if the new library makes connectivity less of a PITA than it is currently. Nothing about your plugin--I'm pretty sure this is Nanoleaf's networking problem. But some days it feels like my most run trigger is "Nanoleaf plugin reload when communication lost" :/
Sonoma on a Mac Mini M1 running Airfoil Pro, Bond Home, Camect, Roku Network Remote, Hue Lights, DomoPad, Adapters, Home Assistant Agent, HomeKitLinkSiri, EPS Smart Dimmer, Fantastic Weather, Nanoleaf, LED Simple Effects, Grafana, Yamaha RX Receiver.
autolog
Posts: 4077
Joined: Tue Sep 10, 2013 3:07 am
Location: West Sussex, UK
Contact:

Re: Nanoleaf plugin for v.2022?

Post by autolog »

I have uploaded the Python 3 version of the plugin as a pre-release to Github: Nanoleaf Controller Version 2022.0.2

I have tested it on MacOS Monterey 12.6 running on both an Intel Mac mini and an Apple Silicon Mac mini.

Please try it out and let me know of any issues. :)
User avatar
Different Computers
Posts: 2730
Joined: Sat Jan 02, 2016 10:07 am
Location: East Coast
Contact:

Re: Nanoleaf plugin for v.2022?

Post by Different Computers »

Awesome! Thanks. I'll install it today. Something to do on a blustery rainy Sunday. :)

Edit: Uh-oh. "sseclient"?

Code: Select all

 Stopped plugin Nanoleaf
   Upgrading plugin Nanoleaf to newer version 2022.0.2 (previous version moved to trash)
   Loading plugin "Nanoleaf 2022.0.2" using API v3.0
   Starting plugin "Nanoleaf 2022.0.2" (pid 7822)
   Nanoleaf Error                  Error in plugin execution InitializeMain:

  File "plugin.py", line 20, in <module>
  File "/Library/Application Support/Perceptive Automation/Indigo 2022.1/Plugins/nanoleaf.indigoPlugin/Contents/Server Plugin/nanoleafapi/nanoleaf.py", line 12, in <module>
type: No module named 'sseclient'

   Stopping plugin "Nanoleaf 2022.0.2" (pid 7822)
   Stopped plugin "Nanoleaf 2022.0.2"

Oct 1, 2022 at 10:12:24 AM
   Reloading plugin "Nanoleaf 2022.0.2" using API v3.0
   Starting plugin "Nanoleaf 2022.0.2" (pid 7829)
   Nanoleaf Error                  Error in plugin execution InitializeMain:

  File "plugin.py", line 20, in <module>
  File "/Library/Application Support/Perceptive Automation/Indigo 2022.1/Plugins/nanoleaf.indigoPlugin/Contents/Server Plugin/nanoleafapi/nanoleaf.py", line 12, in <module>
type: No module named 'sseclient'

   Stopping plugin "Nanoleaf 2022.0.2" (pid 7829)
   Stopped plugin "Nanoleaf 2022.0.2"
Default python for Monterey seems to be v 2.7.18 and searching the web for sseclient shows me that sseclient is installed by default only on 2.7.9 or greater.

EDIT edit: installed an updated Pip and got sseclient installed, and the plugin is working now. I'll report back after some usage!
Last edited by Different Computers on Sat Oct 01, 2022 8:29 am, edited 1 time in total.
Sonoma on a Mac Mini M1 running Airfoil Pro, Bond Home, Camect, Roku Network Remote, Hue Lights, DomoPad, Adapters, Home Assistant Agent, HomeKitLinkSiri, EPS Smart Dimmer, Fantastic Weather, Nanoleaf, LED Simple Effects, Grafana, Yamaha RX Receiver.
autolog
Posts: 4077
Joined: Tue Sep 10, 2013 3:07 am
Location: West Sussex, UK
Contact:

Re: Nanoleaf plugin for v.2022?

Post by autolog »

Forgot about that. :wink:

It will likely be handled automatically in a future version of Indigo but for the moment you need to open a terminal session and enter:

Code: Select all

pip3 install sseclient
Hopefully, that will fix it. :)
autolog
Posts: 4077
Joined: Tue Sep 10, 2013 3:07 am
Location: West Sussex, UK
Contact:

Re: Nanoleaf plugin for v.2022?

Post by autolog »

Different Computers wrote:... Default python for Monterey seems to be v 2.7.18 and searching the web for sseclient shows me that sseclient is installed by default only on 2.7.9 or greater. Any reason I shouldn't upgrade python to that, or beyond?
There is no default Python for Monterey as Apple removed Python. At the moment Indigo installs Python 2 and Python3 for its own use. You don't want to and shouldn't install any python versions, if all you are doing is running Indigo. The plugin has been updated to run on the Python3 as installed by Indigo. :)
User avatar
Different Computers
Posts: 2730
Joined: Sat Jan 02, 2016 10:07 am
Location: East Coast
Contact:

Re: Nanoleaf plugin for v.2022?

Post by Different Computers »

Oops I missed that reply from you.

Did it all by myself :D.

thanks for your work on this.
Sonoma on a Mac Mini M1 running Airfoil Pro, Bond Home, Camect, Roku Network Remote, Hue Lights, DomoPad, Adapters, Home Assistant Agent, HomeKitLinkSiri, EPS Smart Dimmer, Fantastic Weather, Nanoleaf, LED Simple Effects, Grafana, Yamaha RX Receiver.
Dtmr
Posts: 14
Joined: Fri Jan 01, 2021 3:36 pm

Re: Nanoleaf plugin for v.2022?

Post by Dtmr »

Hey, great to hear about the update.
Just installed it and so far no problems.

However, it does not detect my Nanoleaf Elements D781.

Earlier in the Thread you mention Elements as well but the plug-in only refers to "Discovering nanoleaf aurora, canvas and shape devices on network", not Elements.
Is that/will that also be supported?

Cheers,
Dietmar
User avatar
Different Computers
Posts: 2730
Joined: Sat Jan 02, 2016 10:07 am
Location: East Coast
Contact:

Re: Nanoleaf plugin for v.2022?

Post by Different Computers »

Any news about the Elements bulbs?

Also, and perhaps easier, or maybe impossible: Sometimes my light panels get into a strange state where they're listed in Indigo as "No ack." Could No Ack be added as a status for Nanoleaf devices? that would let me trigger the Unifi actions and Nanoleaf plugin restart that I've noticed will get it back to responding.

Weirdly, and probably because of Bluetooth, when Indigo shows No Ack, the Nanoleaf app can still control the problematic device. And the device even shows as active on my network.
Sonoma on a Mac Mini M1 running Airfoil Pro, Bond Home, Camect, Roku Network Remote, Hue Lights, DomoPad, Adapters, Home Assistant Agent, HomeKitLinkSiri, EPS Smart Dimmer, Fantastic Weather, Nanoleaf, LED Simple Effects, Grafana, Yamaha RX Receiver.
autolog
Posts: 4077
Joined: Tue Sep 10, 2013 3:07 am
Location: West Sussex, UK
Contact:

Re: Nanoleaf plugin for v.2022?

Post by autolog »

Elemsnts won't be supported as the underlying API the plugin uses can't support them.

I can schedule in taking a look at adding a no-ack state that you can trigger on once I have completed another plugin I am working on. :)
User avatar
Different Computers
Posts: 2730
Joined: Sat Jan 02, 2016 10:07 am
Location: East Coast
Contact:

Re: Nanoleaf plugin for v.2022?

Post by Different Computers »

Much appreciated!

Shame about the elements, but I get why. Maybe an update to the API will enable them.
Sonoma on a Mac Mini M1 running Airfoil Pro, Bond Home, Camect, Roku Network Remote, Hue Lights, DomoPad, Adapters, Home Assistant Agent, HomeKitLinkSiri, EPS Smart Dimmer, Fantastic Weather, Nanoleaf, LED Simple Effects, Grafana, Yamaha RX Receiver.
Post Reply

Return to “nanoleaf Controller”