Static Effects

Started by empty__wind

empty__wind

Hello, I put together a module a while back and there was the ability to set static scenes. I've upgraded everything and picked up another aurora, however it looks like the static URL I tried in the past doesn't work anymore. This is the command that used to work:

Putting this JSON
'{"write":{"command":"display","version":"1.0","animType":"static","animData":"1 74 1 255 0 0 0 1","loop":false}}'

To this endpoint
"http://192.168.0.1:16021/api/v1/APITOKENj/effects"

It sets the effect to static, in this case just a single red panel. However, the actual panel isn't red. On the app, it shows that the static scene is active, however turning the panel off and then back on, I get an unlit panel.

What am I missing to activate a static effect?

Aliakbar Eski

Hey @empty__wind

panelIds are not the same between 2 different Aurora's and panels. Static effects cannot be shared between controllers because the panelId from one layout will not correspond to a panel on another layout (it may not even exist).

In this case, the panel 74 does not exist in your layout. It existed in a previous layout, yes. In which case it would turn red.

The controller does not throw an error because it cannot determine if you actually do not own a panel with Id 74 or you simply removed it from the layout for the time being. In this case, it will defer this decision to the user, who has more knowledge.

If you need information / help about how to get the panelIds for the panels and so on, I am right here to help!

Hope this helps.

Regards

empty__wind

If it might not be asking too much, I have another question. Rather than setting static, I thought it might be simpler to directly change the hue/saturation/brightness on my single panel display. I think I'm missing something, as I'm writing this json

{"write":{"command":"displayTemp","version":"1.0","animType":"solid","palette":[{"hue":"40","saturation":"50","brightness":"30"}],"colorType":"HSB"}}

To this endpoint

"http://192.168.0.1:16021/api/v1/token/effects"

But getting RESPONSECODE:400 Bad Request

Am I missing something simple again?

Aliakbar Eski

actually surprised that worked haha.

The even more easier and correct way is to set the hue and saturation values from the /state endpoint rather than effects

Aliakbar Eski

try:
{"hue":{"value":181}, "sat":{"value":100}, {"brightness":{"value":50}}

Also saturation cannot be more than 100. Its actually a percentage

Regards