Page 1 of 1

Combine 2 (or more) values for TTS to SONOS

Posted: Monday 18 October 2021 19:02
by Tjeerd13
Hello,

I'm trying to get TTS to sonos every time a switch change on/off
it's working ...the problem is i get a short delay between Switch name and the State on/off i would like to combine 2 messeage's

I get the value from a http request node:

Code: Select all

http://192.168.10.17:8080/json.htm?type=devices&rid={{{topic}}}
From there i get the Name and status from the domoticz IDX with the below functions.

I have 2 funtion bloks
One with :

Code: Select all

var name = { "payload": msg.payload.result[0].Name };
return  name;
And the other

Code: Select all

var status = {"payload": msg.payload.result[0].Status };
return  status;
these 2 funtions are connected to TTS-Ultimate. And gives the example message Light Front ....delay... off or on
I tried to get one messeage Light front OFF
I can't get i working with:

I tested with :

Code: Select all

var name = { payload: msg.payload.result[0].Name };
var status = {payload: msg.payload.result[0].Status };
return  [status,name];
I also tested it with the Join block. But unfortanliy i cant get it to work.

Anyone some sugestions how to get one payload with "Light Front on"