display, displayTemp: Please help.

Started by Gary Funk
D4b00682acce18fb4e0fa7626122bfe3?s=128&d=mm

Gary Funk

I'm frustrated and I need guidance. After searching and testing and searching more I had to walk away from my desk.

I want to set one or two panels to a set of instructions then later return the panels to the original state.

If I'm correct I need to use display and displayTemp. I can set the panel(s) to fixed color(s) but I have failed to return them to the original state. I want to be able to set a panel to flash Red at 0.5 seconds. Then later set it back to the original state.

This can't be difficult but I just can't get it to work.

C39416f4bdabbd5010f596095fb24348?s=128&d=mm

Aliakbar Eski

What's the command that you are sending?

Regards

D4b00682acce18fb4e0fa7626122bfe3?s=128&d=mm

Gary Funk

First, I tried all the examples in the documentation. They all failed. Next I searched "displayTemp" here and tried all the examples. Well, almost every one of those failed.

As for what I tried, I spent three or four hours sending everything I could think of. Dozens upon dozens of tries, making small changes each time. Thus, my frustration.

I know this can't be that difficult but the documentation has no clear examples.

D4b00682acce18fb4e0fa7626122bfe3?s=128&d=mm

Gary Funk

This is my latest attempt. Clearly, I don't understand the documentation.

{
  "write": {
    "command": "displayTemp",
    "colorType": "HSB",
    "duration": 4,
    "animType": "static",
    "animData": "1 5109 1 255 0 0 0 0 5109 1 0 0 0 0 20",
    "loop": true,
    "delayTime": 5,
    "transTime": 5,
    "palette": [{
      "hue": 0,
      "saturation": 100,
      "brightness": 100
    },{
      "hue": 0,
      "saturation": 0,
      "brightness": 0
    }]
  }
}
D4b00682acce18fb4e0fa7626122bfe3?s=128&d=mm

Gary Funk

I think there is an issue with the documentation. Section 3.2.4.7. Display Temporary Effects just seems wrong.

D4b00682acce18fb4e0fa7626122bfe3?s=128&d=mm

Gary Funk

Finally! I stumbled across code that mostly works.

{
    "write": {
        "command": "displayTemp",
        "colorType": "HSB",
        "duration": 0,
        "animType": "custom",
        "animData": "1 5109 4 {{colorA}} 0 0 {{colorA}} 0 10 {{colorB}} 0 0 {{colorB}} 0 10",
        "loop": true,
        "palette": [{
            "brightness": 50
        }]
    }
}

Now I need a method to set the brightness and turn it off.

D4b00682acce18fb4e0fa7626122bfe3?s=128&d=mm

Gary Funk

@"Aliakbar Eski"
Will you read through this and let me know what I can do, please. I know I'm just missing something.

Best regards and wishes,
Gary

C39416f4bdabbd5010f596095fb24348?s=128&d=mm

Aliakbar Eski

@"Gary Funk"

Apologies for being in radio silence. I was hounded by some deadlines. I have been following this post and am aware of the issue that you are seeing. Let me get back to you this weekend, I want to try this out on my own controller.

The documentation is also mangled and I reported that to the team that manages the forum.

Regards
Aliakbar Eski

D4b00682acce18fb4e0fa7626122bfe3?s=128&d=mm

Gary Funk

@"Aliakbar Eski"
Take your time. I didn't know if you missed my post, you were otherwise busy or I did something that caused an issue.

This isn't critical and I have plenty to keep me busy for a few days. When I get these special effects figured out, I want to write a guide so others may have a better understanding.

Best to you,
Gary

C39416f4bdabbd5010f596095fb24348?s=128&d=mm

Aliakbar Eski

Hey @"Gary Funk"

In your initial attempt, your custom animData was incorrect, but everything else was fine. In the following JSON that you have printed, your duration needs to be non-zero.

Finally to also change the brightness for a temporary time, you can use the globalBrightness field. This will also be added to the documentation.

Here's an example request:

{
    "write": {
        "command": "displayTemp",
        "colorType": "HSB",
        "duration": 4,
        "animType": "static",
        "animData": "2 <panelId> 1 255 255 0 0 10 <panelId> 1 255 0 255 0 10",
        "loop": true,
        "delayTime": 5,
        "transTime": 5,
        "globalBrightness": 10,
        "palette": [
            {
                "hue": 0,
                "saturation": 100,
                "brightness": 100
            },
            {
                "hue": 0,
                "saturation": 0,
                "brightness": 0
            }
        ]
    }
}

