Popolou Posted April 22, 2024 Posted April 22, 2024 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! Quote
South Africa C4 user Posted April 22, 2024 Posted April 22, 2024 isn’t there a roomID variable? If that is all there is (I can’t recall anything else) then you would need a macro to convert this to a string name… Same thing for DeviceID but not necessarily practical to have a macro for, say, 1000 devices. Quote
Popolou Posted April 22, 2024 Author Posted April 22, 2024 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? Quote
RyanE Posted April 24, 2024 Posted April 24, 2024 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 Quote
Popolou Posted April 24, 2024 Author Posted April 24, 2024 @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 Quote
RyanE Posted April 24, 2024 Posted April 24, 2024 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 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.