joocer / node-red-contrib-magic-home

Do What The F*ck You Want To Public License
0 stars 1 forks source link

only on:true and false working.. #2

Open aaamoeder opened 3 years ago

aaamoeder commented 3 years ago

I have 3 magichome controllers that look identical on the outside also in the app there is no difference in use They are on different software versions though.

However, 2 are working nicely in NR but 1 only responds to the on:true or false input and not to any color input.

Any ideas how to troubleshoot this ?

Thanks for your work on this project, it has enabled me to do some cool stuff 👍

joocer commented 3 years ago

The number of color channels can affect the behavior if they all have the same number of contacts, they're probably the same. On/Off would work as it doesn't make any reference to the color channels but setting other states does - which is consistent with what I understand your experience is.

aaamoeder commented 3 years ago

it's a RGBWW controller & strip just like the others and I set it to RGBWW, but no luck, or did you mean something else with channels ?

joocer commented 3 years ago

That's what I meant, I've had RBGW and RGBWW versions before.

aaamoeder commented 3 years ago

still weird how they both work the exact same way in the magic home app yet one works fine with your node and the other does not ? Is there any debugging I could do to pinpoint the issue and perhaps (help) find a solution ?

aaamoeder commented 3 years ago

after more digging it seems that by setting the node to RGBW instead of RGBWW, I am able to control it, and even set a warm white value. But to do that I need to set msg.payload to {"color":"#0000000025"} when I want to achieve #0000002500 as a result ? so the last four numbers switch places ? If I just send {"color":"#0000002500"} the light simply turns off (due to wrong input?)

joocer commented 3 years ago

There is some logging, I believe it will display out on the console of where NodeRed is run from.

There is an alternate implementation of the node here:

https://github.com/joocer/node-red-nodes/blob/master/magic-home-ufo-controller.js

This would be copied and pasted into a function node on NodeRed and essentially works the same as the installed version, but allows you to add logging/displays/outputs as needed for debugging.

The documentation for the controllers I found was in Chinese, so there was a lot of trial-and-error to get it working; yours doesn't sound like an edge case, I wonder if there was a change to the spec.