Jump to content
C4 Forums | Control4

Room or Device variable?


Recommended Posts

I am drawing a blank for what might be really quite simple: is there a pre-configured variable to represent the room name or device a programming event is attached to? In my use case, i do not want to have a separate push notification to explicitly reference that room/device and using what will otherwise be an identical message if i can simply substitute it with a variable.

Cheers!

Link to comment
Share on other sites


Evening.

There does not seem to be one provided by the driver associated with the project. But curiously, there does not appear to be a generic one either internal to C4 as part of the standard variables available to call up the name of that room or device. Is this a programmatic shortcoming or is there something obvious that is not clicking with me?

Link to comment
Share on other sites

On 4/22/2024 at 11:09 AM, Popolou said:

I am drawing a blank for what might be really quite simple: is there a pre-configured variable to represent the room name or device a programming event is attached to? In my use case, i do not want to have a separate push notification to explicitly reference that room/device and using what will otherwise be an identical message if i can simply substitute it with a variable.

Cheers!

There is not as far as I know.  Programming doesn't know where's being called from.

RyanE

Link to comment
Share on other sites

@RyanE Understood, thanks. I will need to explore how to code it so that it extracts the room name. It may end up being quicker to write all the notifications out individually for each similar device but where's the fun in that 😁

Link to comment
Share on other sites

5 hours ago, Popolou said:

@RyanE Understood, thanks. I will need to explore how to code it so that it extracts the room name. It may end up being quicker to write all the notifications out individually for each similar device but where's the fun in that 😁

Who ever said programming was supposed to be fun?

:)

RyanE

Link to comment
Share on other sites

Join the conversation

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

Guest
Reply to this topic...

×   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.