Nanoleaf's new light panels

So here’s a weird glitch. If I paste over my codelines with yours, I get compilation errors, but just changing the /beta/ to /v1/ works fine. The forum is altering the " into pairs and smartthings expects the same mark as a start and end, not a start quote and end quote. O_o Got it compiled though.

Question, is it possible for the Scene text to open a scene list to select from? Cycling through the scenes can take a while.

Forking is fairly easy, you just need a github account, and you can fork the code into your own account.

I found this lovely little bit of code that converts a decimal ip address to hex, but I have no idea how to insert it.

Hint: click the down-arrow to see the post, and code.

I forked the original post and added in the /v1/, effectsList, and default color changes.

Does anyone know the “argument” or “expression” I would use to call a specific scene in WebCoRE using the API version of this plugin? It only offers next scene and previous scene as known commands and I’d like to set a specific scene when I come home. The smart things app seems to have all the names of my scenes so I’m thinking it must be possible. Thanks in advance.

Created new post instead to send notification to jacob

You will have to create a separate command and def for each scene you want to be available in CoRE.

I was able to set a CoRE trigger called “Northern Lights” to activate the Northern Lights scene. You can view the list of scenes on the Nanoleaf device page under My Devices.

Paste the following code into the API device handler:

At 28:
command “NorthernLights”

At 177:
def NorthernLights() {
changeScene(“Northern Lights”)
}

You can edit the name to match the scene.

1 Like

Very nice!

I must be doing something a little wrong… I edited the DTH code exactly as you suggested (my scene is name Christmas Mountains). I created a test piston like this to “Set Color…” to an argument on changeScene(“Christmas Mountains”). It is changing the scene but it’s just changing it to white. The IDE Live Log is showing 9:47:32 PM: debug body : {“hue” : 0, “sat” : 0} and 9:47:32 PM: debug /api/beta/6euBdksDzgfczeVQ2yspbVK2kheHggkk/state. Any ideas @Edward_Niedziejko? Thanks!

Your piston shouldn’t be “set color” it should be “set Christmas Mountains”, a new command near the previous scene and next scene commands in the list.

Hmm not seeing it. I’m using webCoRe instead of core. Would that matter?

Could you paste in your lines 28 and 177-9? I’d just like to check the syntax. Your “command” line shouldn’t have spaces, but your scene in quotes will.

yeah, I think I did that correctly. Here’s a few screenshots of my code and piston settings. I guess I should mention that I have two different Aurora controllers and two different scene names on each one called “Christmas Mountains” and “Christmas Guitars”. For now, I’m using the IFTTT Maker WebCoRe option to change the scene through an IFTTT Trigger which is working. I just dislike relying on IFTTT because of the delays it can have at times.

55 AM

Code looks good. Did you remember to publish after saving? Check your device, and make sure Version is set to “Published” instead of something else. Also, I’m not sure if webcore will refresh from smartthings automatically.

looks to be “published”. How do I force a webCoRe refresh?

No idea. Never used WebCoRE. Delete the device and recreate maybe?

Did you check if your device is set to published?
device

Getting in my WebCoRe app settings in the ST SmartApp section and forcing a refresh did the trick! Thanks! By the way, Nanoleaf emailed me the other day and said that official support is indefinitely on hold because SmartThings is not responding back to them or something like that. Just in case anyone is interested in that piece of information. It would be great to have the code automatically populate a list of the scenes that you’ve created for purposes like this.

I don’t know about automatically but I could make a set of variables you could change from the device page to select a few (maybe 3?) scenes, and then use as commands in CoRE. They’d just be a generic “scene1, scene2, scene3” though. Parsing lists for names and automatically creating commands for it is way past my programming skill.

that would be awesome!

This is fairly easily accomplished. Adding line 28->
command “scene1”

Adding line 76->
input name: “scene1”, type: “text”, title: “Custom Scene 1”, description: “Enter a Scene name from the below list to allow CoRE selection”, required: false

Adding line 177 ->
def scene1() {
changeScene("${scene1}")
}

Additional selections can be created by adding in scene2, scene3 etc.

I’m sure for troubleshooting there should be an if doesn’t match scene from list then throw out an error but … ^.^

okay, let me try my luck… are you going to publish this on the main code by chance?

let me play with it a bit. I’ll see if I can make a more automated version.

badass, you’re the man! who needs official support?! honestly though, I really appreciate it because this is one of the centerpieces to my smarthome so I don’t know if I could have made the switch to ST without your DTH.