Speak Variables/Device States

Posted on
Mon Jun 24, 2019 1:13 pm
Busta999 offline
User avatar
Posts: 714
Joined: Mar 30, 2016
Location: Wales UK

Speak Variables/Device States

Anyone know if/how to use the Speak in Actions to speak a Variable and or Device States?

Posted on
Mon Jun 24, 2019 2:19 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Speak Variables/Device States


Posted on
Mon Jun 24, 2019 3:38 pm
Busta999 offline
User avatar
Posts: 714
Joined: Mar 30, 2016
Location: Wales UK

Re: Speak Variables/Device States

I had tried %%v:472339010%% which works in sending iMessages but not in the Speak function of an Action - how did you get it to work?

Posted on
Mon Jun 24, 2019 3:43 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Speak Variables/Device States

I haven’t tried it, I was just pointing you to the “how” of how to do it.


Sent from my iPhone using Tapatalk Pro

Posted on
Mon Jun 24, 2019 3:55 pm
Busta999 offline
User avatar
Posts: 714
Joined: Mar 30, 2016
Location: Wales UK

Re: Speak Variables/Device States

Ok

No problem, I'll keep digging.

I had found that section and read it, thanks for the link.

Got the iMessage to work with it was trying to get Speak to work too.

Not a big deal at all :-)

Posted on
Tue Jun 25, 2019 5:41 am
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Speak Variables/Device States

If you don't mind constructing a short bit of Python code, you can do this easily with a script:

Code: Select all
# Variable value
var = indigo.variables[1308289177]
indigo.server.speak(var.value)

# Device state
dev = indigo.devices[1990702686]
indigo.server.speak(unicode(dev.states['Forecast_High_Temperature']))

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Tue Jun 25, 2019 5:43 am
Busta999 offline
User avatar
Posts: 714
Joined: Mar 30, 2016
Location: Wales UK

Re: Speak Variables/Device States

Thanks Dave,

Getting into Python is on my todo list, not there yet - but will give it a go.

Thanks

Posted on
Tue Jun 25, 2019 9:02 am
jay (support) offline
Site Admin
User avatar
Posts: 18219
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Speak Variables/Device States

The built-in Speak text area on the Action dialog doesn't support the device/variable substitution, so the script @DaveL17 posted above is the most straight-forward way. I did tweak it in place to make sure that a string was passed to the speak command.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue Jun 25, 2019 9:29 am
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Speak Variables/Device States

Good call Jay.

The coffee hadn’t kicked in yet.


Sent from my iPhone using Tapatalk

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Tue Jun 25, 2019 9:38 am
jay (support) offline
Site Admin
User avatar
Posts: 18219
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Speak Variables/Device States

DaveL17 wrote:
The coffee hadn’t kicked in yet.


Not here either really - very surprised I caught it... ☕️

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest