Jump to content
C4 Forums | Control4

How to get variable ID?


clariones

Recommended Posts

Hi,

 I'm new for Control4 driver works, I have a question about how to use C4:set/getDeviceVariable() API because I cannot found how can I get the variable IDs from neither user guide nor API document.

I tried it with C4:getDeviceVariables in 2.8.0, I found that:
   If I has code like this:
        C4:addVariable("XXX", "123", "STRING");
        C4:addVariable("YYY", "456", "STRING");

  then I can get variable ID of XXX = 1001, YYY=1002

Is this right way to calculate the variable ID?   Just 1000+the sequence of variable was added?

Could anyone explain about the variable ID?

 

And, BTW, my target control 4 system is 2.6.0. So I cannot use the getDeviceVariables in my released driver.

 

Link to comment
Share on other sites


Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

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