you can replace the animData with your own animData

Hope this helps

Regards
Aliakbar Eski

D4b00682acce18fb4e0fa7626122bfe3?s=128&d=mm

Gary Funk

Welcome back, @"Aliakbar Eski", I hope you were able to relax over the weekend.

That helps tremendously. However, there are issues.

  1. globalBrightness sets Every panel, not just the one panel. How is the brightness set for one panel only?
  2. I want the displayTemp to run until it is told to stop by an external commend. Setting duration to 0 solves the first half of the action. Now, how to solve the second half, which is tell it to stop and return to the previous state. The duration can be set to 36000 to satisfy the non-zero requirement but how can it be told to stop before the time is up?
  3. Panel 5109 is set to red by a displayTemp effect. What command, sent to the controller, will return the information of the displayTemp that is currently active?

That's all I have for now. Thank you for the help.

Best regards,
Gary

C39416f4bdabbd5010f596095fb24348?s=128&d=mm

Aliakbar Eski

Hey @"Gary Funk" . I hope you had a great weekend as well!

  1. You will have to apply the brightness into the colour of each panel that you set through the animData.
  2. To do this, you can get the current state of the controller by requesting the currently playing effect name, call the display command with the effect you want to show, and then resume the state by setting the previously running effect name again.
  3. request for the *Dynamic* effect to get the display/displayTemp effect that is active.

Hope this helps as well

Regards
Aliakbar Eski

C39416f4bdabbd5010f596095fb24348?s=128&d=mm

Aliakbar Eski

scale the RGB color values with the normalized brightness value.

So the colour R=255, G=128, B=255

100% brightness: 255, 128, 255
75% brightness: 191, 96, 191
50% brightness: 127, 64, 127
25% brightness: 63, 32, 63

Regards
Aliakbar Eski

D4b00682acce18fb4e0fa7626122bfe3?s=128&d=mm

Gary Funk

@"Aliakbar Eski"
That did not work. I set the color to: 255, 128, 255. The brightness stayed at 20% and the panel turned pink.

Thhis is the code I am using. When sent, this effect sets one panel to red (255 0 0 ) for 1 second and then to off (0 0 0) for 1/2 second and repeats for 10 hours.
Here are the color codes: colorA is 255 0 0 and colorB 0 0 0.

{
    "write": {
        "command": "displayTemp",
        "colorType": "HSB",
        "duration": 36000,
        "loop": true,
        "version": "2.0",
        "animType": "custom",
        "animData": "1 5109 4 {{colorA}} 0 0 {{colorA}} 0 10 {{colorB}} 0 0 {{colorB}} 0 5",
        "palette": [
                { "hue": 0, "saturation": 100, "brightness": 100 }, 
                { "hue": 0, "saturation": 100, "brightness": 100 }, 
                { "hue": 0, "saturation": 0, "brightness": 0 }, 
                { "hue": 0, "saturation": 0, "brightness": 0 },
        ]
    }
}

This is how the controller is set before the above code is sent. I have shortened the JSON code to make it easier to read. As you can see, the brightness is set to 20% and the color is set to blue (0 0 255).

{
    "effects": { 
        "effectsList": [], "select": "*Solid*"
    },
    "state": {
        "brightness": { "value": 20, "max": 100, "min": 0 },
        "colorMode": "hs",
        "ct": { "value": 1200, "max": 6500, "min": 1200 },
        "hue": { "value": 240, "max": 360, "min": 0 },
        "on": { "value": true },
        "sat": { "value": 100, "max": 100, "min": 0 }
    }
}

It works as I want except it does not set the single panel to 100% brightness. Maybe there are more missing key values in the documentation or there are still issues with the firmware.

Best regards,
Your ole pal, Gary

C39416f4bdabbd5010f596095fb24348?s=128&d=mm

Aliakbar Eski

Ahh I see what you want to do now.
Yeah, you cannot do that. You cannot increase the brightness of a panel above the brightness value that has been set. The brightness is a governor max value that a panel can take as set by the user.

Maybe this could be a new feature, I will have to give it some thought.

Regards
Aliakbar Eski