Jump to content
C4 Forums | Control4
  • 0

How do I put the contents of a number variable into a string variable? (Text to Speech)


cnicholson

Question

Hi.

So I'm playing with the Text to Speech driver by @Shivam Paw (which is great, BTW) and I'd like the system to speak (for example) "Good morning.  Today's forecasted high temperature is [X]"  where [X] is a numeric variable from another driver.   The driver's "concatenate with variable" command seems to only let me pick text variables.  So i thought if I converted the number variable into string form and stored that in a new (string) variable, I could do what I want.

I see that there is a Chowmain "variable manipulator" driver available, which seems like it might do what I want, but it seems mostly focused on fancy math, so I'm wondering if there a a free and/or simpler way to do what I want.

Or I might just be confused/screwing up how to use the Text To Speech "concentrate with variable" feature.

Thanks

Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • 0

The above was something I did when messing around… so don’t laugh!

The variable name in the command is a string (e.g. in the above example, I simply type “POOL_TEMPERATURE” in the variable name field.  The proxy ID is unique for every driver and you can find this by hovering your mouse cursor over the driver that you want to use a variable from. in my example,  4862 is the Proxy ID of my pool driver and 1428 is the Proxy ID of a thermostat that displays the outside air temperature.
 

 If you are wanting to use a variable from the variable agent then I think (from memory so this one is dangerous) that the proxy ID is 100001.

Link to comment
Share on other sites

  • 0
11 hours ago, South Africa C4 user said:

“POOL_TEMPERATURE” in the variable name field.  The proxy ID is unique for every driver

Thanks.  Yeah, I saw that in the documentation and tried to do that.  But, weird thing, using the Proxy ID doesn't work.  But...using the Device ID, DOES work.   I'm all good now I think.

 

Screenshot 2023-08-04 at 8.48.16 AM.png

Screenshot 2023-08-04 at 8.43.37 AM.png

Link to comment
Share on other sites

  • 0

Proxy ID is the ID of an actual proxy (television, security_panel, light_v2 etc.) attached to a driver, there can be several. If you wanted a variable in relation to a light for example you would need to target the Proxy ID.

Device ID is the ID of encompassing device (driver). Some devices do not have a proxy, these should be flagged with a combo element in the XML portion of the driver meaning they are both a proxy & device driver and share an ID (Device ID). If I create a variable in code from a driver the resulting variable gets placed on the device (use Device ID to reference).

In the composer tree it's typical that the first proxy device is merged into the encompassing device visually and it doesn't make its own branch. A good example are lights with keypads. The light_v2 proxy gets displayed on the device and the keypad gets branched to a new node.

@South Africa C4 user
Hope this helps!

Link to comment
Share on other sites

  • 0
1 hour ago, Rexabyte said:

Proxy ID is the ID of an actual proxy (television, security_panel, light_v2 etc.) attached to a driver, there can be several. If you wanted a variable in relation to a light for example you would need to target the Proxy ID.

Device ID is the ID of encompassing device (driver). Some devices do not have a proxy, these should be flagged with a combo element in the XML portion of the driver meaning they are both a proxy & device driver and share an ID (Device ID). If I create a variable in code from a driver the resulting variable gets placed on the device (use Device ID to reference).

In the composer tree it's typical that the first proxy device is merged into the encompassing device visually and it doesn't make its own branch. A good example are lights with keypads. The light_v2 proxy gets displayed on the device and the keypad gets branched to a new node.

@South Africa C4 user
Hope this helps!

Very informative!  Thanks

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.