Combine 2 (or more) values for TTS to SONOS

Moderator: leecollings

Post Reply
Tjeerd13
Posts: 34
Joined: Thursday 07 May 2015 16:57
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Assen
Contact:

Combine 2 (or more) values for TTS to SONOS

Post 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"
Pi3, Pi4, Pi4 for Testing, Dashticz, RFXtrx433, Nest: "Thermostat V2, V3, Hello". Honywell Lyric T6R, RFXCom, KaKu, HUE, P1, Open Zwave USB,
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests