nanoleafapi icon indicating copy to clipboard operation
nanoleafapi copied to clipboard

How can we access custom "basic" effects built in the Android app?

Open iandouglas opened this issue 3 years ago • 0 comments

Thank you for an excellent SDK, I've been having fun playing with it tonight.

I'm trying to write a script to trigger from a StreamDeck pad while live streaming where my script will remember whatever mode/effect/scene is currently running on my Canvas panels, then set each panel to a random RGB color over and over for a period of time, and then I want to reset the Canvas panels back to whatever mode/effect/scene I was previously running when I run the script.

I have made a few customized scenes in the Android app for Nanoleaf, and there are a few other presets like "Reading Light", "Daylight", "Warm White" in the Android app that do not show up when calling nl.list_effects(). Your README suggests that it might be a custom "effect" like the kind you can build in the Python dictionary style that you document ... but these other effects do not show up at all from nl.list_effects()

Any idea how I can access those custom effects programmatically by name?

My script works great if I'm using any of the built-in scenes like "Bedtime", "Fireworks", "Flames", "Meteor Shower" etc, but I have some custom effects that are set to different color schemes based on what kind of streaming I'm doing etc.

If I set my panels to this "Reading Light" entry, as an example, in the Android app, and then call nl.get_color_mode() and nl.get_current_effect(), the color mode is set to ct and the effect is *Solid* but it's the same for all of the Reading Light / Daylight / Warm White, other than the hue and color temperature. If I run one of my custom color settings, the color mode is hs with the effect of *Solid*

If I try to call nl.set_effect('Reading Light') in the code after my random color flashes, nothing changes on my Canvas panels, they stay at whatever the last random colors were, but I also don't get any error from your SDK either.

Happy to provide any other info if it'll help.

iandouglas avatar Jan 06 '22 06:01 iandouglas