Linking Vera devices to alexa, via node-red

Ok cheers that makes sense., i just need to figure when do do either. Eg find asetting in json that is consisstant

This part is really a mess. I have 0=0,1=0,2=255,3=0,4=0 as redā€¦

I agree. SetColorRGB is the way to go, if you just want to change a color.

i do but i also want to handle ww and cw and dimming

I think i am alot closer, just need to set the logic

to handle off,on,dim,colour and white

The dimming component is just SetLoadLevelTarget as usual.

Yep, i ok with that. Its this stupid messed up colour that had me going, as i have never used it before in code.

Dimming is easy, as @rigpapa said. I have a couple of RGB+CC lights, where you can set both color and white temperature, but neither Alexa nor the Vera UI can set both at the same time, so itā€™s still possible to control them separately. Alexa will send an RGB color anyway, at least with ha-bridge, so youā€™ll need to decode it, then set onto the scale and send the command to the Vera. I have a special handler to do this, since itā€™s easier than messing with ha-bridge calls.

What version of firmware? Maybe theyā€™re going back to 0ā€¦ :slight_smile: They did fix another color temp bug for 7.32 (W and D reverse in standard UI control actions from somewhere after 4150 up to 5245/6/7, where itā€™s now fixed)

7.32 beta, of course. But Iā€™m also setting it from external code and it has always been like I reported. Maybe they just fixed the UI and setting it in code was already fixed?

I havenā€™t upgraded my production system to 7.32 yet, itā€™s still on 7.31, and I get 255s. Iā€™m going to install my plugins on my 7.32 dev system and see what it does. If itā€™s gone back to zero, Iā€™m going to laugh my bā€” off.

I donā€™t know. I tried to set it again and itā€™s 0 and not 255.

i am on 7.31 but not the lastest 1 back.

When you have figured it out please let us know if itā€™s 0 or 255

@therealdb I have 255 on 7.32 when using D_DimmableRGBLight1.json ā€¦ what static JSON file are you using? Are you going into ā€œEditā€ to make sure you are seeing the actual current value?

One last question (maybe)
this 0=0,1=0,2=255,3=0,4=0 is a sting?

a string, yes

D_DimmableRGBLight2.json for me. Yes, Iā€™m in edit (I know the UI sucks when showing values).
To be honest, I only have virtual devices (mine, but also AltHue), but Iā€™m not sure it should matter, since itā€™s a UI thing.

I just set my light to azure, and I got this: 0=0,1=0,2=45,3=206,4=255

Yeah, it matters because the values are determined by what the plugin chooses to provide, so if the author thought 0, it will be 0, and if the author thought 255, it will be 255.

Hereā€™s where I think the confusion originates. Somewhere between 4150 and 4414, the UI began sending temperature values to SetColor as two components rather than one. Previously, it would send either D0-255 or W0-255 depending on which picker was hit. Somewhere in that firmware range, they starting using a two-component version and they send both: Wn,Dn. They use 255 for the ā€œnullā€ value in this, so W255,D128 means daylight temperature 128 (7250K), and W128,D255 means warm temperature 128 (3750K).

Iā€™ve tried using both 0 and 255 in ColorTarget/CurrentColor, and for me, it makes no difference to the UI. Itā€™s strictly an implementation choice for the developer. If you are just controlling a device, I would, as I said before, use SetColorRGB and SetColorTemp specifically rather than the more generic SetColor, if only to remove ambiguity. If you are implementing an RGB device, however, be careful of the 255 ā€œnullā€ value in the SetColorTemp action specifically.

@ElCid: the answer for you is to use 0, since you are controlling a device, not implementing a device type, if you choose to use SetColor rather than SetColorRGB & SetColorTemp.

Also to note: I set breakpoints in the JavaScript (7.32) on the function that parses CurrentColor and is used to reload the color and temperature pickers. It never hits the breakpoint; it looks like that function is never actually called. Thatā€™s going to take some more digging, but this is probably why itā€™s not showing values properly.

2 Likes

Just FYI, thatā€™s a special version for some Aeotec RGB(W?) device. There are exceptions for it in the UI JS. One of the differences is that it removes the marker from whichever color picker isnā€™t in effect. Hmmmā€¦ I wonder why thatā€™s an exception and not the standard behavior?

Thatā€™s because they have tons of code like this in place, and itā€™s a mess. the entire device templates and its rendering system are questionable.

1 Like

At least itā€™s not a thermostat. :smiley:

1 Like