Page 1 of 2

Nanoleaf plugin for v.2022?

PostPosted: Fri Aug 19, 2022 7:01 pm
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

Re: Nanoleaf plugin for v.2022?

PostPosted: Sat Aug 20, 2022 3:33 am
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.

Re: Nanoleaf plugin for v.2022?

PostPosted: Sat Aug 20, 2022 6:37 am
by Different Computers
Thanks!

Re: Nanoleaf plugin for v.2022?

PostPosted: Wed Sep 14, 2022 11:54 am
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?

Re: Nanoleaf plugin for v.2022?

PostPosted: Thu Sep 15, 2022 2:31 am
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. :)

Re: Nanoleaf plugin for v.2022?

PostPosted: Thu Sep 15, 2022 7:04 am
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" :/

Re: Nanoleaf plugin for v.2022?

PostPosted: Fri Sep 30, 2022 8:56 am
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. :)

Re: Nanoleaf plugin for v.2022?

PostPosted: Sat Oct 01, 2022 8:11 am
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!

Re: Nanoleaf plugin for v.2022?

PostPosted: Sat Oct 01, 2022 8:24 am
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. :)

Re: Nanoleaf plugin for v.2022?

PostPosted: Sat Oct 01, 2022 8:29 am
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. :)

Re: Nanoleaf plugin for v.2022?

PostPosted: Sat Oct 01, 2022 8:30 am
by Different Computers
Oops I missed that reply from you.

Did it all by myself :D.

thanks for your work on this.

Re: Nanoleaf plugin for v.2022?

PostPosted: Tue Oct 18, 2022 1:25 pm
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

Re: Nanoleaf plugin for v.2022?

PostPosted: Sun Feb 26, 2023 8:46 am
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.

Re: Nanoleaf plugin for v.2022?

PostPosted: Sun Feb 26, 2023 11:39 am
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. :)

Re: Nanoleaf plugin for v.2022?

PostPosted: Sun Feb 26, 2023 3:36 pm
by Different Computers
Much appreciated!

Shame about the elements, but I get why. Maybe an update to the API will enable them.