Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to use virtual-input with control-OUT? #87

Open
elpaso666 opened this issue Dec 11, 2024 · 1 comment
Open

how to use virtual-input with control-OUT? #87

elpaso666 opened this issue Dec 11, 2024 · 1 comment

Comments

@elpaso666
Copy link

Hello guys,

it is not really an issue, but I dont know where to ask. I am rewriting my old zigbee integration to MQTT using websockets (instead of UDP).

To use a xiaomi buttons, I want to use a nodered function with mutiple outputs where each output is a different type of click (1/2/3...) connected to respective loxone virtual input (button) using control-OUT. however msg.payload can only have 1 number, so the virtual input stays triggered "ON" and does not do 1/0 to actually turn on the light...

I have tried:

var act=msg.payload.action

var msg1 = {};
var msg2 = {};

if (act=="single")
{
msg1.payload = 1
msg2.payload = 0
return [ [msg1,msg2],null,null,null,null ]
}

else if (act=="double")
{
return [ null,msg,null,null,null ]
}

else
{
return [ null, null, null, null,null ];
}

but thats only sends msg1. I need 1/0 to activate (Tr) any lights control.

thx for advice.
Jakub

@elpaso666 elpaso666 changed the title how to use virtual-input in control-IN? how to use virtual-input with control-OUT? Dec 11, 2024
@thmeger
Copy link
Collaborator

thmeger commented Dec 19, 2024

I don't get the problem? Why aren't you using the switch node?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants