drmark12pa Posted December 12, 2017 Share Posted December 12, 2017 Can someone explain the uses for the variable types of float, string, and device? I'm familiar with the other Boolean and number variables as I've used these extensively. Ultimately, one thing I'm trying to do is figure out a way to program Sirius XM application via 2.10 to change channels to the number specified. I also would like to find some examples of how people have used the other variables in their programming now that with 2.10 there is some more flexibility with variable renaming, descriptions, and different types. Link to comment Share on other sites More sharing options...
sonic30101 Posted December 12, 2017 Share Posted December 12, 2017 Media isn't called up in rooms the same way you can set the value of a light value's device variable, or thermostat, particular amp output. So the only way I am aware if is to make conditional statements for each channel you want. Then nest the command to turn that station on in the particular room. Link to comment Share on other sites More sharing options...
Cyknight Posted December 12, 2017 Share Posted December 12, 2017 To change to a specific channel on SXM assuming you're using the native driver, you would either save those channels as a favorite, or if you really need to be more flexible you can program to go to a channel number - but this is all via 'direct' commands so there is no inserting variable values in to the driver (device specific command - select favorite or set channel number). Either way, you can't do it using variables as such. As for general info on the variables: String is a word, sentence or even a garble - it's an undefined piece of 'text'. You could use this to compare for exact matches in non number variables to trigger event - ie if you have a weather station you can compare a variable on it to read 'cloudy and a chance of rain' to pull back awnings. Can also be used with some specialty drivers etc to get a status piece of text to display on pop-ups, messages etc Float is essentially a number variable with decimals, allowing you to check for number that aren't simple 1,2,3,4 etc. Simple example would be a thermostats, especially set to Celsius, may have set values such as 20.5 degrees Device is literally what it says, it'll give you the device ID and name, this is usually used along the lines of copying a current selected device to another virtual room for 'storing' (old style programming before snapshot driver) or could be used for some more advanced programming option, with a simple example being using a button to select a 'device' then programming against that value on other buttons: 3 button keypad, press bottom button to toggle between several available device by setting a device variable to 'blind 1', 'blind 2' on double tap, blind 3 on triple tap. Then the other two buttons use IF statements to send up/down commands to those blinds when pressed. Yes this could just as easily be done using a number variable - it's just a simplified example. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.