Hello all,
I have started with NR few hours ago...
I am trying to achieve simple thing. I would like to control Ikea sockets connected to Ikea Tradfri gateway via Loxone. I have setup NR and added two paletts node-red-contrib-ikea-tradfi and node-red-contrib-loxone and connected them to the Ikea Tradfri gateway and Loxone miniserver.
I can manage Ikea socket via simple inject on and off to the socket and it is working fine.
I have created virtual switch in Loxone config and I can see it in NR. If I press it in Loxone app, it sends 0 and 1 to NR, I can see it via debug.
I wrote function to convert 0/1 to off/on. If I see debug output from function it successfully converts 0/1 to off/on
if (msg.payload == 0) {
msg.payload = "off";
return msg;
}
else if (msg.payload == 1) {
msg.payload = "on";
return msg;
}
return null;
But if I connect output from the function to the Ikea socket I have this error message:
Invalid message received, using node config!
Invalid value "LampiÄka Honza" supplied to : TradfriSwitchControlMessage/0: Partial<{ topic: (Int | Array), payload: TradfriSwitchControlAction }>/topic: (Int | Array)/0: Int
Invalid value "LampiÄka Honza" supplied to : TradfriSwitchControlMessage/0: Partial<{ topic: (Int | Array), payload: TradfriSwitchControlAction }>/topic: (Int | Array)/1: Array
What am I doing wrong?
Thanks
Jan K.