Skip to content
This repository has been archived by the owner on Apr 28, 2022. It is now read-only.

Use of # in payload turns all lights on #248

Closed
ryansabin opened this issue Oct 15, 2018 · 6 comments · Fixed by #265
Closed

Use of # in payload turns all lights on #248

ryansabin opened this issue Oct 15, 2018 · 6 comments · Fixed by #265
Labels

Comments

@ryansabin
Copy link

ryansabin commented Oct 15, 2018

This may or may not be an issue. My understanding is that using the # with a hex color in MQTT payload should set the colors of the lights leaving all other settings as is. Where * with a hex color in the payload would set the color and light the lights. If my understanding is correct the "Websocket API" page should state that using # would change the state from OFF to ON. Otherwise, I would prefer to just change the color and not change the state:)

The issue is that the "state" changes from OFF to ON when you change the color using #. Let me know if this is expected.

Here is the initial config of my lights.
"{"state":"OFF","color":{"r":236,"g":33,"b":196},"brightness":245,"color_temp":327,"speed":33,"effect":"Fire Flicker"}"

I change the color using this command as the payload.
#28f31a

Now the HA config of my lights is.
"{"state":"ON","color":{"r":40,"g":243,"b":26},"brightness":245,"color_temp":327,"speed":33,"effect":"Fire Flicker"}"

@debsahu
Copy link
Collaborator

debsahu commented Oct 15, 2018

I see where you are getting at, good catch. It surely is a bug, I'll push the changes to the development branch later today. Will you be able to check?

@ryansabin
Copy link
Author

ryansabin commented Oct 15, 2018 via email

@debsahu debsahu added the bug label Oct 15, 2018
debsahu added a commit that referenced this issue Oct 15, 2018
Address #248
Commented our because # only is ment to change color and not the state
@debsahu
Copy link
Collaborator

debsahu commented Oct 16, 2018

@ryansabin I pushed the fix yesterday to develop branch.

@ryansabin
Copy link
Author

ryansabin commented Oct 16, 2018 via email

@debsahu
Copy link
Collaborator

debsahu commented Oct 16, 2018

If you change the color, HA should reflect the change in color right? We are not toggling stateOn with '#' command.

Quoting your previous example, if your initial state is:
"{"state":"OFF","color":{"r":236,"g":33,"b":196},"brightness":245,"color_temp":327,"speed":33,"effect":"Fire Flicker"}"

I change the color using this command as the payload.
#28f31a

Now the HA config of your lights should be:
"{"state":"OFF","color":{"r":40,"g":243,"b":26},"brightness":245,"color_temp":327,"speed":33,"effect":"Fire Flicker"}"

@ryansabin
Copy link
Author

ryansabin commented Oct 16, 2018 via email

debsahu added a commit that referenced this issue Nov 5, 2018
* Retire NeoAnimationFX
* Use DMA or UART method along with WS2812FX instead
* fix #248
@debsahu debsahu mentioned this issue Nov 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants